diff options
author | mogorman <mogorman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-22 21:12:30 +0000 |
---|---|---|
committer | mogorman <mogorman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-22 21:12:30 +0000 |
commit | 38b24efed1fcbc83ca06b4420e7fb8de5f2803e2 (patch) | |
tree | d1895da5e48cb7c2696f1e79242e88dd0d35b3f6 /include | |
parent | 4169faaaf309db48c66f60b3cc44734e976958e3 (diff) |
asterisk-xmpp merge in
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@29553 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/jabber.h | 133 | ||||
-rw-r--r-- | include/asterisk/jingle.h | 45 | ||||
-rw-r--r-- | include/autoconfig.h.in | 3 |
3 files changed, 181 insertions, 0 deletions
diff --git a/include/asterisk/jabber.h b/include/asterisk/jabber.h new file mode 100644 index 000000000..5f7821e90 --- /dev/null +++ b/include/asterisk/jabber.h @@ -0,0 +1,133 @@ +/* + * Asterisk -- An open source telephony toolkit. + * + * Copyright (C) 1999 - 2005, Digium, Inc. + * + * Matt O'Gorman <mogorman@digium.com> + * + * See http://www.asterisk.org for more information about + * the Asterisk project. Please do not directly contact + * any of the maintainers of this project for assistance; + * the project provides a web site, mailing lists and IRC + * channels for your use. + * + * This program is free software, distributed under the terms of + * the GNU General Public License Version 2. See the LICENSE file + * at the top of the source tree. + */ + +#ifndef _ASTERISK_JABBER_H +#define _ASTERISK_JABBER_H + +#include <iksemel.h> +#include "asterisk/astobj.h" + +enum aji_state { + AJI_DISCONNECTED=0, + AJI_CONNECTING, + AJI_ALMOST, + AJI_CONNECTED +}; + +enum { + AJI_AUTOPRUNE = (1 << 0), + AJI_AUTOREGISTER = (1 << 1) +}; + +enum aji_btype { + AJI_USER=0, + AJI_TRANS=1, + AJI_UTRANS=2 +}; + +enum aji_type { + AJI_COMPONENT, + AJI_CLIENT, +}; + +struct aji_version { + char version[50]; + int jingle; + struct aji_capabilities *parent; + struct aji_version *next; +}; + +struct aji_capabilities { + char node[200]; + struct aji_version *versions; + struct aji_capabilities *next; +}; + +struct aji_resource { + int status; + char resource[80]; + char description[1000]; + struct aji_version *cap; + int priority; + struct aji_resource *next; +}; + +struct aji_buddy { + ASTOBJ_COMPONENTS(struct aji_buddy); + char user[160]; + char host[160]; + char pass[160]; /*For Transports*/ + char server[160]; /*For Transports */ + char channel[160]; + struct aji_resource *resources; + enum aji_btype btype; + unsigned int flags; +}; + +struct aji_buddy_container { + ASTOBJ_CONTAINER_COMPONENTS(struct aji_buddy); +}; + +struct aji_transport_container { + ASTOBJ_CONTAINER_COMPONENTS(struct aji_transport); +}; + +struct aji_client { + ASTOBJ_COMPONENTS(struct aji_client); + char password[160]; + char user[160]; + char serverhost[160]; + char context[100]; + char sid[10]; /* Session ID */ + char mid[6]; /* Message ID */ + iksid *jid; + iksparser *p; + iksfilter *f; + ikstack *stack; + enum aji_state state; + int port; + int debug; + int usetls; + int forcessl; + int usesasl; + int keepalive; + int allowguest; + int timeout; + int authorized; + unsigned int flags; + enum aji_type component; + struct aji_buddy_container buddies; + void *jingle; + pthread_t thread; +}; + +struct aji_client_container{ + ASTOBJ_CONTAINER_COMPONENTS(struct aji_client); +}; + +int ast_aji_send(struct aji_client *client, char *address, char *message); +int ast_aji_disconnect(struct aji_client *client); +int ast_aji_check_roster(void); +void ast_aji_increment_mid(char *mid); +int ast_aji_create_chat(struct aji_client *client,char *room, char *server, char *topic); +int ast_aji_invite_chat(struct aji_client *client, char *user, char *room, char *message); +int ast_aji_join_chat(struct aji_client *client,char *room); +struct aji_client *ast_aji_get_client(char *name); +struct aji_client_container *ast_aji_get_clients(void); + +#endif diff --git a/include/asterisk/jingle.h b/include/asterisk/jingle.h new file mode 100644 index 000000000..0968b7394 --- /dev/null +++ b/include/asterisk/jingle.h @@ -0,0 +1,45 @@ +/* + * Asterisk -- An open source telephony toolkit. + * + * Copyright (C) 1999 - 2005, Digium, Inc. + * + * Matt O'Gorman <mogorman@digium.com> + * + * See http://www.asterisk.org for more information about + * the Asterisk project. Please do not directly contact + * any of the maintainers of this project for assistance; + * the project provides a web site, mailing lists and IRC + * channels for your use. + * + * This program is free software, distributed under the terms of + * the GNU General Public License Version 2. See the LICENSE file + * at the top of the source tree. + */ + +#ifndef _ASTERISK_JINGLE_H +#define _ASTERISK_JINGLE_H + +#include <iksemel.h> +#include "asterisk/astobj.h" + + +/* Jingle Constants */ + +#define JINGLE_NODE "jingle" +#define GOOGLE_NODE "session" + +#define JINGLE_NS "http://jabber.org/protocol/jingle" +#define GOOGLE_NS "http://www.google.com/session" + +#define JINGLE_SID "sid" +#define GOOGLE_SID "id" + +#define JINGLE_INITIATE "initiate" + +#define JINGLE_ACCEPT "accept" +#define GOOGLE_ACCEPT "accept" + +#define JINGLE_NEGOTIATE "negotiate" +#define GOOGLE_NEGOTIATE "candidates" + +#endif diff --git a/include/autoconfig.h.in b/include/autoconfig.h.in index b8847cc74..a7048c39c 100644 --- a/include/autoconfig.h.in +++ b/include/autoconfig.h.in @@ -112,6 +112,9 @@ /* Define if your system has the GTK libraries. */ #undef HAVE_GTK +/* Define to indicate the Iksemel Jabber Library library */ +#undef HAVE_IKSEMEL + /* Define to 1 if you have the `inet_ntoa' function. */ #undef HAVE_INET_NTOA |