store.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_STORE_H
12 #define _SOM_STORE_H
13 
14 #include "session.h"
15 #include "storeatt.h"
16 
33 #define SOM_FACILITY_STORE (8)
35 /* Object types */
36 
37 struct SOMMSData;
38 struct SOMMSMailbox;
39 struct SOMMSConnection;
40 struct SOMMSMessage;
41 
58 typedef void SOMMSStoreCallback (struct SOMSession *session,
59  void *ophandle,
60  void *clientdata,
61  struct SOMMSData *data,
62  int status,
63  const char *errstring);
64 
76 typedef void SOMMSStoreMonitorCallback (struct SOMSession *session,
77  void *ophandle,
78  void *clientdata,
79  struct SOMMSData *data,
80  int status,
81  const char *datap,
82  size_t dlen);
83 
84 
95 typedef void SOMMSStoreMailboxesCallback (struct SOMSession *session,
96  void *ophandle,
97  void *clientdata,
98  struct SOMMSData *data,
99  int status);
100 
111 typedef void SOMMSStoreConnectionsCallback (struct SOMSession *session,
112  void *ophandle,
113  void *clientdata,
114  struct SOMMSData *data,
115  int status);
116 
127 typedef void SOMMSStoreMessagesCallback (struct SOMSession *session,
128  void *ophandle,
129  void *clientdata,
130  struct SOMMSData *data,
131  int status);
132 
145 typedef void SOMMSConnectionCallback (struct SOMSession *session,
146  void *ophandle,
147  void *clientdata,
148  struct SOMMSConnection *con,
149  int status);
150 
151 
164 typedef void SOMMSMailboxCallback (struct SOMSession *session,
165  void *ophandle,
166  void *clientdata,
167  struct SOMMSMailbox *mbx,
168  int status);
169 
170 
185 typedef void SOMMSMessageCallback (struct SOMSession *session,
186  void *ophandle,
187  void *clientdata,
188  struct SOMMSMessage *message,
189  int status);
190 
206 SOMAPI_CDECL int SOMStoreSetMonitorCallback (struct SOMSession *session,
207  SOMMSStoreMonitorCallback *callback,
208  SOMMSStoreMonitorCallback **oldvalue);
209 
221 SOMAPI_CDECL int SOMStoreSetCallback (struct SOMSession *session,
222  SOMMSStoreCallback *callback,
223  SOMMSStoreCallback **oldvalue);
224 
225 
237 SOMAPI_CDECL int
239  SOMMSStoreMailboxesCallback *callback,
240  SOMMSStoreMailboxesCallback **oldvalue);
241 
252 SOMAPI_CDECL int
255  SOMMSStoreConnectionsCallback **oldvalue);
256 
268 SOMAPI_CDECL int
270  SOMMSStoreMessagesCallback *callback,
271  SOMMSStoreMessagesCallback **oldvalue);
272 
273 
285 SOMAPI_CDECL int SOMStoreSetConnectionCallback (struct SOMSession *session,
286  SOMMSConnectionCallback *callback,
287  SOMMSConnectionCallback **oldvalue);
288 
289 
290 
302 SOMAPI_CDECL int SOMStoreSetMailboxCallback (struct SOMSession *session,
303  SOMMSMailboxCallback *callback,
304  SOMMSMailboxCallback **oldvalue);
305 
306 
307 
319 SOMAPI_CDECL int SOMStoreSetMessageCallback (struct SOMSession *session,
320  SOMMSMessageCallback *callback,
321  SOMMSMessageCallback **oldvalue);
322 
323 
324 /* \} */
325 
343 SOMAPI_CDECL int SOMStoreGetStrParam (struct SOMSession *session,
344  int paramtype,
345  char *buffer,
346  size_t buflen,
347  size_t *paramlenp);
348 
349 
358 SOMAPI_CDECL int SOMStoreGetIntParam (struct SOMSession *session,
359  int paramtype,
360  int *valp);
361 
372 SOMAPI_CDECL int SOMStoreConnectionGetStrParam (struct SOMMSConnection *connection,
373  int paramtype,
374  char *buffer,
375  size_t buflen,
376  size_t *paramlenp);
377 
388 SOMAPI_CDECL int SOMStoreGetMailbox (struct SOMMSData *data,
389  void **prev,
390  char *buffer,
391  size_t buflen,
392  size_t *paramlenp);
393 
402 SOMAPI_CDECL int SOMStoreGetConnection (struct SOMMSData *data,
403  void **prev,
404  int *valp);
405 
416 SOMAPI_CDECL int SOMStoreGetMessage (struct SOMMSData *data,
417  void **prev,
418  char *buffer,
419  size_t buflen,
420  size_t *paramlenp);
421 
422 
431 SOMAPI_CDECL int SOMStoreConnectionGetIntParam (struct SOMMSConnection *con,
432  int paramtype,
433  int *valp);
434 
445 SOMAPI_CDECL int SOMStoreMailboxGetStrParam (struct SOMMSMailbox *mbx,
446  int paramtype,
447  char *buffer,
448  size_t buflen,
449  size_t *paramlenp);
450 
451 
460 SOMAPI_CDECL int SOMStoreMailboxGetIntParam (struct SOMMSMailbox *mbx,
461  int paramtype,
462  int *valp);
463 
474 SOMAPI_CDECL int SOMStoreMessageGetStrParam (struct SOMMSMessage *message,
475  int paramtype,
476  char *buffer,
477  size_t buflen,
478  size_t *paramlenp);
479 
480 
489 SOMAPI_CDECL int SOMStoreMessageGetIntParam (struct SOMMSMessage *message,
490  int paramtype,
491  int *valp);
492 
493 
506 };
507 
516 SOMAPI_CDECL int SOMStoreMonitor (struct SOMSession *session,
517  enum som_storemonitor type,
518  void *ophandle,
519  int async);
520 
539  SOM_STORE_REBUILD_MAILBOX_LIST
540 };
541 
542 
550  SOM_STORE_MESSAGE_DELETE,
551  SOM_STORE_MESSAGE_MOVE,
552  SOM_STORE_MESSAGE_SETSTATE
553 };
554 
561  SOM_STORE_MAILBOX_DELETE,
562  SOM_STORE_MAILBOX_BACKUP,
563  SOM_STORE_MAILBOX_RESTORE,
564  SOM_STORE_MAILBOX_RESTORE_MESSAGE,
565  SOM_STORE_MAILBOX_REGISTER_AUTOACTION,
566  SOM_STORE_MAILBOX_DEREGISTER_AUTOACTION,
567  SOM_STORE_TIDY_MAILBOX,
568  SOM_STORE_REBUILD_STATS
569 };
570 
584 SOMAPI_CDECL int SOMStoreManageMailbox (struct SOMSession *session,
585  enum som_managemailbox op,
586  const char *mbx,
587  const char *qualifier,
588  const char *qual2,
589  const char *qual3,
590  void *ophandle,
591  int async);
592 
605 SOMAPI_CDECL int SOMStoreManageMessage (struct SOMSession *session,
606  enum som_managemessage op,
607  const char *source_mbx,
608  int seqnum,
609  const char *dest_mbx,
610  void *ophandle,
611  int async);
612 
625 SOMAPI_CDECL int SOMStoreForwardMessage (struct SOMSession *session,
626  const char *source_mbx,
627  int seqnum,
628  const char *dest_addresses,
629  const char *covernote,
630  void *ophandle,
631  int async);
632 
644 SOMAPI_CDECL int SOMStoreControl (struct SOMSession *session,
645  enum som_storecontrol control,
646  char *qualifier,
647  void *ophandle,
648  int async);
649 
650 
663 SOMAPI_CDECL int SOMStoreStatus (struct SOMSession *session,
664  void *ophandle,
665  int async);
666 
667 
679 SOMAPI_CDECL int SOMStoreConnectionStatus (struct SOMSession *session,
680  int connectionid,
681  void *ophandle,
682  int async);
683 
695 SOMAPI_CDECL int SOMStoreMailboxStatus (struct SOMSession *session,
696  char *mailbox,
697  void *ophandle,
698  int async);
699 
712 SOMAPI_CDECL int SOMStoreMessageStatus (struct SOMSession *session,
713  char *mailbox,
714  int seqno,
715  void *ophandle,
716  int async);
717 
727 SOMAPI_CDECL int SOMStoreMailboxes (struct SOMSession *session,
728  void *ophandle,
729  int async);
730 
740 SOMAPI_CDECL int SOMStoreConnections (struct SOMSession *session,
741  void *ophandle,
742  int async);
743 
754 SOMAPI_CDECL int SOMStoreMessages (struct SOMSession *session,
755  char *mailbox,
756  void *ophandle,
757  int async);
758 
759 /* \} */
760 
761 #endif /* _SOM_STORE_H */
int SOMStoreMonitor(struct SOMSession *session, enum som_storemonitor type, void *ophandle, int async)
Start monitoring store events.
int SOMStoreForwardMessage(struct SOMSession *session, const char *source_mbx, int seqnum, const char *dest_addresses, const char *covernote, void *ophandle, int async)
Forward a Message.
int SOMStoreSetMessageCallback(struct SOMSession *session, SOMMSMessageCallback *callback, SOMMSMessageCallback **oldvalue)
Set the callback function for messages for this session.
@ SOM_STORE_MONITOR_NONE
Definition: store.h:503
int SOMStoreConnectionGetStrParam(struct SOMMSConnection *connection, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Return an string-valued parameter from the connection object.
@ SOM_STORE_BLOCK_OPERATION
Definition: store.h:534
@ SOM_STORE_MAXCONNS
Definition: store.h:536
int SOMStoreStatus(struct SOMSession *session, void *ophandle, int async)
Get current Store status.
int SOMStoreGetConnection(struct SOMMSData *data, void **prev, int *valp)
Return the next connection id from a data block.
int SOMStoreSetCallback(struct SOMSession *session, SOMMSStoreCallback *callback, SOMMSStoreCallback **oldvalue)
Set the Store callback function for this session.
int SOMStoreGetMailbox(struct SOMMSData *data, void **prev, char *buffer, size_t buflen, size_t *paramlenp)
Return the next mailbox path from a data block.
void SOMMSConnectionCallback(struct SOMSession *session, void *ophandle, void *clientdata, struct SOMMSConnection *con, int status)
Prototype for callback for reporting connection object.
Definition: store.h:145
int SOMStoreMessageGetIntParam(struct SOMMSMessage *message, int paramtype, int *valp)
Return an integer-valued parameter from the message object.
int SOMStoreMailboxGetIntParam(struct SOMMSMailbox *mbx, int paramtype, int *valp)
Return an integer-valued parameter from the mailbox object.
som_storecontrol
Definition: store.h:529
void SOMMSStoreMessagesCallback(struct SOMSession *session, void *ophandle, void *clientdata, struct SOMMSData *data, int status)
Prototype for callback for store messages operation completion.
Definition: store.h:127
void SOMMSStoreConnectionsCallback(struct SOMSession *session, void *ophandle, void *clientdata, struct SOMMSData *data, int status)
Prototype for callback for store connections operation completion.
Definition: store.h:111
int SOMStoreSetMonitorCallback(struct SOMSession *session, SOMMSStoreMonitorCallback *callback, SOMMSStoreMonitorCallback **oldvalue)
Set the Store monitor callback function for this session.
int SOMStoreMailboxGetStrParam(struct SOMMSMailbox *mbx, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Return an string-valued parameter from the mailbox object.
int SOMStoreMailboxes(struct SOMSession *session, void *ophandle, int async)
Get list of mailboxes in Store.
int SOMStoreSetConnectionCallback(struct SOMSession *session, SOMMSConnectionCallback *callback, SOMMSConnectionCallback **oldvalue)
Set the callback function for connection objects for this session.
som_managemailbox
Definition: store.h:560
som_storemonitor
Definition: store.h:502
Opaque session data.
@ SOM_STORE_ABORT
Definition: store.h:530
int SOMStoreConnectionGetIntParam(struct SOMMSConnection *con, int paramtype, int *valp)
Return an integer-valued parameter from the connection object.
int SOMStoreControl(struct SOMSession *session, enum som_storecontrol control, char *qualifier, void *ophandle, int async)
Perform control operation on Store.
int SOMStoreMessageStatus(struct SOMSession *session, char *mailbox, int seqno, void *ophandle, int async)
Get message status.
int SOMStoreGetMessage(struct SOMMSData *data, void **prev, char *buffer, size_t buflen, size_t *paramlenp)
Return the next message path from a data block.
@ SOM_STORE_MONITOR_CONNECTIONS
Definition: store.h:504
@ SOM_STORE_RESTART
Definition: store.h:532
som_managemessage
Definition: store.h:549
@ SOM_STORE_MAXVOL
Definition: store.h:537
int SOMStoreMessages(struct SOMSession *session, char *mailbox, void *ophandle, int async)
Get list of messages in a mailbox.
int SOMStoreConnectionStatus(struct SOMSession *session, int connectionid, void *ophandle, int async)
Get connection status.
@ SOM_STORE_LOGOUT
Definition: store.h:533
void SOMMSStoreCallback(struct SOMSession *session, void *ophandle, void *clientdata, struct SOMMSData *data, int status, const char *errstring)
Prototype for callback for store operation completion.
Definition: store.h:58
int SOMStoreMessageGetStrParam(struct SOMMSMessage *message, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Return an string-valued parameter from the message object.
int SOMStoreGetStrParam(struct SOMSession *session, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Return an string-valued parameter from the store object.
int SOMStoreConnections(struct SOMSession *session, void *ophandle, int async)
Get list of connections to Store.
void SOMMSStoreMailboxesCallback(struct SOMSession *session, void *ophandle, void *clientdata, struct SOMMSData *data, int status)
Prototype for callback for store mailboxes operation completion.
Definition: store.h:95
@ SOM_STORE_MONITOR_MAILBOXES
Definition: store.h:505
void SOMMSMessageCallback(struct SOMSession *session, void *ophandle, void *clientdata, struct SOMMSMessage *message, int status)
Prototype for callback for reporting message object.
Definition: store.h:185
void SOMMSMailboxCallback(struct SOMSession *session, void *ophandle, void *clientdata, struct SOMMSMailbox *mbx, int status)
Prototype for callback for reporting mailbox object.
Definition: store.h:164
@ SOM_STORE_SHUTDOWN
Definition: store.h:531
Switch Operation Management Interface: Store Access Attributes.
void SOMMSStoreMonitorCallback(struct SOMSession *session, void *ophandle, void *clientdata, struct SOMMSData *data, int status, const char *datap, size_t dlen)
Prototype for callback for store monitoring.
Definition: store.h:76
int SOMStoreManageMailbox(struct SOMSession *session, enum som_managemailbox op, const char *mbx, const char *qualifier, const char *qual2, const char *qual3, void *ophandle, int async)
Perform management operation on Mailbox.
Switch Operation Management Interface.
int SOMStoreManageMessage(struct SOMSession *session, enum som_managemessage op, const char *source_mbx, int seqnum, const char *dest_mbx, void *ophandle, int async)
Perform management operation on Message.
@ SOM_STORE_UNBLOCK_OPERATION
Definition: store.h:535
int SOMStoreSetListConnectionsCallback(struct SOMSession *session, SOMMSStoreConnectionsCallback *callback, SOMMSStoreConnectionsCallback **oldvalue)
Set the Store "list connections" callback function for this session.
int SOMStoreSetMailboxCallback(struct SOMSession *session, SOMMSMailboxCallback *callback, SOMMSMailboxCallback **oldvalue)
Set the callback function for mailboxes for this session.
int SOMStoreGetIntParam(struct SOMSession *session, int paramtype, int *valp)
Return an integer-valued parameter from the store object.
int SOMStoreSetListMessagesCallback(struct SOMSession *session, SOMMSStoreMessagesCallback *callback, SOMMSStoreMessagesCallback **oldvalue)
Set the Store "list messages" callback function for this session.
@ SOM_STORE_MAXMSGS
Definition: store.h:538
int SOMStoreMailboxStatus(struct SOMSession *session, char *mailbox, void *ophandle, int async)
Get mailbox status.
int SOMStoreSetListMailboxesCallback(struct SOMSession *session, SOMMSStoreMailboxesCallback *callback, SOMMSStoreMailboxesCallback **oldvalue)
Set the Store "list mailboxes" callback function for this session.

All rights reserved © 2002 - 2024 Isode Ltd.