diff src/protocols/jabber/buddy.h @ 7014:67c4e9d39242

[gaim-migrate @ 7577] Here it is, the bulk of the new Jabber prpl. Left to do: - Implement registration - Implement password changing - Keep track of conversation threads (since I apparently have to) - Fix the bugs that always magically appear in code after I commit committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Mon, 29 Sep 2003 15:23:19 +0000
parents
children 6c8706109f92
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/protocols/jabber/buddy.h	Mon Sep 29 15:23:19 2003 +0000
@@ -0,0 +1,72 @@
+/**
+ * @file buddy.h Buddy handlers
+ *
+ * gaim
+ *
+ * Copyright (C) 2003 Nathan Walp <faceprint@faceprint.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+#ifndef _GAIM_JABBER_BUDDY_H_
+#define _GAIM_JABBER_BUDDY_H_
+
+#include "jabber.h"
+
+typedef struct _JabberBuddyResource {
+	char *name;
+	int priority;
+	int state;
+	char *status;
+	enum {
+		JABBER_CAP_XHTML     = 1 << 1,
+		JABBER_CAP_COMPOSING = 1 << 2
+	} capabilities;
+} JabberBuddyResource;
+
+typedef struct _JabberBuddy {
+	GList *resources;
+	char *error_msg;
+	enum {
+		JABBER_INVISIBLE_NONE   = 0,
+		JABBER_INVISIBLE_SERVER = 1 << 1,
+		JABBER_INVIS_BUDDY      = 1 << 2
+	} invisible;
+	enum {
+		JABBER_SUB_NONE    = 0,
+		JABBER_SUB_PENDING = 1 << 1,
+		JABBER_SUB_TO      = 1 << 2,
+		JABBER_SUB_FROM    = 1 << 3,
+		JABBER_SUB_BOTH    = (JABBER_SUB_TO | JABBER_SUB_FROM)
+	} subscription;
+} JabberBuddy;
+
+JabberBuddy *jabber_buddy_find(JabberStream *js, const char *name,
+		gboolean create);
+JabberBuddyResource *jabber_buddy_find_resource(JabberBuddy *jb,
+		const char *resource);
+void jabber_buddy_track_resource(JabberBuddy *jb, const char *resource,
+		int priority, int state, const char *status);
+void jabber_buddy_remove_resource(JabberBuddy *jb, const char *resource);
+const char *jabber_buddy_get_status_msg(JabberBuddy *jb);
+void jabber_buddy_get_info(GaimConnection *gc, const char *who);
+void jabber_buddy_get_info_chat(GaimConnection *gc, int id,
+		const char *resource);
+
+GList *jabber_buddy_menu(GaimConnection *gc, const char *name);
+
+void jabber_set_info(GaimConnection *gc, const char *info);
+void jabber_setup_set_info(GaimConnection *gc);
+
+#endif /* _GAIM_JABBER_BUDDY_H_ */