Summary: Isode provides a number of APIs which allow integrators and product developers to build components that access the Isode Messaging server products or other products supporting the same protocols.
queue.h
Go to the documentation of this file.
1 /* Copyright (c) 2004-2009, Isode Limited, London, England.
2  * All rights reserved.
3  *
4  * Acquisition and use of this software and related materials for any
5  * purpose requires a written licence agreement from Isode Limited,
6  * or a written licence from an organisation licenced by Isode Limited
7  * to grant such a licence.
8  *
9  */
10 
11 #ifndef _SOM_QUEUE_H
12 #define _SOM_QUEUE_H
13 
14 #include "session.h"
15 #include "queueatt.h"
16 
33 #define SOM_FACILITY_QUEUE (1<<1)
35 /* Object types */
36 
37 struct SOMQchannel;
38 struct SOMQmta;
39 struct SOMQmessage;
40 struct SOMQrecip;
41 struct SOMQinmsg;
42 struct SOMQassoc;
43 
58 typedef void SOMQueueCallback (struct SOMSession *session,
59  void *ophandle,
60  void *clientdata,
61  int status);
62 
75 typedef void SOMQchannelCallback (struct SOMSession *session,
76  void *ophandle,
77  void *clientdata,
78  struct SOMQchannel *channel);
79 
80 
93 typedef void SOMQmtaCallback (struct SOMSession *session,
94  void *ophandle,
95  void *clientdata,
96  struct SOMQmta *mta);
97 
98 
113 typedef void SOMQmessageCallback (struct SOMSession *session,
114  void *ophandle,
115  void *clientdata,
116  struct SOMQmessage *message);
117 
118 
119 /* Callback setting functions */
120 
132 SOMAPI_CDECL int SOMQueueSetCallback (struct SOMSession *session,
133  SOMQueueCallback *callback,
134  SOMQueueCallback **oldvalue);
135 
136 
137 
149 SOMAPI_CDECL int SOMQueueSetChannelCallback (struct SOMSession *session,
150  SOMQchannelCallback *callback,
151  SOMQchannelCallback **oldvalue);
152 
153 
154 
166 SOMAPI_CDECL int SOMQueueSetMtaCallback (struct SOMSession *session,
167  SOMQmtaCallback *callback,
168  SOMQmtaCallback **oldvalue);
169 
170 
171 
183 SOMAPI_CDECL int SOMQueueSetMessageCallback (struct SOMSession *session,
184  SOMQmessageCallback *callback,
185  SOMQmessageCallback **oldvalue);
186 
187 
188 /* \} */
189 
207 SOMAPI_CDECL int SOMQmanagerGetStrParam (struct SOMSession *session,
208  int paramtype,
209  char *buffer,
210  size_t buflen,
211  size_t *paramlenp);
212 
213 
222 SOMAPI_CDECL int SOMQmanagerGetIntParam (struct SOMSession *session,
223  int paramtype,
224  int *valp);
225 
236 SOMAPI_CDECL int SOMQchannelGetStrParam (struct SOMQchannel *channel,
237  int paramtype,
238  char *buffer,
239  size_t buflen,
240  size_t *paramlenp);
241 
242 
251 SOMAPI_CDECL int SOMQchannelGetIntParam (struct SOMQchannel *channel,
252  int paramtype,
253  int *valp);
254 
265 SOMAPI_CDECL int SOMQmtaGetStrParam (struct SOMQmta *mta,
266  int paramtype,
267  char *buffer,
268  size_t buflen,
269  size_t *paramlenp);
270 
271 
280 SOMAPI_CDECL int SOMQmtaGetIntParam (struct SOMQmta *mta,
281  int paramtype,
282  int *valp);
283 
298 SOMAPI_CDECL int SOMQmtaGetInmsg (struct SOMQmta *mta,
299  int number,
300  int getnext,
301  struct SOMQinmsg **inmpp);
302 
316 SOMAPI_CDECL int SOMQmtaGetAssoc (struct SOMQmta *mta,
317  int assocnum,
318  int getnext,
319  struct SOMQassoc **aspp);
320 
331 SOMAPI_CDECL int SOMQmessageGetStrParam (struct SOMQmessage *message,
332  int paramtype,
333  char *buffer,
334  size_t buflen,
335  size_t *paramlenp);
336 
337 
346 SOMAPI_CDECL int SOMQmessageGetIntParam (struct SOMQmessage *message,
347  int paramtype,
348  int *valp);
349 
350 
361 SOMAPI_CDECL int SOMQmessageGetRecip (struct SOMQmessage *message,
362  int number,
363  struct SOMQrecip **rpp);
364 
375 SOMAPI_CDECL int SOMQrecipGetStrParam (struct SOMQrecip *recip,
376  int paramtype,
377  char *buffer,
378  size_t buflen,
379  size_t *paramlenp);
380 
381 
390 SOMAPI_CDECL int SOMQrecipGetIntParam (struct SOMQrecip *recip,
391  int paramtype,
392  int *valp);
393 
404 SOMAPI_CDECL int SOMQinmsgGetStrParam (struct SOMQinmsg *inmsg,
405  int paramtype,
406  char *buffer,
407  size_t buflen,
408  size_t *paramlenp);
409 
410 
419 SOMAPI_CDECL int SOMQinmsgGetIntParam (struct SOMQinmsg *inmsg,
420  int paramtype,
421  int *valp);
422 
433 SOMAPI_CDECL int SOMQassocGetStrParam (struct SOMQassoc *assoc,
434  int paramtype,
435  char *buffer,
436  size_t buflen,
437  size_t *paramlenp);
438 
439 
448 SOMAPI_CDECL int SOMQassocGetIntParam (struct SOMQassoc *assoc,
449  int paramtype,
450  int *valp);
451 
452 /* \} */
453 
465 struct SOMQfilterSet;
466 struct SOMQfilter;
467 struct SOMQselector;
468 
474 SOMAPI_CDECL struct SOMQfilter *SOMQfilterNew (void);
475 
483 SOMAPI_CDECL struct SOMQfilter *SOMQfilterChain (struct SOMQfilter *fp,
484  struct SOMQfilter *newp);
485 
491 SOMAPI_CDECL struct SOMQselector *SOMQselectorNew (void);
492 
493 
502 SOMAPI_CDECL int SOMQfilterDelete (struct SOMQfilter *fp);
503 
510 SOMAPI_CDECL int SOMQselectorDelete (struct SOMQselector *fp);
511 
521 SOMAPI_CDECL int SOMQfilterAddStrParam (struct SOMQfilter *fp,
522  int paramtype,
523  const char *value,
524  size_t length);
525 
535 SOMAPI_CDECL int SOMQfilterAddIntParam (struct SOMQfilter *fp,
536  int paramtype,
537  int value);
538 
555 SOMAPI_CDECL int SOMQselectorAddStrParam (struct SOMQselector *fp,
556  int paramtype,
557  const char *value,
558  size_t length);
559 
575 SOMAPI_CDECL int SOMQselectorAddIntParam (struct SOMQselector *fp,
576  int paramtype,
577  int value);
578 
579 /* \} */
580 
581 
603 };
604 
636 };
637 
648 SOMAPI_CDECL int SOMQueueControl (struct SOMSession *session,
649  enum som_qmcontrol control,
650  void *ophandle,
651  int async);
652 
653 
666 SOMAPI_CDECL int SOMQueueStatus (struct SOMSession *session,
667  void *ophandle,
668  int async);
669 
670 
686 SOMAPI_CDECL int SOMQchannelControl (struct SOMSession *session,
687  struct SOMQselector *selector,
688  enum som_qocontrol control,
689  const char *data,
690  int datalen,
691  void *ophandle,
692  int async);
693 
694 
707 SOMAPI_CDECL int SOMQchannelRead (struct SOMSession *session,
708  struct SOMQselector *selector,
709  void *ophandle,
710  int async);
711 
727 SOMAPI_CDECL int SOMQmtaControl (struct SOMSession *session,
728  struct SOMQselector *selector,
729  enum som_qocontrol control,
730  const char *data,
731  int datalen,
732  void *ophandle,
733  int async);
734 
735 
753 SOMAPI_CDECL int SOMQmtaRead (struct SOMSession *session,
754  struct SOMQselector *selector,
755  int limit,
756  void *ophandle,
757  int async);
758 
774 SOMAPI_CDECL int SOMQmessageControl (struct SOMSession *session,
775  struct SOMQselector *selector,
776  enum som_qocontrol control,
777  const char *data,
778  int datalen,
779  void *ophandle,
780  int async);
781 
782 
796 SOMAPI_CDECL int SOMQmessageRead (struct SOMSession *session,
797  struct SOMQselector *selector,
798  int limit,
799  void *ophandle,
800  int async);
801 
802 
815 SOMAPI_CDECL int SOMQmessageSearch (struct SOMSession *session,
816  struct SOMQfilter *filter,
817  void *ophandle,
818  int async);
819 
820 
821 /* \} */
822 
823 #endif /* _SOM_QUEUE_H */
int SOMQchannelRead(struct SOMSession *session, struct SOMQselector *selector, void *ophandle, int async)
Perform control operation on Queue Channel.
int SOMQmessageGetRecip(struct SOMQmessage *message, int number, struct SOMQrecip **rpp)
Return the pointer to a recipient object.
int SOMQmtaGetStrParam(struct SOMQmta *mta, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Return an string-valued parameter from the mta object.
int SOMQmanagerGetStrParam(struct SOMSession *session, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Return an string-valued parameter from the manager object.
int SOMQselectorAddStrParam(struct SOMQselector *fp, int paramtype, const char *value, size_t length)
Add string-valued parameter to the selector.
struct SOMQselector * SOMQselectorNew(void)
Create new selector object.
int SOMQmessageRead(struct SOMSession *session, struct SOMQselector *selector, int limit, void *ophandle, int async)
Perform control operation on Queue Message.
int SOMQueueSetCallback(struct SOMSession *session, SOMQueueCallback *callback, SOMQueueCallback **oldvalue)
Set the Queue callback function for this session.
void SOMQueueCallback(struct SOMSession *session, void *ophandle, void *clientdata, int status)
Prototype for callback for queue operation completion.
Definition: queue.h:58
int SOMQfilterDelete(struct SOMQfilter *fp)
Delete filter chain.
void SOMQmessageCallback(struct SOMSession *session, void *ophandle, void *clientdata, struct SOMQmessage *message)
Prototype for callback for reporting message object.
Definition: queue.h:113
int SOMQinmsgGetIntParam(struct SOMQinmsg *inmsg, int paramtype, int *valp)
Return an integer-valued parameter from the inbound message object.
int SOMQmanagerGetIntParam(struct SOMSession *session, int paramtype, int *valp)
Return an integer-valued parameter from the manager object.
int SOMQfilterAddStrParam(struct SOMQfilter *fp, int paramtype, const char *value, size_t length)
Add string-valued parameter to the filter.
Switch Operation Management Interface.
int SOMQinmsgGetStrParam(struct SOMQinmsg *inmsg, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Return an string-valued parameter from the inbound message object.
som_qmcontrol
Definition: queue.h:591
int SOMQmessageGetStrParam(struct SOMQmessage *message, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Return an string-valued parameter from the message object.
int SOMQueueSetChannelCallback(struct SOMSession *session, SOMQchannelCallback *callback, SOMQchannelCallback **oldvalue)
Set the callback function for channel objects for this session.
struct SOMQfilter * SOMQfilterNew(void)
Create new filter object.
Opaque session data.
int SOMQmtaGetIntParam(struct SOMQmta *mta, int paramtype, int *valp)
Return an integer-valued parameter from the mta object.
int SOMQselectorDelete(struct SOMQselector *fp)
Delete selector.
int SOMQselectorAddIntParam(struct SOMQselector *fp, int paramtype, int value)
Add integer-valued parameter to the selector.
int SOMQfilterAddIntParam(struct SOMQfilter *fp, int paramtype, int value)
Add integer-valued parameter to the filter.
int SOMQchannelGetStrParam(struct SOMQchannel *channel, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Return an string-valued parameter from the channel object.
int SOMQrecipGetIntParam(struct SOMQrecip *recip, int paramtype, int *valp)
Return an integer-valued parameter from the recip object.
int SOMQmessageSearch(struct SOMSession *session, struct SOMQfilter *filter, void *ophandle, int async)
Perform control operation on Queue Message.
int SOMQueueSetMtaCallback(struct SOMSession *session, SOMQmtaCallback *callback, SOMQmtaCallback **oldvalue)
Set the callback function for Mtas for this session.
int SOMQueueStatus(struct SOMSession *session, void *ophandle, int async)
Get current Queue Manager status.
int SOMQrecipGetStrParam(struct SOMQrecip *recip, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Return an string-valued parameter from the recip object.
som_qocontrol
Definition: queue.h:606
int SOMQueueSetMessageCallback(struct SOMSession *session, SOMQmessageCallback *callback, SOMQmessageCallback **oldvalue)
Set the callback function for messages for this session.
int SOMQchannelGetIntParam(struct SOMQchannel *channel, int paramtype, int *valp)
Return an integer-valued parameter from the channel object.
void SOMQchannelCallback(struct SOMSession *session, void *ophandle, void *clientdata, struct SOMQchannel *channel)
Prototype for callback for reporting channel object.
Definition: queue.h:75
int SOMQmessageGetIntParam(struct SOMQmessage *message, int paramtype, int *valp)
Return an integer-valued parameter from the message object.
int SOMQassocGetStrParam(struct SOMQassoc *assoc, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Return an string-valued parameter from the association object.
int SOMQmtaRead(struct SOMSession *session, struct SOMQselector *selector, int limit, void *ophandle, int async)
Perform control operation on Queue Mta.
int SOMQmtaGetAssoc(struct SOMQmta *mta, int assocnum, int getnext, struct SOMQassoc **aspp)
Return the pointer to an inbound message object.
int SOMQmtaGetInmsg(struct SOMQmta *mta, int number, int getnext, struct SOMQinmsg **inmpp)
Return the pointer to an inbound message object.
struct SOMQfilter * SOMQfilterChain(struct SOMQfilter *fp, struct SOMQfilter *newp)
Add filter to chain.
int SOMQueueControl(struct SOMSession *session, enum som_qmcontrol control, void *ophandle, int async)
Perform control operation on Queue Manager.
int SOMQassocGetIntParam(struct SOMQassoc *assoc, int paramtype, int *valp)
Return an integer-valued parameter from the association object.
void SOMQmtaCallback(struct SOMSession *session, void *ophandle, void *clientdata, struct SOMQmta *mta)
Prototype for callback for reporting mta object.
Definition: queue.h:93
int SOMQchannelControl(struct SOMSession *session, struct SOMQselector *selector, enum som_qocontrol control, const char *data, int datalen, void *ophandle, int async)
Perform control operation on Queue Channel.
int SOMQmessageControl(struct SOMSession *session, struct SOMQselector *selector, enum som_qocontrol control, const char *data, int datalen, void *ophandle, int async)
Perform control operation on Queue Message.
Switch Operation Management Interface: Queue Access Attributes.
int SOMQmtaControl(struct SOMSession *session, struct SOMQselector *selector, enum som_qocontrol control, const char *data, int datalen, void *ophandle, int async)
Perform control operation on Queue Mta.