gwenhywfar 5.10.1
Functions
url.c File Reference
#include "url_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/urlfns.h>
Include dependency graph for url.c:

Go to the source code of this file.

Functions

void GWEN_Url_Attach (GWEN_URL *st)
 
GWEN_URLGWEN_Url_dup (const GWEN_URL *d)
 
void GWEN_Url_free (GWEN_URL *st)
 
GWEN_URLGWEN_Url_fromDb (GWEN_DB_NODE *db)
 
const char * GWEN_Url_GetPassword (const GWEN_URL *st)
 
const char * GWEN_Url_GetPath (const GWEN_URL *st)
 
int GWEN_Url_GetPort (const GWEN_URL *st)
 
const char * GWEN_Url_GetProtocol (const GWEN_URL *st)
 
const char * GWEN_Url_GetServer (const GWEN_URL *st)
 
const char * GWEN_Url_GetUrl (const GWEN_URL *st)
 
const char * GWEN_Url_GetUserName (const GWEN_URL *st)
 
GWEN_DB_NODEGWEN_Url_GetVars (const GWEN_URL *st)
 
int GWEN_Url_IsModified (const GWEN_URL *st)
 
static GWEN_URLGWEN_Url_List2__freeAll_cb (GWEN_URL *st, GWEN_UNUSED void *user_data)
 
void GWEN_Url_List2_freeAll (GWEN_URL_LIST2 *stl)
 
GWEN_URL_LISTGWEN_Url_List_dup (const GWEN_URL_LIST *stl)
 
GWEN_URLGWEN_Url_new (void)
 
int GWEN_Url_ReadDb (GWEN_URL *st, GWEN_DB_NODE *db)
 
void GWEN_Url_SetModified (GWEN_URL *st, int i)
 
void GWEN_Url_SetPassword (GWEN_URL *st, const char *d)
 
void GWEN_Url_SetPath (GWEN_URL *st, const char *d)
 
void GWEN_Url_SetPort (GWEN_URL *st, int d)
 
void GWEN_Url_SetProtocol (GWEN_URL *st, const char *d)
 
void GWEN_Url_SetServer (GWEN_URL *st, const char *d)
 
void GWEN_Url_SetUrl (GWEN_URL *st, const char *d)
 
void GWEN_Url_SetUserName (GWEN_URL *st, const char *d)
 
void GWEN_Url_SetVars (GWEN_URL *st, GWEN_DB_NODE *d)
 
int GWEN_Url_toDb (const GWEN_URL *st, GWEN_DB_NODE *db)
 

Function Documentation

◆ GWEN_Url_Attach()

void GWEN_Url_Attach ( GWEN_URL st)

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

Definition at line 349 of file url.c.

◆ GWEN_Url_dup()

GWEN_URL * GWEN_Url_dup ( const GWEN_URL st)

Creates and returns a deep copy of thegiven object.

Definition at line 67 of file url.c.

References GWEN_DB_Group_dup(), GWEN_DB_Group_free(), and GWEN_Url_new().

Referenced by GWEN_Url_List_dup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Url_free()

void GWEN_Url_free ( GWEN_URL st)

Destroys the given object.

Definition at line 40 of file url.c.

References GWEN_DB_Group_free(), GWEN_FREE_OBJECT, and GWEN_LIST_FINI.

Referenced by _setHostHeaderFromUrl(), GWEN_ConfigMgr_Factory(), GWEN_ConfigMgrDir_new(), GWEN_Gui_ExtendSyncIo(), GWEN_Gui_Internal_GetSyncIo(), GWEN_Url_fromString(), and GWEN_Url_List2__freeAll_cb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Url_fromDb()

GWEN_URL * GWEN_Url_fromDb ( GWEN_DB_NODE db)

Creates an object from the data in the given GWEN_DB_NODE

Definition at line 150 of file url.c.

References GWEN_Url_new(), and GWEN_Url_ReadDb().

Here is the call graph for this function:

◆ GWEN_Url_GetPassword()

const char * GWEN_Url_GetPassword ( const GWEN_URL el)

Returns the property GWEN_URL_Password

Definition at line 269 of file url.c.

◆ GWEN_Url_GetPath()

const char * GWEN_Url_GetPath ( const GWEN_URL el)

Returns the property GWEN_URL_Path

Definition at line 225 of file url.c.

Referenced by GWEN_ConfigMgrDir_new().

Here is the caller graph for this function:

◆ GWEN_Url_GetPort()

int GWEN_Url_GetPort ( const GWEN_URL el)

Returns the property GWEN_URL_Port

Definition at line 208 of file url.c.

Referenced by GWEN_Gui_ExtendSyncIo(), and GWEN_Gui_Internal_GetSyncIo().

Here is the caller graph for this function:

◆ GWEN_Url_GetProtocol()

const char * GWEN_Url_GetProtocol ( const GWEN_URL el)

Returns the property GWEN_URL_Protocol

Definition at line 164 of file url.c.

Referenced by GWEN_ConfigMgr_Factory(), GWEN_Gui_ExtendSyncIo(), and GWEN_Gui_Internal_GetSyncIo().

Here is the caller graph for this function:

◆ GWEN_Url_GetServer()

const char * GWEN_Url_GetServer ( const GWEN_URL el)

Returns the property GWEN_URL_Server

Definition at line 186 of file url.c.

Referenced by _setHostHeaderFromUrl(), GWEN_ConfigMgrDir_new(), GWEN_Gui_ExtendSyncIo(), and GWEN_Gui_Internal_GetSyncIo().

Here is the caller graph for this function:

◆ GWEN_Url_GetUrl()

const char * GWEN_Url_GetUrl ( const GWEN_URL st)

Definition at line 313 of file url.c.

◆ GWEN_Url_GetUserName()

const char * GWEN_Url_GetUserName ( const GWEN_URL el)

Returns the property GWEN_URL_UserName

Definition at line 247 of file url.c.

◆ GWEN_Url_GetVars()

GWEN_DB_NODE * GWEN_Url_GetVars ( const GWEN_URL el)

Returns the property GWEN_URL_Vars

Definition at line 291 of file url.c.

Referenced by GWEN_Url_fromCommandString(), and GWEN_Url_fromString().

Here is the caller graph for this function:

◆ GWEN_Url_IsModified()

int GWEN_Url_IsModified ( const GWEN_URL st)

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

Definition at line 335 of file url.c.

◆ GWEN_Url_List2__freeAll_cb()

GWEN_URL * GWEN_Url_List2__freeAll_cb ( GWEN_URL st,
GWEN_UNUSED void *  user_data 
)
static

Definition at line 354 of file url.c.

References GWEN_Url_free().

Referenced by GWEN_Url_List2_freeAll().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Url_List2_freeAll()

void GWEN_Url_List2_freeAll ( GWEN_URL_LIST2 stl)

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

Definition at line 361 of file url.c.

References GWEN_Url_List2__freeAll_cb(), GWEN_Url_List2_ForEach(), and GWEN_Url_List2_free().

Here is the call graph for this function:

◆ GWEN_Url_List_dup()

GWEN_URL_LIST * GWEN_Url_List_dup ( const GWEN_URL_LIST stl)

Definition at line 370 of file url.c.

References GWEN_Url_dup(), GWEN_Url_List_Add(), GWEN_Url_List_First(), GWEN_Url_List_new(), and GWEN_Url_List_Next().

Here is the call graph for this function:

◆ GWEN_Url_new()

GWEN_URL * GWEN_Url_new ( void  )

Creates a new object.

Definition at line 28 of file url.c.

References GWEN_DB_Group_new(), GWEN_LIST_INIT, and GWEN_NEW_OBJECT.

Referenced by GWEN_Url_dup(), GWEN_Url_fromCommandString(), GWEN_Url_fromDb(), and GWEN_Url_fromString().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Url_ReadDb()

int GWEN_Url_ReadDb ( GWEN_URL st,
GWEN_DB_NODE db 
)

Reads data from a GWEN_DB.

Definition at line 125 of file url.c.

References GWEN_DB_GetCharValue(), GWEN_DB_GetGroup(), GWEN_DB_GetIntValue(), GWEN_DB_Group_dup(), GWEN_DB_Group_free(), GWEN_PATH_FLAGS_NAMEMUSTEXIST, GWEN_Url_SetPassword(), GWEN_Url_SetPath(), GWEN_Url_SetPort(), GWEN_Url_SetProtocol(), GWEN_Url_SetServer(), GWEN_Url_SetUrl(), and GWEN_Url_SetUserName().

Referenced by GWEN_Url_fromDb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Url_SetModified()

void GWEN_Url_SetModified ( GWEN_URL st,
int  i 
)

Sets the modified state of the given object

Definition at line 342 of file url.c.

◆ GWEN_Url_SetPassword()

void GWEN_Url_SetPassword ( GWEN_URL el,
const char *  d 
)

Set the property GWEN_URL_Password

Definition at line 276 of file url.c.

Referenced by GWEN_Url_fromString(), and GWEN_Url_ReadDb().

Here is the caller graph for this function:

◆ GWEN_Url_SetPath()

void GWEN_Url_SetPath ( GWEN_URL el,
const char *  d 
)

Set the property GWEN_URL_Path

Definition at line 232 of file url.c.

Referenced by GWEN_Url_fromCommandString(), GWEN_Url_fromString(), and GWEN_Url_ReadDb().

Here is the caller graph for this function:

◆ GWEN_Url_SetPort()

void GWEN_Url_SetPort ( GWEN_URL el,
int  d 
)

Set the property GWEN_URL_Port

Definition at line 215 of file url.c.

Referenced by GWEN_Url_ReadDb().

Here is the caller graph for this function:

◆ GWEN_Url_SetProtocol()

void GWEN_Url_SetProtocol ( GWEN_URL el,
const char *  d 
)

Set the property GWEN_URL_Protocol

Definition at line 171 of file url.c.

Referenced by GWEN_Url_fromString(), and GWEN_Url_ReadDb().

Here is the caller graph for this function:

◆ GWEN_Url_SetServer()

void GWEN_Url_SetServer ( GWEN_URL el,
const char *  d 
)

Set the property GWEN_URL_Server

Definition at line 193 of file url.c.

Referenced by GWEN_Url_fromString(), and GWEN_Url_ReadDb().

Here is the caller graph for this function:

◆ GWEN_Url_SetUrl()

void GWEN_Url_SetUrl ( GWEN_URL st,
const char *  d 
)

Definition at line 320 of file url.c.

Referenced by GWEN_Url_ReadDb().

Here is the caller graph for this function:

◆ GWEN_Url_SetUserName()

void GWEN_Url_SetUserName ( GWEN_URL el,
const char *  d 
)

Set the property GWEN_URL_UserName

Definition at line 254 of file url.c.

Referenced by GWEN_Url_fromString(), and GWEN_Url_ReadDb().

Here is the caller graph for this function:

◆ GWEN_Url_SetVars()

void GWEN_Url_SetVars ( GWEN_URL el,
GWEN_DB_NODE d 
)

Set the property GWEN_URL_Vars

Definition at line 298 of file url.c.

References GWEN_DB_Group_dup(), and GWEN_DB_Group_free().

Referenced by GWEN_Url_fromCommandString(), and GWEN_Url_fromString().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Url_toDb()

int GWEN_Url_toDb ( const GWEN_URL st,
GWEN_DB_NODE db 
)

Stores an object in the given GWEN_DB_NODE

Definition at line 94 of file url.c.

References GWEN_DB_AddGroupChildren(), GWEN_DB_FLAGS_DEFAULT, GWEN_DB_FLAGS_OVERWRITE_VARS, GWEN_DB_GetGroup(), GWEN_DB_SetCharValue(), and GWEN_DB_SetIntValue().

Here is the call graph for this function: