libsyncml  0.5.4
Data Structures | Typedefs | Functions
SyncML Queue Internals
Low Level API Internals

The private part. More...

Collaboration diagram for SyncML Queue Internals:

Data Structures

struct  SmlQueue
 Represents a Queue which can be used to receive messages. More...

Typedefs

typedef void(* SmlQueueHandler )(void *message, void *userdata)
typedef struct SmlQueue SmlQueue
 Represents a Queue which can be used to receive messages.

Functions

SmlQueuesmlQueueNew (SmlError **error)
 Creates a new asynchronous queue.
void smlQueueFree (SmlQueue *queue)
void smlQueueFlush (SmlQueue *queue)
void smlQueueSetHandler (SmlQueue *queue, SmlQueueHandler handler, void *userdata)
 Sets the message handler for a queue.
void smlQueueSend (SmlQueue *queue, void *data)
 Sends a message down a queue.
void smlQueueAttach (SmlQueue *queue, GMainContext *context)
 Sets the queue to use the gmainloop with the given context.
void smlQueueDetach (SmlQueue *queue)
void smlQueueDispatch (SmlQueue *queue)
void * smlQueueTryPop (SmlQueue *queue)
SmlBool smlQueueCheck (SmlQueue *queue)
void smlQueuePushHead (SmlQueue *queue, void *data)
SmlBool smlQueueIsAttached (SmlQueue *queue)
void smlQueueLock (SmlQueue *queue)
void smlQueueUnlock (SmlQueue *queue)
void * smlQueuePeek (SmlQueue *queue)
GList * smlQueuePeekNext (SmlQueue *queue, GList *prev)
void * smlQueueTryPopPrio (SmlQueue *queue)
void smlQueuePushHeadPrio (SmlQueue *queue, void *data)
void smlQueueSendPrio (SmlQueue *queue, void *data)
 Sends a message down a queue.
SmlBool smlQueueCheckPrio (SmlQueue *queue)
void smlQueueDispatchPrio (SmlQueue *queue)
void * smlQueuePeekPrio (SmlQueue *queue)
void smlQueuePrint (SmlQueue *queue)
unsigned int smlQueueLength (SmlQueue *queue)
unsigned int smlQueueLengthPrio (SmlQueue *queue)

Detailed Description

The private part.


Function Documentation

SmlQueue* smlQueueNew ( SmlError **  error)

Creates a new asynchronous queue.

This function return the pointer to a newly created SmlQueue

Definition at line 81 of file sml_queue.c.

Referenced by smlSessionNew(), and smlTransportNew().

Here is the call graph for this function:

void smlQueueSetHandler ( SmlQueue queue,
SmlQueueHandler  handler,
void *  userdata 
)

Sets the message handler for a queue.

Sets the function that will receive all messages, except the methodcall replies

Parameters:
queueThe queue to set the handler on
handlerThe message handler function
user_dataThe userdata that the message handler should receive

Definition at line 384 of file sml_queue.c.

Referenced by smlSessionNew(), and smlTransportInitialize().

void smlQueueSend ( SmlQueue queue,
void *  data 
)

Sends a message down a queue.

Parameters:
queueThe queue to send the message to
messageThe message to send

Definition at line 353 of file sml_queue.c.

Referenced by smlSessionEnd(), smlSessionEndCommand(), smlSessionFlush(), and smlSessionStartCommand().

void smlQueueAttach ( SmlQueue queue,
GMainContext *  context 
)

Sets the queue to use the gmainloop with the given context.

This function will attach the SmlQueue as a source to the given context. The queue will then be check for new messages and the messages will be handled.

Parameters:
queueThe queue to set up
contextThe context to use. NULL for default loop

Definition at line 400 of file sml_queue.c.

Referenced by smlTransportInitialize().

Here is the call graph for this function:

void smlQueueSendPrio ( SmlQueue queue,
void *  data 
)

Sends a message down a queue.

Parameters:
queueThe queue to send the message to
messageThe message to send

Definition at line 323 of file sml_queue.c.

Referenced by smlSessionSendReply().