Strophe  0.8
XMPP client library
Functions
jid.c File Reference

JID creation and parsing. More...

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.
char * xmpp_jid_bare (xmpp_ctx_t *ctx, const char *jid)
 Create a bare JID from a JID.
char * xmpp_jid_node (xmpp_ctx_t *ctx, const char *jid)
 Create a node string from a JID.
char * xmpp_jid_domain (xmpp_ctx_t *ctx, const char *jid)
 Create a domain string from a JID.
char * xmpp_jid_resource (xmpp_ctx_t *ctx, const char *jid)
 Create a resource string from a JID.

Detailed Description

JID creation and parsing.


Function Documentation

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.

jid

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
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
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
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
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