#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>
Go to the source code of this file.
void GWEN_IpcRequest_Attach | ( | GWEN_IPC_REQUEST * | st | ) |
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().
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().
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().
const GWEN_TIME* GWEN_IpcRequest_GetExpires | ( | const GWEN_IPC_REQUEST * | el | ) |
Returns the property GWEN_IPC_REQUEST_Expires
uint32_t GWEN_IpcRequest_GetId | ( | const GWEN_IPC_REQUEST * | el | ) |
Returns the property GWEN_IPC_REQUEST_Id
uint32_t GWEN_IpcRequest_GetIpcId | ( | const GWEN_IPC_REQUEST * | el | ) |
Returns the property GWEN_IPC_REQUEST_IpcId
const char* GWEN_IpcRequest_GetName | ( | const GWEN_IPC_REQUEST * | el | ) |
Returns the property GWEN_IPC_REQUEST_Name
GWEN_IPC_REQUEST_STATUS GWEN_IpcRequest_GetStatus | ( | const GWEN_IPC_REQUEST * | el | ) |
Returns the property GWEN_IPC_REQUEST_Status
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().
GWEN_IPC_REQUEST_WORK_FN GWEN_IpcRequest_GetWorkFn | ( | const GWEN_IPC_REQUEST * | st | ) |
int GWEN_IpcRequest_IsModified | ( | const GWEN_IPC_REQUEST * | st | ) |
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().
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().
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().
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().
int GWEN_IpcRequest_ReadDb | ( | GWEN_IPC_REQUEST * | st, | |
GWEN_DB_NODE * | db | |||
) |
Reads data from a GWEN_DB.
Definition at line 149 of file request.c.
References DBG_ERROR, GWEN_DB_Dump(), GWEN_DB_FindFirstGroup(), GWEN_DB_FindNextGroup(), GWEN_DB_GetCharValue(), GWEN_DB_GetGroup(), GWEN_DB_GetIntValue(), GWEN_IpcRequest_free(), GWEN_IpcRequest_fromDb(), GWEN_IpcRequest_List_Add(), GWEN_IpcRequest_List_new(), GWEN_IpcRequest_SetId(), GWEN_IpcRequest_SetIpcId(), GWEN_IpcRequest_SetName(), GWEN_IpcRequest_SetStatus(), GWEN_IpcRequest_Status_fromString(), GWEN_Logger_GetLevel(), GWEN_LoggerLevel_Debug, GWEN_PATH_FLAGS_NAMEMUSTEXIST, GWEN_Time_free(), and GWEN_Time_fromDb().
Referenced by GWEN_IpcRequest_fromDb().
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().
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().
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().
void GWEN_IpcRequest_SetModified | ( | GWEN_IPC_REQUEST * | st, | |
int | i | |||
) |
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().
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().
void GWEN_IpcRequest_SetSubRequests | ( | GWEN_IPC_REQUEST * | el, | |
GWEN_IPC_REQUEST_LIST * | d | |||
) |
Set the property GWEN_IPC_REQUEST_SubRequests
Definition at line 282 of file request.c.
References GWEN_IpcRequest_dup(), GWEN_IpcRequest_List_Add(), GWEN_IpcRequest_List_First(), GWEN_IpcRequest_List_free(), GWEN_IpcRequest_List_new(), and GWEN_IpcRequest_List_Next().
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 | ) |
Definition at line 25 of file request.c.
References GWEN_IpcRequest_StatusAnswered, GWEN_IpcRequest_StatusFinished, GWEN_IpcRequest_StatusNew, GWEN_IpcRequest_StatusPartial, GWEN_IpcRequest_StatusSent, and GWEN_IpcRequest_StatusUnknown.
Referenced by GWEN_IpcRequest_ReadDb().
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().
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().
int GWEN_IpcRequest_WorkFn | ( | GWEN_IPC_REQUEST * | st | ) |