Notice: Constant POS_FUNC_INOUT already defined in D:\sites\server_model_v3\site\index.php on line 65
Notice: Constant POS_FUNC_NAME already defined in D:\sites\server_model_v3\site\index.php on line 66
Notice: Constant POS_FUNC_TYPE_NUM already defined in D:\sites\server_model_v3\site\index.php on line 67
Notice: Constant POS_STRUCT_INOUT already defined in D:\sites\server_model_v3\site\index.php on line 69
Notice: Constant POS_STRUCT_NAME already defined in D:\sites\server_model_v3\site\index.php on line 70
Notice: Constant POS_STRUCT_TYPE_NUM already defined in D:\sites\server_model_v3\site\index.php on line 71
Notice: Constant REQUIREMENTS_POS already defined in D:\sites\server_model_v3\site\index.php on line 76
Control panel
index
- About control panel
- Internal structures
- Register notification functions
- Data types
About control panel
TV's server version 3 was designed to be plug-in based system, this included the control panel. There are several functions to request copies of internal structures and it is possible to register functions to be notificated when a protocol is loaded or when a ListenSession is created. These function can only be executed by a control panel protocol. To register a protocol as a control panel it is necessary to set flag PT_CONTROLPANEL when calling function SetProtocolInformation on protocol initialization.
Internal structures
There are two different internal structures from which a copy can be requested from. These copies are not complete copies of the internal structures, some fields are left blank and are documented as reserved. These fields are not meant to be used by other routines than the internal routines, because this would make TV's server unstable.
The InternalProtocolStructure contains information about:
- protocol type that can be used to identify which protocol should and shouldn't be able to be binded to each other;
- control panel options that can be used to build a list with protocol- and/or listensession options to be displayed to the user;
- protocol Session that can be used to execute function on the behave of this protocol, like writing in its data storage to set values of the control panel options;
- copy of the Protocol Session that can be used to retrieve the original name, since the name in the original ProtocolSession can (accidentally) be changed the protocol itself.
- size for the ProtocolData structure that can be displayed to user as memory usage information;
- ProtocolSignature that can be displayed to the user as protocol information.
The InternalListenStructure contains information about:
- current status that can be: loading, loaded, error or unloading;
- unique listen session id that is used for disk data storage (read article "Protocol data storage" for more information);
- list with binded protocol sessions that can be used to identify the protocols binded in this listensession.
The InternalProtocolStructure can be requested by the GetCopyOfInternalProtocolStructures function. This function will return all the InternalProtocolStructure structures through a linked-list.
The InternalListenStructure can be requested by the GetCopyOfInternalListenStructure and the GetCopyOfInternalListenStructureByLsess function.
Register notification functions
To inform the control panel about new loaded protocols and new created listen sessions it can register notification functions. This can be done with the functions RegisterProtocolLoadedCallbackFunction and RegisterListenSessionIsCreatedCallbackFunction.
Data types
To be able to display the control options of a protocol to the user it is necessary to know how to read this data, for this reason there are 12 different types of data. These types are described in the UserValueOption structure. Currently all those types are supported by the control panel supplied with TV's server.