My Project
IParaWebService.h
1 //-----------------------------------------------------------------------------
2 // Copyright (C) 2004 - 2007 ParaEngine Corporation, All Rights Reserved.
3 // Author: LiXizhi
4 // Email: LiXizhi@yeah.net
5 //-----------------------------------------------------------------------------
6 #pragma once
7 
8 #define WEBSERVICECLIENT_CLASS_ID 0x100A20
9 
10 namespace ParaEngine
11 {
12  class CURLRequestTask;
13 
18  {
19  long int totalBytesSent;
22  long int totalBytesReceived;
43  bool encryption;
44  bool compression;
45  };
46 
51  {
52  public:
59  virtual const char* Invoke(const char* OperationName, const char* msg)=0;
67  virtual void InvokeAsync(const char* OperationName, const char* msg, const char* sCallBackCode)=0;
68 
70  virtual const char* GetURL()=0;
71 
76  virtual void Abort()=0;
77  };
78 
81  {
82  Jabber_OnPresence = 0,//We received a presence packet.
83  Jabber_OnError,
84  Jabber_OnRegistered,//After calling Register(), the registration succeeded or failed.
85  Jabber_OnRegisterInfo,//after calling Register, information about the user is required. Fill in the given IQ with the requested information.
86  Jabber_OnIQ,//We received an IQ packet.
87  Jabber_OnMessage,//We received a message packet.
88  Jabber_OnAuthError,//Authentication failed. The connection is not terminated if there is an auth error and there is at least one event handler for this event.
89  Jabber_OnLoginRequired,//AutoLogin is false, and it's time to log in.
90 
91  Jabber_OnConnect, // The connection is connected, but no stream:stream has been sent, yet.
92  Jabber_OnAuthenticate, // The connection is complete, and the user is authenticated.
93  Jabber_OnDisconnect, // The connection is disconnected
94 
95  Jabber_OnRosterEnd, //Fired when a roster result is completed being processed.
96  Jabber_OnRosterBegin, // Fired when a roster result starts, before any OnRosterItem events fire.
97  Jabber_OnRosterItem, //event for new roster items. A roster may belong to multiple groups
98 
99  Jabber_OnSubscription, // a new users subscribes to this user
100  Jabber_OnUnsubscription, // a user unsubscribes from this user
101 
102  NPL_OnNPLMessage,//We received a NPL message. NPL message has no listeners
103  };
104 
109  {
110  public:
112  //
113  // attribute functions
114  //
116 
118  virtual void SetUser(const char* User) = 0;
119 
121  virtual const char* GetUser() = 0;
122 
124  virtual void SetPriority(int nPriority) = 0;
125 
127  virtual int GetPriority() = 0;
128 
132  virtual void SetPassword(const char* Password) = 0;
133 
137  virtual const char* GetPassword() = 0;
138 
140  virtual void SetAutoLogin(bool AutoLogin) = 0;
141 
143  virtual bool GetAutoLogin() = 0;
144 
146  virtual void SetAutoRoster(bool AutoRoster) = 0;
147 
149  virtual bool GetAutoRoster() = 0;
150 
152  virtual void SetAutoIQErrors(bool AutoIQErrors) = 0;
153 
155  virtual bool GetAutoIQErrors() = 0;
156 
158  virtual void SetAutoPresence(bool AutoPresence) = 0;
159 
161  virtual bool GetAutoPresence() = 0;
162 
163 
165  virtual void SetResource(const char* Resource) = 0;
166 
168  virtual const char* GetResource() = 0;
169 
171  virtual void SetIsAuthenticated(bool IsAuthenticated) = 0;
172 
174  virtual bool GetIsAuthenticated() = 0;
175 
177  virtual void SetServer(const char* Server) = 0;
178 
180  virtual const char* GetServer() = 0;
181 
186 
192 
195 
198 
202 
205 
208 
211 
214 
217 
220 
223 
226 
229 
232 
235 
238 
241 
245 
248 
251 
254 
258 
264 
267 
272 
275 
278 
283 
286 
288 
290 
292 
294 
296 
298 
300 
302 
310 
311 
316 
319 
321 
323 
325 
327 
332 
333 
338 
341 
349 
350 
357 
358 
367 
372 
378 
388 
394 
400 
408 
413 
418 
424 
427 
431 
437 
445 
452 
458 
473 
481 
487 
494 
499 
506 
513 
520 
527 
533 
539 
542 
545 
549 
556 
562 
568 
int uncompressedBytesReceived
Total number of bytes received over the wire after decompression was applied.
Definition: IParaWebService.h:31
int s10nStanzasSent
The total number of Subscription Stanzas sent.
Definition: IParaWebService.h:39
int messageStanzasReceived
The total number of Message Stanzas received.
Definition: IParaWebService.h:38
NPL interface of a XML Web service client proxy.
Definition: IParaWebService.h:50
int iqStanzasReceived
The total number of IQ Stanzas received.
Definition: IParaWebService.h:36
different physics engine has different winding order.
Definition: EventBinding.h:32
Definition: ResourceEmbedded.h:17
bool compression
Whether or not the stream (to the server) gets compressed.
Definition: IParaWebService.h:44
int totalStanzasReceived
The total number of Stanzas received.
Definition: IParaWebService.h:34
int uncompressedBytesSent
Total number of bytes sent over the wire before compression was applied.
Definition: IParaWebService.h:29
bool encryption
Whether or not the connection (to the server) is encrypted.
Definition: IParaWebService.h:43
int iqStanzasSent
The total number of IQ Stanzas sent.
Definition: IParaWebService.h:35
NPL interface of a Jabber-XMPP client proxy.
Definition: IParaWebService.h:108
int s10nStanzasReceived
The total number of Subscription Stanzas received.
Definition: IParaWebService.h:40
JABBERLISTENER_TYPE
JABBERLISTENER_TYPE.
Definition: IParaWebService.h:80
int compressedBytesReceived
Total number of bytes received over the wire before decompression was applied.
Definition: IParaWebService.h:27
int totalStanzasSent
The total number of Stanzas sent.
Definition: IParaWebService.h:33
long int totalBytesReceived
The total number of bytes received over the wire.
Definition: IParaWebService.h:22
int messageStanzasSent
The total number of Message Stanzas sent.
Definition: IParaWebService.h:37
A structure describing the current jabber connection statistics.
Definition: IParaWebService.h:17
int presenceStanzasReceived
The total number of Presence Stanzas received.
Definition: IParaWebService.h:42
long int totalBytesSent
The total number of bytes sent over the wire.
Definition: IParaWebService.h:19
int compressedBytesSent
Total number of bytes sent over the wire after compression was applied.
Definition: IParaWebService.h:25
int presenceStanzasSent
The total number of Presence Stanzas sent.
Definition: IParaWebService.h:41