annotate plugins/crazychat/crazychat.h @ 13346:e614c46936ba

[gaim-migrate @ 15716] Javier Fern??ndez-Sanguino Pe??a sent me these a while back, before we were using intltool committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 28 Feb 2006 05:54:28 +0000
parents 8bcd4d4ccef6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11232
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
1 #ifndef __CRAZYCHAT_H__
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
2 #define __CRAZYCHAT_H__
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
3
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
4 #include <glib.h>
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
5 #include <sys/types.h>
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
6 #include <sys/socket.h>
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
7 #include <netinet/in.h>
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
8 #include <gtk/gtk.h>
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
9 #include "filter.h"
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
10 #include "gaim.h"
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
11
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
12 #ifdef HAVE_CONFIG_H
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
13 # include "config.h"
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
14 #endif
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
15
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
16 struct crazychat;
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
17
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
18 /* --- type definitions --- */
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
19
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
20 typedef enum { INVITE = 0, ACCEPT, ACCEPTED, CONNECTED } CC_STATE;
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
21
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
22 /**
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
23 * Finds the CrazyChat session with the handle.
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
24 * @param cc global crazychat data structure
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
25 * @param handle the peer name
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
26 * @return the cc_session if found, or NULL
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
27 */
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
28 struct cc_session *cc_find_session(struct crazychat *cc, char *handle);
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
29
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
30 /**
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
31 * Adds a new session with a peer, unless a peer session already exists.
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
32 * Makes a deep copy of the handle.
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
33 * @param cc global crazychat data structure
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
34 * @param handle the peer name
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
35 * @return the new/old cc_session
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
36 */
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
37 struct cc_session *cc_add_session(struct crazychat *cc, char *handle);
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
38
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
39 /**
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
40 * Removes a crazychat session with a peer.
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
41 * @param cc global crazychat data structure
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
42 * @param session the cc_session to remove
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
43 */
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
44 void cc_remove_session(struct crazychat *cc, struct cc_session *session);
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
45
8bcd4d4ccef6 [gaim-migrate @ 13372]
Charlie Stockman <chuckleberry>
parents:
diff changeset
46 #endif /* __CRAZYCHAT_H__ */