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

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

  ctx | the Strophe context object
  node | a string representing the node
  domain | a string representing the domain. Required.
  resource | a 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

  ctx | the Strophe context object
  jid | the 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

  ctx | a Strophe context object
  jid | the 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

  ctx | the Strophe context object
  jid | the 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

  ctx | a Strophe context object
  jid | the JID

Returns
  an allocated string with the resource or NULL if no resource is found or an error occurs