SubscriptionRequest Event

This event fires when a subscription request is received.

Syntax

ANSI (Cross Platform)
virtual int FireSubscriptionRequest(XMPPSubscriptionRequestEventParams *e);
typedef struct {
const char *From;
const char *Domain;
int Accept; int reserved; } XMPPSubscriptionRequestEventParams; Unicode (Windows) virtual INT FireSubscriptionRequest(XMPPSubscriptionRequestEventParams *e);
typedef struct {
LPCWSTR From;
LPCWSTR Domain;
BOOL Accept; INT reserved; } XMPPSubscriptionRequestEventParams;
- (void)onSubscriptionRequest:(NSString*)from :(NSString*)domain :(int*)accept;
#define EID_XMPP_SUBSCRIPTIONREQUEST 15

virtual INT IPWORKS_CALL FireSubscriptionRequest(LPSTR &lpszFrom, LPSTR &lpszDomain, BOOL &bAccept);

Remarks

This event fires whenever another XMPP entity requests a subscription to this entity's presence. The XMPP class will parse the requesting entity's Jabber ID into the From and Domain parameters. There is no need to know which resource sent the request, since all instances of the requesting entity's account have access to the same roster.

Accept will initially be false, but setting it to true will cause the XMPP class to allow the remote subscription. Otherwise, the XMPP class will actively deny the subscription request.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks 2020 C++ Edition - Version 20.0 [Build 8307]