2using System.Threading.Tasks;
16 : base(
"/PublisherAvatar")
20 public override bool HandlesSubPaths
28 public override bool UserSessions
50 if (s.StartsWith(
"/"))
53 int i = s.IndexOf(
'/');
66 if (
string.IsNullOrEmpty(s) || s ==
"/")
68 if ((Node.
Creator != Contact) &&
73 throw new ForbiddenException(Request,
"Access to avatar not granted: " + Contact +
" is not a publisher of " + NodeName +
".");
79 if (Item is
null && s.StartsWith(
"/"))
84 string s2 = HttpUtility.UrlDecode(s);
91 if (Item is
null && s.StartsWith(
"/"))
106 if (!(Header.IfNoneMatch is
null) && Header.IfNoneMatch.Value ==
Avatar.
Hash)
108 Response.StatusCode = 304;
109 Response.StatusMessage =
"Not Modified";
113 Response.StatusCode = 200;
114 Response.StatusMessage =
"OK";
Static class managing the runtime environment of the IoT Gateway.
static 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.
Task Write(byte[] Data)
Returns binary data in the response.
void SetHeader(string FieldName, string Value)
Sets a custom header field value.
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...
async Task< Avatar > GetAvatarAsync(string BareJid)
Gets an avatar.
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....
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.