:orphan: .. index:: pair: group; Test API to operate the UPnP Control Point .. _doxid-group__tapi__upnp__cp: Test API to operate the UPnP Control Point ========================================== .. toctree:: :hidden: Overview ~~~~~~~~ Definition of API to configure UPnP Control Point. :ref:`More...<details-group__tapi__upnp__cp>` .. ref-code-block:: cpp :class: doxyrest-overview-code-block // global functions :ref:`te_errno<doxid-te__errno_8h_1ac9fc14f28b70f4785037c1df70ebc2a5>` :ref:`tapi_upnp_cp_start<doxid-group__tapi__upnp__cp_1ga4d988fe32a8668b6f07ccee6d89c1e9d>`(const char* ta, const char* target, const char* iface); :ref:`te_errno<doxid-te__errno_8h_1ac9fc14f28b70f4785037c1df70ebc2a5>` :ref:`tapi_upnp_cp_stop<doxid-group__tapi__upnp__cp_1gadd86acb7ea5d776e5e327b55253b6dc7>`(const char* ta); bool :ref:`tapi_upnp_cp_started<doxid-group__tapi__upnp__cp_1ga61c77b79e852b9bf2e0edf3b1786cb6d>`(const char* ta); :ref:`te_errno<doxid-te__errno_8h_1ac9fc14f28b70f4785037c1df70ebc2a5>` :ref:`rpc_upnp_cp_connect<doxid-group__tapi__upnp__cp_1ga009bdb5e617074cbc1a8f76ddc89341c>`(:ref:`rcf_rpc_server<doxid-structrcf__rpc__server>`* rpcs); :ref:`te_errno<doxid-te__errno_8h_1ac9fc14f28b70f4785037c1df70ebc2a5>` :ref:`rpc_upnp_cp_disconnect<doxid-group__tapi__upnp__cp_1gaa57908e1e7221b84d24790951e8484d8>`(:ref:`rcf_rpc_server<doxid-structrcf__rpc__server>`* rpcs); :ref:`te_errno<doxid-te__errno_8h_1ac9fc14f28b70f4785037c1df70ebc2a5>` :ref:`rpc_upnp_cp_action<doxid-group__tapi__upnp__cp_1ga2d9f95ba5bde749beb132e1e666a6c85>`(:ref:`rcf_rpc_server<doxid-structrcf__rpc__server>`* rpcs, const void* request, size_t request_len, void** reply, size_t* reply_len); .. _details-group__tapi__upnp__cp: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Definition of API to configure UPnP Control Point. Copyright (C) 2004-2022 OKTET Labs Ltd. All rights reserved. Global Functions ---------------- .. index:: pair: function; tapi_upnp_cp_start .. _doxid-group__tapi__upnp__cp_1ga4d988fe32a8668b6f07ccee6d89c1e9d: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno<doxid-te__errno_8h_1ac9fc14f28b70f4785037c1df70ebc2a5>` tapi_upnp_cp_start(const char* ta, const char* target, const char* iface) Enable the UPnP Control Point. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name. * - target - Search Target for UPnP devices and/or services. Can be ``NULL`` or zero-length string, in this case ``TAPI_UPNP_ST_ALL_RESOURCES`` will be used. * - iface - Network interface to use by Control Point. .. rubric:: Returns: Status code .. index:: pair: function; tapi_upnp_cp_stop .. _doxid-group__tapi__upnp__cp_1gadd86acb7ea5d776e5e327b55253b6dc7: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno<doxid-te__errno_8h_1ac9fc14f28b70f4785037c1df70ebc2a5>` tapi_upnp_cp_stop(const char* ta) Disable the UPnP Control Point. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name. .. rubric:: Returns: Status code .. index:: pair: function; tapi_upnp_cp_started .. _doxid-group__tapi__upnp__cp_1ga61c77b79e852b9bf2e0edf3b1786cb6d: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool tapi_upnp_cp_started(const char* ta) Check for either UPnP Control Point started or not. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name. .. rubric:: Returns: The UPnP CP started condition. .. index:: pair: function; rpc_upnp_cp_connect .. _doxid-group__tapi__upnp__cp_1ga009bdb5e617074cbc1a8f76ddc89341c: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno<doxid-te__errno_8h_1ac9fc14f28b70f4785037c1df70ebc2a5>` rpc_upnp_cp_connect(:ref:`rcf_rpc_server<doxid-structrcf__rpc__server>`* rpcs) Create UNIX socket connection with UPnP Control Point process. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - rpcs - RPC server handle. .. rubric:: Returns: Status code .. index:: pair: function; rpc_upnp_cp_disconnect .. _doxid-group__tapi__upnp__cp_1gaa57908e1e7221b84d24790951e8484d8: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno<doxid-te__errno_8h_1ac9fc14f28b70f4785037c1df70ebc2a5>` rpc_upnp_cp_disconnect(:ref:`rcf_rpc_server<doxid-structrcf__rpc__server>`* rpcs) Destroy UNIX socket connection with UPnP Control Point process. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - rpcs - RPC server handle. .. rubric:: Returns: Status code .. index:: pair: function; rpc_upnp_cp_action .. _doxid-group__tapi__upnp__cp_1ga2d9f95ba5bde749beb132e1e666a6c85: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno<doxid-te__errno_8h_1ac9fc14f28b70f4785037c1df70ebc2a5>` rpc_upnp_cp_action(:ref:`rcf_rpc_server<doxid-structrcf__rpc__server>`* rpcs, const void* request, size_t request_len, void** reply, size_t* reply_len) Make a request for UPnP specific data of UPnP Control Point through RPCS (proxy) and wait for reply (blocking function). User should perform free on ``reply`` when it needs no more. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - rpcs - RPC server handle. * - request - Request message. * - request_len - Request message length. * - reply - Reply message. If ``NULL``, then the memory will be allocated. On otherwise the ``reply_len`` must specify the ``reply`` buffer size. * - reply_len - Reply message length. .. rubric:: Returns: Status code