plugindescr.c File Reference

#include "plugindescr_p.h"
#include "i18n_l.h"
#include <gwenhywfar/buffer.h>
#include <gwenhywfar/debug.h>
#include <gwenhywfar/directory.h>
#include <gwenhywfar/bio_buffer.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <string.h>
Include dependency graph for plugindescr.c:

Go to the source code of this file.

Functions

GWEN_PLUGIN_DESCRIPTION_LIST2GWEN_LoadPluginDescrs (const char *path)
int GWEN_LoadPluginDescrsByType (const char *path, const char *type, GWEN_PLUGIN_DESCRIPTION_LIST2 *pdl)
int GWEN_PluginDescription__GetLocalizedLongDescrByFormat (const GWEN_PLUGIN_DESCRIPTION *pd, const char *s, const char *lang, GWEN_BUFFER *buf)
int GWEN_PluginDescription__GetLongDescrByFormat (const GWEN_PLUGIN_DESCRIPTION *pd, const char *s, GWEN_BUFFER *buf)
GWEN_PLUGIN_DESCRIPTIONGWEN_PluginDescription_dup (const GWEN_PLUGIN_DESCRIPTION *pd)
void GWEN_PluginDescription_free (GWEN_PLUGIN_DESCRIPTION *pd)
const char * GWEN_PluginDescription_GetAuthor (const GWEN_PLUGIN_DESCRIPTION *pd)
const char * GWEN_PluginDescription_GetFileName (const GWEN_PLUGIN_DESCRIPTION *pd)
const char * GWEN_PluginDescription_GetLongDescr (const GWEN_PLUGIN_DESCRIPTION *pd)
int GWEN_PluginDescription_GetLongDescrByFormat (const GWEN_PLUGIN_DESCRIPTION *pd, const char *s, GWEN_BUFFER *buf)
const char * GWEN_PluginDescription_GetName (const GWEN_PLUGIN_DESCRIPTION *pd)
const char * GWEN_PluginDescription_GetPath (const GWEN_PLUGIN_DESCRIPTION *pd)
const char * GWEN_PluginDescription_GetShortDescr (const GWEN_PLUGIN_DESCRIPTION *pd)
const char * GWEN_PluginDescription_GetType (const GWEN_PLUGIN_DESCRIPTION *pd)
const char * GWEN_PluginDescription_GetVersion (const GWEN_PLUGIN_DESCRIPTION *pd)
GWEN_XMLNODEGWEN_PluginDescription_GetXmlNode (const GWEN_PLUGIN_DESCRIPTION *pd)
int GWEN_PluginDescription_IsActive (const GWEN_PLUGIN_DESCRIPTION *pd)
void GWEN_PluginDescription_List2_freeAll (GWEN_PLUGIN_DESCRIPTION_LIST2 *pdl)
GWEN_PLUGIN_DESCRIPTIONGWEN_PluginDescription_List2_freeAll_cb (GWEN_PLUGIN_DESCRIPTION *pd, __attribute__((unused)) void *user_data)
GWEN_PLUGIN_DESCRIPTIONGWEN_PluginDescription_new (GWEN_XMLNODE *node)
void GWEN_PluginDescription_SetFileName (GWEN_PLUGIN_DESCRIPTION *pd, const char *s)
void GWEN_PluginDescription_SetIsActive (GWEN_PLUGIN_DESCRIPTION *pd, int i)
void GWEN_PluginDescription_SetPath (GWEN_PLUGIN_DESCRIPTION *pd, const char *s)

Function Documentation

GWEN_PLUGIN_DESCRIPTION_LIST2* GWEN_LoadPluginDescrs ( const char *  path  ) 
int GWEN_LoadPluginDescrsByType ( const char *  path,
const char *  type,
GWEN_PLUGIN_DESCRIPTION_LIST2 pdl 
)
int GWEN_PluginDescription__GetLocalizedLongDescrByFormat ( const GWEN_PLUGIN_DESCRIPTION pd,
const char *  s,
const char *  lang,
GWEN_BUFFER buf 
)

Definition at line 266 of file plugindescr.c.

References DBG_INFO, GWEN_LOGDOMAIN, GWEN_XML_FLAGS_TOLERANT_ENDTAGS, GWEN_XMLNode_FindFirstTag(), GWEN_XMLNode_FindNextTag(), GWEN_XMLNode_GetProperty(), and GWEN_XMLNode_toBuffer().

Referenced by GWEN_PluginDescription_GetLongDescrByFormat().

Here is the call graph for this function:

Here is the caller graph for this function:

int GWEN_PluginDescription__GetLongDescrByFormat ( const GWEN_PLUGIN_DESCRIPTION pd,
const char *  s,
GWEN_BUFFER buf 
)

Definition at line 234 of file plugindescr.c.

References DBG_INFO, GWEN_LOGDOMAIN, GWEN_XML_FLAGS_TOLERANT_ENDTAGS, GWEN_XMLNode_FindFirstTag(), GWEN_XMLNode_FindNextTag(), GWEN_XMLNode_GetProperty(), and GWEN_XMLNode_toBuffer().

Referenced by GWEN_PluginDescription_GetLongDescrByFormat().

Here is the call graph for this function:

Here is the caller graph for this function:

GWEN_PLUGIN_DESCRIPTION* GWEN_PluginDescription_dup ( const GWEN_PLUGIN_DESCRIPTION pd  ) 

Definition at line 116 of file plugindescr.c.

References DBG_MEM_INC, GWEN_LIST_INIT, GWEN_NEW_OBJECT, and GWEN_XMLNode_dup().

Referenced by GWEN_Crypt_Token_PluginManager_GetPluginDescrs(), and GWEN_PluginManager_GetPluginDescr().

Here is the call graph for this function:

Here is the caller graph for this function:

void GWEN_PluginDescription_free ( GWEN_PLUGIN_DESCRIPTION pd  ) 

Definition at line 96 of file plugindescr.c.

References DBG_MEM_DEC, GWEN_FREE_OBJECT, GWEN_LIST_FINI, and GWEN_XMLNode_free().

Referenced by GWEN_PluginDescription_List2_freeAll_cb(), and GWEN_PluginDescription_new().

Here is the call graph for this function:

Here is the caller graph for this function:

const char* GWEN_PluginDescription_GetAuthor ( const GWEN_PLUGIN_DESCRIPTION pd  ) 

Definition at line 210 of file plugindescr.c.

const char* GWEN_PluginDescription_GetFileName ( const GWEN_PLUGIN_DESCRIPTION pd  ) 

Definition at line 343 of file plugindescr.c.

const char* GWEN_PluginDescription_GetLongDescr ( const GWEN_PLUGIN_DESCRIPTION pd  ) 

Definition at line 226 of file plugindescr.c.

int GWEN_PluginDescription_GetLongDescrByFormat ( const GWEN_PLUGIN_DESCRIPTION pd,
const char *  s,
GWEN_BUFFER buf 
)

Seeks for a long description with the given format and the currently selected locale and appends it to the data in the given buffer.

The DESCR tag of the plugin description is expected to contain sub tags named TEXT with the property "FORMAT" describing the format and "LANG" containing the language of the element.

Currently supported format is "html".

Returns:
0 if ok, !=0 on error
Parameters:
pd plugin description
s name of the format (e.g. html)
buf buffer to append the description to

Definition at line 302 of file plugindescr.c.

References DBG_INFO, DBG_NOTICE, GWEN_I18N_GetCurrentLocaleList(), GWEN_LOGDOMAIN, GWEN_PluginDescription__GetLocalizedLongDescrByFormat(), GWEN_PluginDescription__GetLongDescrByFormat(), GWEN_StringList_FirstEntry(), GWEN_StringListEntry_Data(), and GWEN_StringListEntry_Next().

Here is the call graph for this function:

const char* GWEN_PluginDescription_GetName ( const GWEN_PLUGIN_DESCRIPTION pd  ) 

Definition at line 187 of file plugindescr.c.

Referenced by GWEN_Crypt_Token_PluginManager_CheckToken(), and GWEN_PluginManager_GetPluginDescr().

Here is the caller graph for this function:

const char* GWEN_PluginDescription_GetPath ( const GWEN_PLUGIN_DESCRIPTION pd  ) 

Definition at line 170 of file plugindescr.c.

const char* GWEN_PluginDescription_GetShortDescr ( const GWEN_PLUGIN_DESCRIPTION pd  ) 

Definition at line 202 of file plugindescr.c.

const char* GWEN_PluginDescription_GetType ( const GWEN_PLUGIN_DESCRIPTION pd  ) 

Definition at line 194 of file plugindescr.c.

const char* GWEN_PluginDescription_GetVersion ( const GWEN_PLUGIN_DESCRIPTION pd  ) 

Definition at line 218 of file plugindescr.c.

GWEN_XMLNODE* GWEN_PluginDescription_GetXmlNode ( const GWEN_PLUGIN_DESCRIPTION pd  ) 

Returns the XML node this description consists of (the "plugin" node). It may contain additional information used by programs. This function does not relinquish ownership of the returned pointer, so you MUST NOT free it. As soon as the description itself is destroyed this XML node will be, too. So you have to call GWEN_XMLNode_dup() if you want the XML node to survive the description.

Definition at line 361 of file plugindescr.c.

Referenced by GWEN_Crypt_Token_PluginManager_CheckToken(), and GWEN_Crypt_Token_PluginManager_GetPluginDescrs().

Here is the caller graph for this function:

int GWEN_PluginDescription_IsActive ( const GWEN_PLUGIN_DESCRIPTION pd  ) 

Definition at line 384 of file plugindescr.c.

void GWEN_PluginDescription_List2_freeAll ( GWEN_PLUGIN_DESCRIPTION_LIST2 pdl  ) 
GWEN_PLUGIN_DESCRIPTION* GWEN_PluginDescription_List2_freeAll_cb ( GWEN_PLUGIN_DESCRIPTION pd,
__attribute__((unused)) void *  user_data 
)

Definition at line 152 of file plugindescr.c.

References GWEN_PluginDescription_free().

Referenced by GWEN_PluginDescription_List2_freeAll().

Here is the call graph for this function:

Here is the caller graph for this function:

GWEN_PLUGIN_DESCRIPTION* GWEN_PluginDescription_new ( GWEN_XMLNODE node  ) 

Definition at line 57 of file plugindescr.c.

References DBG_ERROR, DBG_MEM_INC, GWEN_LIST_INIT, GWEN_LOGDOMAIN, GWEN_NEW_OBJECT, GWEN_PluginDescription_free(), GWEN_XMLNode_dup(), GWEN_XMLNode_GetLocalizedCharValue(), and GWEN_XMLNode_GetProperty().

Referenced by GWEN_LoadPluginDescrsByType().

Here is the call graph for this function:

Here is the caller graph for this function:

void GWEN_PluginDescription_SetFileName ( GWEN_PLUGIN_DESCRIPTION pd,
const char *  s 
)

Definition at line 350 of file plugindescr.c.

Referenced by GWEN_LoadPluginDescrsByType().

Here is the caller graph for this function:

void GWEN_PluginDescription_SetIsActive ( GWEN_PLUGIN_DESCRIPTION pd,
int  i 
)

Definition at line 391 of file plugindescr.c.

void GWEN_PluginDescription_SetPath ( GWEN_PLUGIN_DESCRIPTION pd,
const char *  s 
)

Definition at line 177 of file plugindescr.c.

Referenced by GWEN_LoadPluginDescrsByType().

Here is the caller graph for this function:

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