Mercurial > pidgin
annotate src/protocols/msn/msnobject.h @ 9005:230cf4032e3d
[gaim-migrate @ 9780]
(21:30:42) SimGuy: LSchiere2: This patch adds widget names to a number of different imhtmls scattered around gaim
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sat, 22 May 2004 01:32:44 +0000 |
parents | 06f57183e29f |
children | ab6636c5a136 |
rev | line source |
---|---|
6701 | 1 /** |
2 * @file msnobject.h MSNObject API | |
3 * | |
4 * gaim | |
5 * | |
8475
06f57183e29f
[gaim-migrate @ 9208]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
6 * Copyright (C) 2003-2004 Christian Hammond <chipx86@gnupdate.org> |
6701 | 7 * |
8 * This program is free software; you can redistribute it and/or modify | |
9 * it under the terms of the GNU General Public License as published by | |
10 * the Free Software Foundation; either version 2 of the License, or | |
11 * (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, | |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 * GNU General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU General Public License | |
19 * along with this program; if not, write to the Free Software | |
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
21 */ | |
22 #ifndef _MSN_OBJECT_H_ | |
23 #define _MSN_OBJECT_H_ | |
24 | |
25 #include "internal.h" | |
26 | |
27 typedef enum | |
28 { | |
29 MSN_OBJECT_UNKNOWN = -1, /**< Unknown object */ | |
30 MSN_OBJECT_RESERVED1 = 1, /**< Reserved */ | |
31 MSN_OBJECT_EMOTICON = 2, /**< Custom Emoticon */ | |
32 MSN_OBJECT_USERTILE = 3, /**< UserTile (buddy icon) */ | |
33 MSN_OBJECT_RESERVED2 = 4, /**< Reserved */ | |
34 MSN_OBJECT_BACKGROUND = 5 /**< Background */ | |
35 | |
36 } MsnObjectType; | |
37 | |
38 typedef struct | |
39 { | |
40 char *creator; | |
41 int size; | |
42 MsnObjectType type; | |
43 char *location; | |
44 char *friendly; | |
45 char *sha1d; | |
46 char *sha1c; | |
47 | |
48 } MsnObject; | |
49 | |
50 /** | |
51 * Creates a MsnObject structure. | |
52 * | |
53 * @return A new MsnObject structure. | |
54 */ | |
55 MsnObject *msn_object_new(void); | |
56 | |
57 /** | |
58 * Creates a MsnObject structure from a string. | |
59 * | |
60 * @param str The string. | |
61 * | |
62 * @return The new MsnObject structure. | |
63 */ | |
64 MsnObject *msn_object_new_from_string(const char *str); | |
65 | |
66 /** | |
67 * Destroys an MsnObject structure. | |
68 * | |
69 * @param obj The object structure. | |
70 */ | |
71 void msn_object_destroy(MsnObject *obj); | |
72 | |
73 /** | |
74 * Outputs a string representation of an MsnObject. | |
75 * | |
76 * @param obj The object. | |
77 * | |
78 * @return The string representation. This must be freed. | |
79 */ | |
80 char *msn_object_to_string(const MsnObject *obj); | |
81 | |
82 /** | |
83 * Sets the creator field in a MsnObject. | |
84 * | |
85 * @param creator The creator value. | |
86 */ | |
87 void msn_object_set_creator(MsnObject *obj, const char *creator); | |
88 | |
89 /** | |
90 * Sets the size field in a MsnObject. | |
91 * | |
92 * @param size The size value. | |
93 */ | |
94 void msn_object_set_size(MsnObject *obj, int size); | |
95 | |
96 /** | |
97 * Sets the type field in a MsnObject. | |
98 * | |
99 * @param type The type value. | |
100 */ | |
101 void msn_object_set_type(MsnObject *obj, MsnObjectType type); | |
102 | |
103 /** | |
104 * Sets the location field in a MsnObject. | |
105 * | |
106 * @param location The location value. | |
107 */ | |
108 void msn_object_set_location(MsnObject *obj, const char *location); | |
109 | |
110 /** | |
111 * Sets the friendly name field in a MsnObject. | |
112 * | |
113 * @param friendly The friendly name value. | |
114 */ | |
115 void msn_object_set_friendly(MsnObject *obj, const char *friendly); | |
116 | |
117 /** | |
118 * Sets the SHA1D field in a MsnObject. | |
119 * | |
120 * @param sha1d The sha1d value. | |
121 */ | |
122 void msn_object_set_sha1d(MsnObject *obj, const char *sha1d); | |
123 | |
124 /** | |
125 * Sets the SHA1C field in a MsnObject. | |
126 * | |
127 * @param sha1c The sha1c value. | |
128 */ | |
129 void msn_object_set_sha1c(MsnObject *obj, const char *sha1c); | |
130 | |
131 /** | |
132 * Returns a MsnObject's creator value. | |
133 * | |
134 * @param obj The object. | |
135 * | |
136 * @return The creator value. | |
137 */ | |
138 const char *msn_object_get_creator(const MsnObject *obj); | |
139 | |
140 /** | |
141 * Returns a MsnObject's size value. | |
142 * | |
143 * @param obj The object. | |
144 * | |
145 * @return The size value. | |
146 */ | |
147 int msn_object_get_size(const MsnObject *obj); | |
148 | |
149 /** | |
150 * Returns a MsnObject's type. | |
151 * | |
152 * @param obj The object. | |
153 * | |
154 * @return The object type. | |
155 */ | |
156 MsnObjectType msn_object_get_type(const MsnObject *obj); | |
157 | |
158 /** | |
159 * Returns a MsnObject's location value. | |
160 * | |
161 * @param obj The object. | |
162 * | |
163 * @return The location value. | |
164 */ | |
165 const char *msn_object_get_location(const MsnObject *obj); | |
166 | |
167 /** | |
168 * Returns a MsnObject's friendly name value. | |
169 * | |
170 * @param obj The object. | |
171 * | |
172 * @return The friendly name value. | |
173 */ | |
174 const char *msn_object_get_friendly(const MsnObject *obj); | |
175 | |
176 /** | |
177 * Returns a MsnObject's SHA1D value. | |
178 * | |
179 * @param obj The object. | |
180 * | |
181 * @return The SHA1D value. | |
182 */ | |
183 const char *msn_object_get_sha1d(const MsnObject *obj); | |
184 | |
185 /** | |
186 * Returns a MsnObject's SHA1C value. | |
187 * | |
188 * @param obj The object. | |
189 * | |
190 * @return The SHA1C value. | |
191 */ | |
192 const char *msn_object_get_sha1c(const MsnObject *obj); | |
193 | |
194 #endif /* _MSN_OBJECT_H_ */ |