Strophe  0.10
XMPP client library
Functions
jid.c File Reference

Functions

char * xmpp_jid_new (xmpp_ctx_t *ctx, const char *node, const char *domain, const char *resource)
 Create a JID string from component parts node, domain, and resource. More...
 
char * xmpp_jid_bare (xmpp_ctx_t *ctx, const char *jid)
 Create a bare JID from a JID. More...
 
char * xmpp_jid_node (xmpp_ctx_t *ctx, const char *jid)
 Create a node string from a JID. More...
 
char * xmpp_jid_domain (xmpp_ctx_t *ctx, const char *jid)
 Create a domain string from a JID. More...
 
char * xmpp_jid_resource (xmpp_ctx_t *ctx, const char *jid)
 Create a resource string from a JID. More...
 

Detailed Description

JID creation and parsing.

Function Documentation

◆ xmpp_jid_new()

char* xmpp_jid_new ( xmpp_ctx_t *  ctx,
const char *  node,
const char *  domain,
const char *  resource 
)

Create a JID string from component parts node, domain, and resource.

Parameters
ctxthe Strophe context object
nodea string representing the node
domaina string representing the domain. Required.
resourcea string representing the resource
Returns
an allocated string with the full JID or NULL if no domain is specified

◆ xmpp_jid_bare()

char* xmpp_jid_bare ( xmpp_ctx_t *  ctx,
const char *  jid 
)

Create a bare JID from a JID.

Parameters
ctxthe Strophe context object
jidthe JID
Returns
an allocated string with the bare JID or NULL on an error

◆ xmpp_jid_node()

char* xmpp_jid_node ( xmpp_ctx_t *  ctx,
const char *  jid 
)

Create a node string from a JID.

Parameters
ctxa Strophe context object
jidthe JID
Returns
an allocated string with the node or NULL if no node is found or an error occurs

◆ xmpp_jid_domain()

char* xmpp_jid_domain ( xmpp_ctx_t *  ctx,
const char *  jid 
)

Create a domain string from a JID.

Parameters
ctxthe Strophe context object
jidthe JID
Returns
an allocated string with the domain or NULL on an error

◆ xmpp_jid_resource()

char* xmpp_jid_resource ( xmpp_ctx_t *  ctx,
const char *  jid 
)

Create a resource string from a JID.

Parameters
ctxa Strophe context object
jidthe JID
Returns
an allocated string with the resource or NULL if no resource is found or an error occurs