SyncML Queue Internals
libsyncml API 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

SmlQueue * | smlQueueNew (SmlError **error)
| Creates a new asynchronous queue. More...
void | smlQueueFree (SmlQueue *queue)
void | smlQueueFlush (SmlQueue *queue)
void | smlQueueSetHandler (SmlQueue *queue, SmlQueueHandler handler, void *userdata)
| Sets the message handler for a queue. More...
void | smlQueueSend (SmlQueue *queue, void *data)
| Sends a message down a queue. More...
void | smlQueueAttach (SmlQueue *queue, GMainContext *context)
| Sets the queue to use the gmainloop with the given context. More...
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. More...
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

  queue | The queue to set the handler on
  handler | The message handler function
  user_data | The 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

  queue | The queue to send the message to
  message | The 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

  queue | The queue to set up
  context | The 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

  queue | The queue to send the message to
  message | The message to send

Definition at line 323 of file sml_queue.c.

Referenced by smlSessionSendReply().