request.h File Reference

#include <gwenhywfar/db.h>
#include <gwenhywfar/inherit.h>
#include <gwenhywfar/misc.h>
#include <gwenhywfar/list2.h>
#include <gwenhywfar/types.h>
#include <gwenhywfar/gwentime.h>

Go to the source code of this file.

Typedefs

typedef struct GWEN_IPC_REQUEST GWEN_IPC_REQUEST
typedef int(* GWEN_IPC_REQUEST_WORK_FN )(GWEN_IPC_REQUEST *st)

Enumerations

enum  GWEN_IPC_REQUEST_STATUS {
  GWEN_IpcRequest_StatusUnknown = -1, GWEN_IpcRequest_StatusNew = 0, GWEN_IpcRequest_StatusSent, GWEN_IpcRequest_StatusPartial,
  GWEN_IpcRequest_StatusAnswered, GWEN_IpcRequest_StatusFinished
}

Functions

GWENHYWFAR_API void GWEN_IpcRequest_Attach (GWEN_IPC_REQUEST *st)
GWENHYWFAR_API GWEN_IPC_REQUESTGWEN_IpcRequest_dup (const GWEN_IPC_REQUEST *st)
GWENHYWFAR_API void GWEN_IpcRequest_free (GWEN_IPC_REQUEST *st)
GWENHYWFAR_API GWEN_IPC_REQUESTGWEN_IpcRequest_fromDb (GWEN_DB_NODE *db)
GWENHYWFAR_API const GWEN_TIMEGWEN_IpcRequest_GetExpires (const GWEN_IPC_REQUEST *el)
GWENHYWFAR_API uint32_t GWEN_IpcRequest_GetId (const GWEN_IPC_REQUEST *el)
GWENHYWFAR_API uint32_t GWEN_IpcRequest_GetIpcId (const GWEN_IPC_REQUEST *el)
GWENHYWFAR_API const char * GWEN_IpcRequest_GetName (const GWEN_IPC_REQUEST *el)
GWENHYWFAR_API
GWEN_IPC_REQUEST_STATUS 
GWEN_IpcRequest_GetStatus (const GWEN_IPC_REQUEST *el)
GWENHYWFAR_API
GWEN_IPC_REQUEST_LIST
GWEN_IpcRequest_GetSubRequests (const GWEN_IPC_REQUEST *el)
GWENHYWFAR_API
GWEN_IPC_REQUEST_WORK_FN 
GWEN_IpcRequest_GetWorkFn (const GWEN_IPC_REQUEST *st)
GWENHYWFAR_API int GWEN_IpcRequest_IsModified (const GWEN_IPC_REQUEST *st)
GWENHYWFAR_API
GWEN_IPC_REQUEST_LIST2
GWEN_IpcRequest_List2_dup (const GWEN_IPC_REQUEST_LIST2 *stl)
GWENHYWFAR_API void GWEN_IpcRequest_List2_freeAll (GWEN_IPC_REQUEST_LIST2 *stl)
GWEN_IPC_REQUEST_LISTGWEN_IpcRequest_List_dup (const GWEN_IPC_REQUEST_LIST *stl)
GWENHYWFAR_API GWEN_IPC_REQUESTGWEN_IpcRequest_new ()
GWENHYWFAR_API void GWEN_IpcRequest_SetExpires (GWEN_IPC_REQUEST *el, const GWEN_TIME *d)
GWENHYWFAR_API void GWEN_IpcRequest_SetId (GWEN_IPC_REQUEST *el, uint32_t d)
GWENHYWFAR_API void GWEN_IpcRequest_SetIpcId (GWEN_IPC_REQUEST *el, uint32_t d)
GWENHYWFAR_API void GWEN_IpcRequest_SetModified (GWEN_IPC_REQUEST *st, int i)
GWENHYWFAR_API void GWEN_IpcRequest_SetName (GWEN_IPC_REQUEST *el, const char *d)
GWENHYWFAR_API void GWEN_IpcRequest_SetStatus (GWEN_IPC_REQUEST *el, GWEN_IPC_REQUEST_STATUS d)
GWENHYWFAR_API void GWEN_IpcRequest_SetSubRequests (GWEN_IPC_REQUEST *el, GWEN_IPC_REQUEST_LIST *d)
GWENHYWFAR_API 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)
GWENHYWFAR_API int GWEN_IpcRequest_toDb (const GWEN_IPC_REQUEST *st, GWEN_DB_NODE *db)
GWENHYWFAR_API int GWEN_IpcRequest_WorkFn (GWEN_IPC_REQUEST *st)


Typedef Documentation

Definition at line 68 of file request.h.

Definition at line 102 of file request.h.


Enumeration Type Documentation

Enumerator:
GWEN_IpcRequest_StatusUnknown 
GWEN_IpcRequest_StatusNew  New request.
GWEN_IpcRequest_StatusSent  Request has been sent, no answer has been received.
GWEN_IpcRequest_StatusPartial  Request has been answered partially.
GWEN_IpcRequest_StatusAnswered  Request has been answered completely..
GWEN_IpcRequest_StatusFinished  Request has been finished.

Definition at line 85 of file request.h.


Function Documentation

GWENHYWFAR_API 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 324 of file request.c.

GWENHYWFAR_API GWEN_IPC_REQUEST* GWEN_IpcRequest_dup ( const GWEN_IPC_REQUEST st  ) 

Creates and returns a deep copy of thegiven object.

Definition at line 87 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().

GWENHYWFAR_API void GWEN_IpcRequest_free ( GWEN_IPC_REQUEST st  ) 

Destroys the given object.

Definition at line 74 of file request.c.

References GWEN_FREE_OBJECT, GWEN_INHERIT_FINI, and GWEN_LIST_FINI.

Referenced by GWEN_IpcRequest_fromDb(), and GWEN_IpcRequest_List2__freeAll_cb().

GWENHYWFAR_API GWEN_IPC_REQUEST* GWEN_IpcRequest_fromDb ( GWEN_DB_NODE db  ) 

GWENHYWFAR_API const GWEN_TIME* GWEN_IpcRequest_GetExpires ( const GWEN_IPC_REQUEST el  ) 

Returns the property GWEN_IPC_REQUEST_Expires

Definition at line 229 of file request.c.

GWENHYWFAR_API uint32_t GWEN_IpcRequest_GetId ( const GWEN_IPC_REQUEST el  ) 

Returns the property GWEN_IPC_REQUEST_Id

Definition at line 181 of file request.c.

GWENHYWFAR_API uint32_t GWEN_IpcRequest_GetIpcId ( const GWEN_IPC_REQUEST el  ) 

Returns the property GWEN_IPC_REQUEST_IpcId

Definition at line 214 of file request.c.

GWENHYWFAR_API const char* GWEN_IpcRequest_GetName ( const GWEN_IPC_REQUEST el  ) 

Returns the property GWEN_IPC_REQUEST_Name

Definition at line 196 of file request.c.

GWENHYWFAR_API GWEN_IPC_REQUEST_STATUS GWEN_IpcRequest_GetStatus ( const GWEN_IPC_REQUEST el  ) 

Returns the property GWEN_IPC_REQUEST_Status

Definition at line 277 of file request.c.

GWENHYWFAR_API GWEN_IPC_REQUEST_LIST* GWEN_IpcRequest_GetSubRequests ( const GWEN_IPC_REQUEST el  ) 

Returns the property GWEN_IPC_REQUEST_SubRequests

Definition at line 247 of file request.c.

Referenced by GWEN_IpcRequestManager__Work().

GWENHYWFAR_API GWEN_IPC_REQUEST_WORK_FN GWEN_IpcRequest_GetWorkFn ( const GWEN_IPC_REQUEST st  ) 

Returns the property GWEN_IPC_REQUEST_WorkFn

Definition at line 290 of file request.c.

GWENHYWFAR_API int GWEN_IpcRequest_IsModified ( const GWEN_IPC_REQUEST st  ) 

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

Definition at line 312 of file request.c.

GWENHYWFAR_API GWEN_IPC_REQUEST_LIST2* GWEN_IpcRequest_List2_dup ( const GWEN_IPC_REQUEST_LIST2 stl  ) 

Creates a deep copy of the given LIST2.

GWENHYWFAR_API 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 334 of file request.c.

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

GWEN_IPC_REQUEST_LIST* GWEN_IpcRequest_List_dup ( const GWEN_IPC_REQUEST_LIST stl  ) 

GWENHYWFAR_API GWEN_IPC_REQUEST* GWEN_IpcRequest_new (  ) 

Creates a new object.

Definition at line 62 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().

GWENHYWFAR_API void GWEN_IpcRequest_SetExpires ( GWEN_IPC_REQUEST el,
const GWEN_TIME d 
)

Set the property GWEN_IPC_REQUEST_Expires

Definition at line 235 of file request.c.

References GWEN_Time_dup().

GWENHYWFAR_API void GWEN_IpcRequest_SetId ( GWEN_IPC_REQUEST el,
uint32_t  d 
)

Set the property GWEN_IPC_REQUEST_Id

Definition at line 187 of file request.c.

Referenced by GWEN_IpcRequest_fromDb().

GWENHYWFAR_API void GWEN_IpcRequest_SetIpcId ( GWEN_IPC_REQUEST el,
uint32_t  d 
)

Set the property GWEN_IPC_REQUEST_IpcId

Definition at line 220 of file request.c.

Referenced by GWEN_IpcRequest_fromDb().

GWENHYWFAR_API void GWEN_IpcRequest_SetModified ( GWEN_IPC_REQUEST st,
int  i 
)

Sets the modified state of the given object

Definition at line 318 of file request.c.

GWENHYWFAR_API void GWEN_IpcRequest_SetName ( GWEN_IPC_REQUEST el,
const char *  d 
)

Set the property GWEN_IPC_REQUEST_Name

Definition at line 202 of file request.c.

Referenced by GWEN_IpcRequest_fromDb().

GWENHYWFAR_API void GWEN_IpcRequest_SetStatus ( GWEN_IPC_REQUEST el,
GWEN_IPC_REQUEST_STATUS  d 
)

Set the property GWEN_IPC_REQUEST_Status

Definition at line 283 of file request.c.

Referenced by GWEN_IpcRequest_fromDb().

GWENHYWFAR_API void GWEN_IpcRequest_SetSubRequests ( GWEN_IPC_REQUEST el,
GWEN_IPC_REQUEST_LIST d 
)

GWENHYWFAR_API void GWEN_IpcRequest_SetWorkFn ( GWEN_IPC_REQUEST st,
GWEN_IPC_REQUEST_WORK_FN  d 
)

Set the property GWEN_IPC_REQUEST_WorkFn

Definition at line 296 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  ) 

GWENHYWFAR_API int GWEN_IpcRequest_toDb ( const GWEN_IPC_REQUEST st,
GWEN_DB_NODE db 
)

GWENHYWFAR_API int GWEN_IpcRequest_WorkFn ( GWEN_IPC_REQUEST st  ) 

Definition at line 302 of file request.c.

Referenced by GWEN_IpcRequestManager__Work().


Generated on Fri Apr 11 01:53:50 2008 for gwenhywfar by  doxygen 1.5.5