summaryrefslogtreecommitdiff
path: root/src/rexmpp_jid.h
blob: bfeedcb8f8c509566d8f2777aea316e4db629dcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/**
   @file rexmpp_jid.h
   @brief JID parsing and manipulation
   @author defanor <defanor@uberspace.net>
   @date 2020
   @copyright MIT license.
*/

#ifndef REXMPP_JID_H
#define REXMPP_JID_H

/** @brief A redundant structure for easy access to JID parts and
    avoidance of dynamic allocations. */
struct rexmpp_jid {
  char local[1024];
  char domain[1024];
  char resource[1024];
  char bare[2048];
  char full[3072];
};

int rexmpp_jid_parse (const char *str, struct rexmpp_jid *jid);
int rexmpp_jid_check (struct rexmpp_jid *jid);

#endif