Test API to operate the UPnP Control Point

Overview

Definition of API to configure UPnP Control Point. More…

// global functions

te_errno tapi_upnp_cp_start(const char* ta, const char* target, const char* iface);
te_errno tapi_upnp_cp_stop(const char* ta);
bool tapi_upnp_cp_started(const char* ta);
te_errno rpc_upnp_cp_connect(rcf_rpc_server* rpcs);
te_errno rpc_upnp_cp_disconnect(rcf_rpc_server* rpcs);
te_errno rpc_upnp_cp_action(rcf_rpc_server* rpcs, const void* request, size_t request_len, void** reply, size_t* reply_len);

Detailed Documentation

Definition of API to configure UPnP Control Point.

Copyright (C) 2004-2022 OKTET Labs Ltd. All rights reserved.

Global Functions

te_errno tapi_upnp_cp_start(const char* ta, const char* target, const char* iface)

Enable the UPnP Control Point.

Parameters:

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.

Returns:

Status code

te_errno tapi_upnp_cp_stop(const char* ta)

Disable the UPnP Control Point.

Parameters:

ta

Test Agent name.

Returns:

Status code

bool tapi_upnp_cp_started(const char* ta)

Check for either UPnP Control Point started or not.

Parameters:

ta

Test Agent name.

Returns:

The UPnP CP started condition.

te_errno rpc_upnp_cp_connect(rcf_rpc_server* rpcs)

Create UNIX socket connection with UPnP Control Point process.

Parameters:

rpcs

RPC server handle.

Returns:

Status code

te_errno rpc_upnp_cp_disconnect(rcf_rpc_server* rpcs)

Destroy UNIX socket connection with UPnP Control Point process.

Parameters:

rpcs

RPC server handle.

Returns:

Status code

te_errno rpc_upnp_cp_action(rcf_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.

Parameters:

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.

Returns:

Status code