request.c File Reference

#include "request_p.h"
#include <gwenhywfar/misc.h>
#include <gwenhywfar/db.h>
#include <gwenhywfar/debug.h>
#include <assert.h>
#include <stdlib.h>
#include <strings.h>
#include <gwenhywfar/types.h>
#include <gwenhywfar/gwentime.h>
Include dependency graph for request.c:

Go to the source code of this file.

Functions

void GWEN_IpcRequest_Attach (GWEN_IPC_REQUEST *st)
GWEN_IPC_REQUESTGWEN_IpcRequest_dup (const GWEN_IPC_REQUEST *d)
void GWEN_IpcRequest_free (GWEN_IPC_REQUEST *st)
GWEN_IPC_REQUESTGWEN_IpcRequest_fromDb (GWEN_DB_NODE *db)
const GWEN_TIMEGWEN_IpcRequest_GetExpires (const GWEN_IPC_REQUEST *st)
uint32_t GWEN_IpcRequest_GetId (const GWEN_IPC_REQUEST *st)
uint32_t GWEN_IpcRequest_GetIpcId (const GWEN_IPC_REQUEST *st)
const char * GWEN_IpcRequest_GetName (const GWEN_IPC_REQUEST *st)
GWEN_IPC_REQUEST_STATUS GWEN_IpcRequest_GetStatus (const GWEN_IPC_REQUEST *st)
GWEN_IPC_REQUEST_LISTGWEN_IpcRequest_GetSubRequests (const GWEN_IPC_REQUEST *st)
GWEN_IPC_REQUEST_WORK_FN GWEN_IpcRequest_GetWorkFn (const GWEN_IPC_REQUEST *st)
int GWEN_IpcRequest_IsModified (const GWEN_IPC_REQUEST *st)
GWEN_IPC_REQUESTGWEN_IpcRequest_List2__freeAll_cb (GWEN_IPC_REQUEST *st, void *user_data)
void GWEN_IpcRequest_List2_freeAll (GWEN_IPC_REQUEST_LIST2 *stl)
GWEN_IPC_REQUEST_LISTGWEN_IpcRequest_List_dup (const GWEN_IPC_REQUEST_LIST *stl)
GWEN_IPC_REQUESTGWEN_IpcRequest_new ()
int GWEN_IpcRequest_ReadDb (GWEN_IPC_REQUEST *st, GWEN_DB_NODE *db)
void GWEN_IpcRequest_SetExpires (GWEN_IPC_REQUEST *st, const GWEN_TIME *d)
void GWEN_IpcRequest_SetId (GWEN_IPC_REQUEST *st, uint32_t d)
void GWEN_IpcRequest_SetIpcId (GWEN_IPC_REQUEST *st, uint32_t d)
void GWEN_IpcRequest_SetModified (GWEN_IPC_REQUEST *st, int i)
void GWEN_IpcRequest_SetName (GWEN_IPC_REQUEST *st, const char *d)
void GWEN_IpcRequest_SetStatus (GWEN_IPC_REQUEST *st, GWEN_IPC_REQUEST_STATUS d)
void GWEN_IpcRequest_SetSubRequests (GWEN_IPC_REQUEST *st, GWEN_IPC_REQUEST_LIST *d)
void GWEN_IpcRequest_SetWorkFn (GWEN_IPC_REQUEST *st, GWEN_IPC_REQUEST_WORK_FN d)
GWEN_IPC_REQUEST_STATUS GWEN_IpcRequest_Status_fromString (const char *s)
const char * GWEN_IpcRequest_Status_toString (GWEN_IPC_REQUEST_STATUS v)
int GWEN_IpcRequest_toDb (const GWEN_IPC_REQUEST *st, GWEN_DB_NODE *db)
int GWEN_IpcRequest_WorkFn (GWEN_IPC_REQUEST *st)

Function Documentation

void GWEN_IpcRequest_Attach ( GWEN_IPC_REQUEST st  ) 

Increments the usage counter of the given object, so an additional free() is needed to destroy the object.

Definition at line 355 of file request.c.

GWEN_IPC_REQUEST* GWEN_IpcRequest_dup ( const GWEN_IPC_REQUEST st  ) 

Creates and returns a deep copy of thegiven object.

Definition at line 98 of file request.c.

References GWEN_IpcRequest_List_dup(), GWEN_IpcRequest_new(), and GWEN_Time_dup().

Referenced by GWEN_IpcRequest_List_dup(), and GWEN_IpcRequest_SetSubRequests().

Here is the call graph for this function:

Here is the caller graph for this function:

void GWEN_IpcRequest_free ( GWEN_IPC_REQUEST st  ) 

Destroys the given object.

Definition at line 79 of file request.c.

References GWEN_FREE_OBJECT, GWEN_INHERIT_FINI, GWEN_IpcRequest_List_free(), GWEN_LIST_FINI, and GWEN_Time_free().

Referenced by GWEN_IpcRequest_List2__freeAll_cb(), and GWEN_IpcRequest_ReadDb().

Here is the call graph for this function:

Here is the caller graph for this function:

GWEN_IPC_REQUEST* GWEN_IpcRequest_fromDb ( GWEN_DB_NODE db  ) 

Creates an object from the data in the given GWEN_DB_NODE

Definition at line 193 of file request.c.

References GWEN_IpcRequest_new(), and GWEN_IpcRequest_ReadDb().

Referenced by GWEN_IpcRequest_ReadDb().

Here is the call graph for this function:

Here is the caller graph for this function:

const GWEN_TIME* GWEN_IpcRequest_GetExpires ( const GWEN_IPC_REQUEST el  ) 

Returns the property GWEN_IPC_REQUEST_Expires

Definition at line 256 of file request.c.

uint32_t GWEN_IpcRequest_GetId ( const GWEN_IPC_REQUEST el  ) 

Returns the property GWEN_IPC_REQUEST_Id

Definition at line 206 of file request.c.

uint32_t GWEN_IpcRequest_GetIpcId ( const GWEN_IPC_REQUEST el  ) 

Returns the property GWEN_IPC_REQUEST_IpcId

Definition at line 241 of file request.c.

const char* GWEN_IpcRequest_GetName ( const GWEN_IPC_REQUEST el  ) 

Returns the property GWEN_IPC_REQUEST_Name

Definition at line 221 of file request.c.

GWEN_IPC_REQUEST_STATUS GWEN_IpcRequest_GetStatus ( const GWEN_IPC_REQUEST el  ) 

Returns the property GWEN_IPC_REQUEST_Status

Definition at line 308 of file request.c.

GWEN_IPC_REQUEST_LIST* GWEN_IpcRequest_GetSubRequests ( const GWEN_IPC_REQUEST el  ) 

Returns the property GWEN_IPC_REQUEST_SubRequests

Definition at line 276 of file request.c.

Referenced by GWEN_IpcRequestManager__Work().

Here is the caller graph for this function:

GWEN_IPC_REQUEST_WORK_FN GWEN_IpcRequest_GetWorkFn ( const GWEN_IPC_REQUEST st  ) 

Returns the property GWEN_IPC_REQUEST_WorkFn

Definition at line 321 of file request.c.

int GWEN_IpcRequest_IsModified ( const GWEN_IPC_REQUEST st  ) 

Returns 0 if this object has not been modified, !=0 otherwise

Definition at line 343 of file request.c.

GWEN_IPC_REQUEST* GWEN_IpcRequest_List2__freeAll_cb ( GWEN_IPC_REQUEST st,
void *  user_data 
)

Definition at line 359 of file request.c.

References GWEN_IpcRequest_free().

Referenced by GWEN_IpcRequest_List2_freeAll().

Here is the call graph for this function:

Here is the caller graph for this function:

void GWEN_IpcRequest_List2_freeAll ( GWEN_IPC_REQUEST_LIST2 stl  ) 

Destroys all objects stored in the given LIST2 and the list itself

Definition at line 365 of file request.c.

References GWEN_IpcRequest_List2__freeAll_cb(), GWEN_IpcRequest_List2_ForEach(), and GWEN_IpcRequest_List2_free().

Here is the call graph for this function:

GWEN_IPC_REQUEST_LIST* GWEN_IpcRequest_List_dup ( const GWEN_IPC_REQUEST_LIST stl  ) 

Definition at line 373 of file request.c.

References GWEN_IpcRequest_dup(), GWEN_IpcRequest_List_Add(), GWEN_IpcRequest_List_First(), GWEN_IpcRequest_List_new(), and GWEN_IpcRequest_List_Next().

Referenced by GWEN_IpcRequest_dup().

Here is the call graph for this function:

Here is the caller graph for this function:

GWEN_IPC_REQUEST* GWEN_IpcRequest_new (  ) 

Creates a new object.

Definition at line 67 of file request.c.

References GWEN_INHERIT_INIT, GWEN_IpcRequest_List_new(), GWEN_LIST_INIT, and GWEN_NEW_OBJECT.

Referenced by GWEN_IpcRequest_dup(), and GWEN_IpcRequest_fromDb().

Here is the call graph for this function:

Here is the caller graph for this function:

int GWEN_IpcRequest_ReadDb ( GWEN_IPC_REQUEST st,
GWEN_DB_NODE db 
)
void GWEN_IpcRequest_SetExpires ( GWEN_IPC_REQUEST el,
const GWEN_TIME d 
)

Set the property GWEN_IPC_REQUEST_Expires

Definition at line 262 of file request.c.

References GWEN_Time_dup(), and GWEN_Time_free().

Here is the call graph for this function:

void GWEN_IpcRequest_SetId ( GWEN_IPC_REQUEST el,
uint32_t  d 
)

Set the property GWEN_IPC_REQUEST_Id

Definition at line 212 of file request.c.

Referenced by GWEN_IpcRequest_ReadDb().

Here is the caller graph for this function:

void GWEN_IpcRequest_SetIpcId ( GWEN_IPC_REQUEST el,
uint32_t  d 
)

Set the property GWEN_IPC_REQUEST_IpcId

Definition at line 247 of file request.c.

Referenced by GWEN_IpcRequest_ReadDb().

Here is the caller graph for this function:

void GWEN_IpcRequest_SetModified ( GWEN_IPC_REQUEST st,
int  i 
)

Sets the modified state of the given object

Definition at line 349 of file request.c.

void GWEN_IpcRequest_SetName ( GWEN_IPC_REQUEST el,
const char *  d 
)

Set the property GWEN_IPC_REQUEST_Name

Definition at line 227 of file request.c.

Referenced by GWEN_IpcRequest_ReadDb().

Here is the caller graph for this function:

void GWEN_IpcRequest_SetStatus ( GWEN_IPC_REQUEST el,
GWEN_IPC_REQUEST_STATUS  d 
)

Set the property GWEN_IPC_REQUEST_Status

Definition at line 314 of file request.c.

Referenced by GWEN_IpcRequest_ReadDb().

Here is the caller graph for this function:

void GWEN_IpcRequest_SetSubRequests ( GWEN_IPC_REQUEST el,
GWEN_IPC_REQUEST_LIST d 
)
void GWEN_IpcRequest_SetWorkFn ( GWEN_IPC_REQUEST st,
GWEN_IPC_REQUEST_WORK_FN  d 
)

Set the property GWEN_IPC_REQUEST_WorkFn

Definition at line 327 of file request.c.

GWEN_IPC_REQUEST_STATUS GWEN_IpcRequest_Status_fromString ( const char *  s  ) 
const char* GWEN_IpcRequest_Status_toString ( GWEN_IPC_REQUEST_STATUS  v  ) 

Definition at line 42 of file request.c.

References GWEN_IpcRequest_StatusAnswered, GWEN_IpcRequest_StatusFinished, GWEN_IpcRequest_StatusNew, GWEN_IpcRequest_StatusPartial, and GWEN_IpcRequest_StatusSent.

Referenced by GWEN_IpcRequest_toDb().

Here is the caller graph for this function:

int GWEN_IpcRequest_toDb ( const GWEN_IPC_REQUEST st,
GWEN_DB_NODE db 
)

Stores an object in the given GWEN_DB_NODE

Definition at line 116 of file request.c.

References GWEN_DB_FLAGS_DEFAULT, GWEN_DB_FLAGS_OVERWRITE_VARS, GWEN_DB_GetGroup(), GWEN_DB_SetCharValue(), GWEN_DB_SetIntValue(), GWEN_IpcRequest_List_First(), GWEN_IpcRequest_List_Next(), GWEN_IpcRequest_Status_toString(), GWEN_IpcRequest_toDb(), GWEN_PATH_FLAGS_CREATE_GROUP, and GWEN_Time_toDb().

Referenced by GWEN_IpcRequest_toDb().

Here is the call graph for this function:

Here is the caller graph for this function:

int GWEN_IpcRequest_WorkFn ( GWEN_IPC_REQUEST st  ) 

Definition at line 333 of file request.c.

Referenced by GWEN_IpcRequestManager__Work().

Here is the caller graph for this function:

Generated on Mon Jul 5 22:57:23 2010 for gwenhywfar by  doxygen 1.6.3