2using System.Threading.Tasks;
16 : base(
"/PublisherAvatar")
20 public override bool HandlesSubPaths
28 public override bool UserSessions
47 if (s.StartsWith(
"/"))
50 int i = s.IndexOf(
'/');
63 if (
string.IsNullOrEmpty(s) || s ==
"/")
65 if ((Node.
Creator != Contact) &&
70 throw new ForbiddenException(
"Access to avatar not granted: " + Contact +
" is not a publisher of " + NodeName +
".");
76 if (Item is
null && s.StartsWith(
"/"))
81 string s2 = HttpUtility.UrlDecode(s);
88 if (Item is
null && s.StartsWith(
"/"))
105 Response.StatusCode = 304;
106 Response.StatusMessage =
"Not Modified";
110 Response.StatusCode = 200;
Static class managing the runtime environment of the IoT Gateway.
static Networking.XMPP.Avatar.AvatarClient AvatarClient
XMPP Concentrator Server.
The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repe...
The server understood the request, but is refusing to fulfill it. Authorization will not help and the...
Represents an HTTP request.
HttpRequestHeader Header
Request header.
Represets a response of an HTTP client request.
void SetHeader(string FieldName, string Value)
Sets a custom header field value.
async Task Write(byte[] Data)
Returns binary data in the response.
Base class for all synchronous HTTP resources. A synchronous resource responds within the method hand...
The server has not found anything matching the Request-URI. No indication is given of whether the con...
Contains information about an avatar.
string Hash
Hash digest of avatar.
string ContentType
Content-Type of binary encoding of avatar.
byte[] Binary
Binary encoding of avatar.
Contains information about one XMPP address.
static readonly XmppAddress Empty
Empty address.
Represents a case-insensitive string.
static readonly CaseInsensitiveString Empty
Empty case-insensitive string
int IndexOf(CaseInsensitiveString value, StringComparison comparisonType)
Reports the zero-based index of the first occurrence of the specified string in the current System....
CaseInsensitiveString Substring(int startIndex, int length)
Retrieves a substring from this instance. The substring starts at a specified character position and ...
async Task< PubSubNode > GetNodeAsync(CaseInsensitiveString Service, CaseInsensitiveString NodeName, NodeAccessModel? AutoCreateAccess, XmppAddress From, CaseInsensitiveString Domain)
Gets a pubsub node.
Defines a published item.
CaseInsensitiveString Publisher
Publisher of content.
Defines a node on which items can be published.
bool PublishOnWeb
If the items published to the node should be available on the web or not.
CaseInsensitiveString[] PublishersOnly
Publisher-only affiliation.
CaseInsensitiveString[] Publishers
Publisher affiliation.
CaseInsensitiveString Creator
Creator of node.
CaseInsensitiveString[] Contact
The JIDs of those to contact with questions
async Task GET(HttpRequest Request, HttpResponse Response)
Executes the GET method on the resource.
bool AllowsGET
If the GET method is allowed.
Service Module hosting the XMPP broker and its components.
GET Interface for HTTP resources.