• About TV's server
  • New in version 3.20
  • New in version 3.10
  • About the source code
  • About protocols/plugins
  • TV's server API
  • Protocol Initialisation
  • Protocol binding
  • Protocol Listening and handling
  • Protocol data storage
  • Control panel
  • Multi column list
  • Time and date
  • Http protocol functions
  • Unimplemented and/or replaced functions
  • GetPluginData function

    The GetPluginData function will restore data saved with the SavePluginData function or data set by the SetControlPanelOptions function.


    int __stdcall GetPluginData(
    __in ProtocolSession *psess,
    __in ListenSession *lsess,
    __in ClientSession *sess,
    __in char *name,
    __out char *data,
    __inout int* len,
    __in int flags


    psess [in]lsess [in]sess [in]name [in]data [out]len [inout]flags [in]
    The name paramter identifies a MultiColumnList initialized by the SetControlPanelOptions. The data parameter should hold a pointer to a list or have enough space to receive a pointer to a list. See the Remark section for more information.
    GetPluginData should not make a copy of the list if it doesn't exist in the memory space of the Listensession or ClientSession. Setting this flag will cause the function GetPluginData to return the same pointer that exists in the ListenSession (from where the ClientSession was created) or ProtocolSession. This means that all changes made to the list will also have effect on the ListenSession or ProtocolSession from where the pointer originaly came from. This flag should be combinated with the GDPD_IS_LIST flag.
    The data should be saved in memory only, set this flag will cause the SavePluginData function not to store the data on disk. This flag has no effect on the function GetPluginData.
    The name paramter is not a pointer to a null-terminated string but an integer to identify the data.
    The data, identified by name, should be deleted for the selected session. This will not delete the identified data for other sessions, nor will it delete the default data set by SetControlPanelOptions. This flag has no effect on the function GetPluginData.

    Return value

    If no error occurs the function returns True (one). If the function fails it will return False (zero).


    If flag GDPD_IS_LIST is set and the name parameter points to a list, initialized by the SetControlPanelOptions function, the GetPluginData function will return a pointer to a list. This pointer can be used by the functions AddListRow, CountListRows, GetListItem, GetListItemSize, RemoveListRow, SetListItem and FindListItem. These functions will let you acces the list in memory, however, if you edit the list it will not be saved to the harddisk. You should call function SavePluginData with flag GDPD_IS_LIST set to save the changes to the harddisk.

    If parameter sess and lsess are both zero, the data on protocol level will be restored.
    If parameter sess is zero lsess is not zero the data of the listen session will be restored.
    If parameter sess is not zero lsess is zero the data of the client session will be restored.
    If parameter sess and lsess are both not zero, the function result in an error.


    Should be exported by -
    Minimum supported API 1.00
    Header tvsserver_base.h