Message viewing

Description of the function calls for viewing queued and archived messages. More...

Macros

#define SOM_FACILITY_VIEWER   4
 

Typedefs

typedef void SOMViewerCallback(struct SOMSession *session, void *ophandle, void *clientdata, int status, struct X400Message *x400, const char *opdata, size_t opdatalen)
 Prototype for callback for viewer operation completion. More...
 

Functions

int SOMViewerSetCallback (struct SOMSession *session, SOMViewerCallback *callback, SOMViewerCallback **oldvalue)
 Set the viewer callback function for this session. More...
 
int SOMViewQueue (struct SOMSession *session, const char *messageid, void *ophandle, int async)
 Set Logfile monitoring. More...
 
int SOMViewArchive (struct SOMSession *session, const char *filename, void *ophandle, int async)
 Set Logfile monitoring. More...
 

Detailed Description

Description of the function calls for viewing queued and archived messages.

Macro Definition Documentation

◆ SOM_FACILITY_VIEWER

#define SOM_FACILITY_VIEWER   4

Mask used to request viewer facility

Definition at line 31 of file viewer.h.

Typedef Documentation

◆ SOMViewerCallback

typedef void SOMViewerCallback(struct SOMSession *session, void *ophandle, void *clientdata, int status, struct X400Message *x400, const char *opdata, size_t opdatalen)

Prototype for callback for viewer operation completion.

Parameters
session[in] Pointer to address of session object
ophandle[in] Data associated with operation
clientdata[in] Data associated with session
status[in] Status for the operation
x400[in] Type of message
opdata[in] Data returned by operation
opdatalen[in] Length of data returned by operation
Returns
no return value

On successful completion, if the message is an X400 message, then the x400 parameter is non-NULL, and the pointer can be used with the X.400 message API to extract information. If the message is an Internet message, the opdata points to the message, which has CR LF separated lines. The message has two body-parts. One contains envelope information. The other is a message/rfc822 containing the message content.

The callback function becomes responsible for the X400message object passed to it.

On error, opdata may point to a string giving more error information.

Definition at line 58 of file viewer.h.

Function Documentation

◆ SOMViewerSetCallback()

int SOMViewerSetCallback ( struct SOMSession session,
SOMViewerCallback callback,
SOMViewerCallback **  oldvalue 
)

Set the viewer callback function for this session.

Parameters
session[in] Pointer to address of session object
callback[in] Address of callback function
oldvalue[out] Pointer to location for previous value of callback function
Returns
zero on success; non-zero on error

callback may be NULL to clear the callback function oldvalue may be NULL, in which case the previous value is not returned

◆ SOMViewQueue()

int SOMViewQueue ( struct SOMSession session,
const char *  messageid,
void *  ophandle,
int  async 
)

Set Logfile monitoring.

Parameters
session[in] Pointer to address of session object
messageid[in] Queue ID for the message
ophandle[in] Value passed to callback
async[in] Operation is asynchronous if TRUE
Returns
zero on success; non-zero on error

Return information on a message currently in the message queue. The message is returned by the callback function, which must be set.

◆ SOMViewArchive()

int SOMViewArchive ( struct SOMSession session,
const char *  filename,
void *  ophandle,
int  async 
)

Set Logfile monitoring.

Parameters
session[in] Pointer to address of session object
filename[in] Name of archive file
ophandle[in] Value passed to callback
async[in] Operation is asynchronous if TRUE
Returns
zero on success; non-zero on error

Return information on a message from the message archive. The filename should be the full pathname of the file, as listed in the stat log message.

The message is returned by the callback function, which must be set.

All rights reserved © 2002 - 2024 Isode Ltd.