Easy Publish and Consume Reference Manual | ||||
---|---|---|---|---|
#include <libepc/protcol.h> enum EpcProtocol; gchar* epc_protocol_build_uri (EpcProtocol protocol, const gchar *hostname, guint16 port, const gchar *path); const gchar* epc_protocol_get_service_type (EpcProtocol protocol); const gchar* epc_protocol_get_uri_scheme (EpcProtocol protocol);
Since the Easy Publish and Consume library hides the details of the transport mechanism used, it is possible to support different mechanisms. Currently there is support for HTTP and HTTPS.
The EpcProtocol enumeration is the maximum of information libepc wants to expose regarding its transport mechanisms.
typedef enum { EPC_PROTOCOL_UNKNOWN, EPC_PROTOCOL_HTTP, EPC_PROTOCOL_HTTPS } EpcProtocol;
The transport protocols supported by libepc.
gchar* epc_protocol_build_uri (EpcProtocol protocol, const gchar *hostname, guint16 port, const gchar *path);
Builds the Unified Resource Identifier (URI) for a service. The returned string should be released when no longer needed.
protocol : |
a EpcProtocol |
hostname : |
the host to contact |
port : |
the service port |
path : |
the service path, or NULL
|
Returns : | A newly allocated string with the URI for the service,
or NULL on error.
|
const gchar* epc_protocol_get_service_type (EpcProtocol protocol);
Queries the DNS-SD service type associated with a EpcProtocol. See EPC_SERVICE_TYPE_HTTP, EPC_SERVICE_TYPE_HTTPS.
protocol : |
a EpcProtocol |
Returns : | Returns the DNS-SD service type associated
with protocol , or NULL on unknown protocols.
|
const gchar* epc_protocol_get_uri_scheme (EpcProtocol protocol);
Queries the URI scheme associated with a EpcProtocol. See epc_service_type_build_uri.
protocol : |
a EpcProtocol |
Returns : | Returns the URI scheme associated with protocol ,
or NULL on unknown protocols.
|