2 * Asterisk -- An open source telephony toolkit.
4 * Copyright (C) 1999 - 2005, Digium, Inc.
6 * Matt O'Gorman <mogorman@digium.com>
8 * See http://www.asterisk.org for more information about
9 * the Asterisk project. Please do not directly contact
10 * any of the maintainers of this project for assistance;
11 * the project provides a web site, mailing lists and IRC
12 * channels for your use.
14 * This program is free software, distributed under the terms of
15 * the GNU General Public License Version 2. See the LICENSE file
16 * at the top of the source tree.
19 #ifndef _ASTERISK_JABBER_H
20 #define _ASTERISK_JABBER_H
23 #include "asterisk/astobj.h"
24 #include "asterisk/linkedlists.h"
33 AJI_AUTOPRUNE = (1 << 0),
34 AJI_AUTOREGISTER = (1 << 1)
51 struct aji_capabilities *parent;
52 struct aji_version *next;
55 struct aji_capabilities {
57 struct aji_version *versions;
58 struct aji_capabilities *next;
65 struct aji_version *cap;
67 struct aji_resource *next;
75 AST_LIST_ENTRY(aji_message) list;
79 ASTOBJ_COMPONENTS(struct aji_buddy);
82 char pass[160]; /*For Transports*/
83 char server[160]; /*For Transports */
85 struct aji_resource *resources;
90 struct aji_buddy_container {
91 ASTOBJ_CONTAINER_COMPONENTS(struct aji_buddy);
94 struct aji_transport_container {
95 ASTOBJ_CONTAINER_COMPONENTS(struct aji_transport);
99 ASTOBJ_COMPONENTS(struct aji_client);
102 char serverhost[160];
104 char statusmessage[256];
105 char sid[10]; /* Session ID */
106 char mid[6]; /* Message ID */
111 enum aji_state state;
123 enum aji_type component;
124 struct aji_buddy_container buddies;
125 AST_LIST_HEAD(messages,aji_message) messages;
130 struct aji_client_container{
131 ASTOBJ_CONTAINER_COMPONENTS(struct aji_client);
134 int ast_aji_send(struct aji_client *client, char *address, char *message);
135 int ast_aji_disconnect(struct aji_client *client);
136 int ast_aji_check_roster(void);
137 void ast_aji_increment_mid(char *mid);
138 int ast_aji_create_chat(struct aji_client *client,char *room, char *server, char *topic);
139 int ast_aji_invite_chat(struct aji_client *client, char *user, char *room, char *message);
140 int ast_aji_join_chat(struct aji_client *client,char *room);
141 struct aji_client *ast_aji_get_client(char *name);
142 struct aji_client_container *ast_aji_get_clients(void);