# plugindescr.h File Reference

`#include <gwenhywfar/gwenhywfarapi.h>`
`#include <gwenhywfar/misc.h>`
`#include <gwenhywfar/misc2.h>`
`#include <gwenhywfar/xml.h>`

Go to the source code of this file.

## Typedefs

typedef GWEN_PLUGIN_DESCRIPTION | GWEN_PLUGIN_DESCRIPTION

## Functions

GWENHYWFAR_API GWEN_PLUGIN_DESCRIPTION_LIST2 * | GWEN_LoadPluginDescrs (const char *path)
GWENHYWFAR_API int | GWEN_LoadPluginDescrsByType (const char *path, const char *type, GWEN_PLUGIN_DESCRIPTION_LIST2 *pdl)
GWENHYWFAR_API void | GWEN_PluginDescription_free (GWEN_PLUGIN_DESCRIPTION *pd)
GWENHYWFAR_API const char * | GWEN_PluginDescription_GetAuthor (const GWEN_PLUGIN_DESCRIPTION *pd)
GWENHYWFAR_API const char * | GWEN_PluginDescription_GetFileName (const GWEN_PLUGIN_DESCRIPTION *pd)
GWENHYWFAR_API const char * | GWEN_PluginDescription_GetLongDescr (const GWEN_PLUGIN_DESCRIPTION *pd)
GWENHYWFAR_API int | GWEN_PluginDescription_GetLongDescrByFormat (const GWEN_PLUGIN_DESCRIPTION *pd, const char *s, GWEN_BUFFER *buf)
GWENHYWFAR_API const char * | GWEN_PluginDescription_GetName (const GWEN_PLUGIN_DESCRIPTION *pd)
GWENHYWFAR_API const char * | GWEN_PluginDescription_GetShortDescr (const GWEN_PLUGIN_DESCRIPTION *pd)
GWENHYWFAR_API const char * | GWEN_PluginDescription_GetType (const GWEN_PLUGIN_DESCRIPTION *pd)
GWENHYWFAR_API const char * | GWEN_PluginDescription_GetVersion (const GWEN_PLUGIN_DESCRIPTION *pd)
GWENHYWFAR_API GWEN_XMLNODE * | GWEN_PluginDescription_GetXmlNode (const GWEN_PLUGIN_DESCRIPTION *pd)
GWENHYWFAR_API int | GWEN_PluginDescription_IsActive (const GWEN_PLUGIN_DESCRIPTION *pd)
GWENHYWFAR_API void | GWEN_PluginDescription_List2_freeAll (GWEN_PLUGIN_DESCRIPTION_LIST2 *pdl)
GWENHYWFAR_API void | GWEN_PluginDescription_SetFileName (GWEN_PLUGIN_DESCRIPTION *pd, const char *s)
GWENHYWFAR_API void | GWEN_PluginDescription_SetIsActive (GWEN_PLUGIN_DESCRIPTION *pd, int i)

## Typedef Documentation

typedef struct GWEN_PLUGIN_DESCRIPTION GWEN_PLUGIN_DESCRIPTION

## Function Documentation

GWENHYWFAR_API GWEN_PLUGIN_DESCRIPTION_LIST2* GWEN_LoadPluginDescrs | ( | const char * | path | ) |

GWENHYWFAR_API int GWEN_LoadPluginDescrsByType | ( | const char * | path,
|  | const char * | type,
|  | GWEN_PLUGIN_DESCRIPTION_LIST2 * | pdl
| ) |

Loads a list of plugins descriptions. When parsing the description files entries for the current language will be selected. The current language can be set via GWEN_I18N_SetLocale.

Parameters:

  | path | folder to search for XML files
  | type | plugin type (property "type" of tag "plugin")
  | pdl | plugin descriptions list2 to load descriptions to

GWENHYWFAR_API void GWEN_PluginDescription_free | ( | GWEN_PLUGIN_DESCRIPTION * | pd | ) |

GWENHYWFAR_API const char* GWEN_PluginDescription_GetAuthor | ( | const GWEN_PLUGIN_DESCRIPTION * | pd | ) |

GWENHYWFAR_API const char* GWEN_PluginDescription_GetFileName | ( | const GWEN_PLUGIN_DESCRIPTION * | pd | ) |

GWENHYWFAR_API const char* GWEN_PluginDescription_GetLongDescr | ( | const GWEN_PLUGIN_DESCRIPTION * | pd | ) |

GWENHYWFAR_API 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 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.

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

GWENHYWFAR_API const char* GWEN_PluginDescription_GetName | ( | const GWEN_PLUGIN_DESCRIPTION * | pd | ) |

GWENHYWFAR_API const char* GWEN_PluginDescription_GetShortDescr | ( | const GWEN_PLUGIN_DESCRIPTION * | pd | ) |

GWENHYWFAR_API const char* GWEN_PluginDescription_GetType | ( | const GWEN_PLUGIN_DESCRIPTION * | pd | ) |

GWENHYWFAR_API const char* GWEN_PluginDescription_GetVersion | ( | const GWEN_PLUGIN_DESCRIPTION * | pd | ) |

GWENHYWFAR_API 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.

GWENHYWFAR_API int GWEN_PluginDescription_IsActive | ( | const GWEN_PLUGIN_DESCRIPTION * | pd | ) |

GWENHYWFAR_API void GWEN_PluginDescription_List2_freeAll | ( | GWEN_PLUGIN_DESCRIPTION_LIST2 * | pdl | ) |

GWENHYWFAR_API void GWEN_PluginDescription_SetFileName | ( | GWEN_PLUGIN_DESCRIPTION * | pd,
|  | const char * | s
| ) |

GWENHYWFAR_API void GWEN_PluginDescription_SetIsActive | ( | GWEN_PLUGIN_DESCRIPTION * | pd,
|  | int | i
| ) |