annotate plugins/crazychat/crazychat.h @ 13834:378bba5011e7

[gaim-migrate @ 16283] SF Patch #1500688 from Brian Chu (roast) He already committed this to his soc-2006-file-loggers branch. Here's the patch description: In util.c, gaim_markup_html_to_xhtml() doesn't trim spaces of parsed background colors, parsed font names, or the end result for styles (which inserted spaces for the purpose of many span.style attributes). For example, things like this get written to the log: <span style='font-size: small; '> Things like the following this _can_ written to the log given a tag like this: <font face=" Comic Sans MS "> <span style='font-family: Comic Sans MS ; '> Same for: <body bgcolor=" Red "> <span style='background: Red ;'> committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Mon, 19 Jun 2006 05:57:11 +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__ */