comparison libfaim/aim_msgcookie.c @ 840:595ac7759563

[gaim-migrate @ 850] lots of (mostly useless for us) libfaim changes. should help portability, but it was always portable between unices.... stupid win32ers. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 04 Sep 2000 23:37:32 +0000
parents 6e318907bcce
children ed8855ae6632
comparison
equal deleted inserted replaced
839:8f66e00af045 840:595ac7759563
24 * - newcook->addtime is updated accordingly; 24 * - newcook->addtime is updated accordingly;
25 * - cookie->type is just passed across. 25 * - cookie->type is just passed across.
26 * 26 *
27 * returns -1 on error, 0 on success. */ 27 * returns -1 on error, 0 on success. */
28 28
29 int aim_cachecookie(struct aim_session_t *sess, 29 faim_internal int aim_cachecookie(struct aim_session_t *sess,
30 struct aim_msgcookie_t *cookie) 30 struct aim_msgcookie_t *cookie)
31 { 31 {
32 struct aim_msgcookie_t *newcook = NULL, *cur = NULL; 32 struct aim_msgcookie_t *newcook = NULL, *cur = NULL;
33 33
34 if (!cookie) 34 if (!cookie)
35 return -1; 35 return -1;
78 * takes a cookie string and grabs the cookie struct associated with 78 * takes a cookie string and grabs the cookie struct associated with
79 * it. removes struct from chain. returns the struct if found, or 79 * it. removes struct from chain. returns the struct if found, or
80 * NULL on not found. 80 * NULL on not found.
81 */ 81 */
82 82
83 struct aim_msgcookie_t *aim_uncachecookie(struct aim_session_t *sess, char *cookie, int type) 83 faim_internal struct aim_msgcookie_t *aim_uncachecookie(struct aim_session_t *sess, unsigned char *cookie, int type)
84 { 84 {
85 struct aim_msgcookie_t *cur; 85 struct aim_msgcookie_t *cur;
86 86
87 if (!cookie || !sess->msgcookies) 87 if (!cookie || !sess->msgcookies)
88 return NULL; 88 return NULL;
118 * well, if i rewrite it. 118 * well, if i rewrite it.
119 * 119 *
120 * i'll avoid the puns. 120 * i'll avoid the puns.
121 */ 121 */
122 122
123 int aim_purgecookies(struct aim_session_t *sess, int maxage) 123 faim_export int aim_purgecookies(struct aim_session_t *sess, int maxage)
124 { 124 {
125 struct aim_msgcookie_t *cur; 125 struct aim_msgcookie_t *cur;
126 struct aim_msgcookie_t *remed = NULL; 126 struct aim_msgcookie_t *remed = NULL;
127 time_t curtime; 127 time_t curtime;
128 128
151 } 151 }
152 152
153 return 0; 153 return 0;
154 } 154 }
155 155
156 struct aim_msgcookie_t *aim_mkcookie(unsigned char *c, int type, void *data) 156 faim_internal struct aim_msgcookie_t *aim_mkcookie(unsigned char *c, int type, void *data)
157 { 157 {
158 struct aim_msgcookie_t *cookie; 158 struct aim_msgcookie_t *cookie;
159 159
160 if(!c) 160 if(!c)
161 return(NULL); 161 return(NULL);
170 memcpy(cookie->cookie, c, 8); 170 memcpy(cookie->cookie, c, 8);
171 171
172 return(cookie); 172 return(cookie);
173 } 173 }
174 174
175 struct aim_msgcookie_t *aim_checkcookie(struct aim_session_t *sess, char *cookie, int type) 175 faim_internal struct aim_msgcookie_t *aim_checkcookie(struct aim_session_t *sess, unsigned char *cookie, int type)
176 { 176 {
177 struct aim_msgcookie_t *cur; 177 struct aim_msgcookie_t *cur;
178 178
179 if(!sess->msgcookies) 179 if(!sess->msgcookies)
180 return NULL; 180 return NULL;
189 return(cur); 189 return(cur);
190 190
191 return(NULL); 191 return(NULL);
192 } 192 }
193 193
194 int aim_freecookie(struct aim_msgcookie_t *cookie) { 194 static int aim_freecookie(struct aim_msgcookie_t *cookie) {
195 return(0); 195 return(0);
196 } 196 }
197 197
198 int aim_msgcookie_gettype(int reqclass) { 198 faim_internal int aim_msgcookie_gettype(int reqclass) {
199 /* XXX: hokey-assed. needs fixed. */ 199 /* XXX: hokey-assed. needs fixed. */
200 switch(reqclass) { 200 switch(reqclass) {
201 case AIM_CAPS_BUDDYICON: 201 case AIM_CAPS_BUDDYICON:
202 return AIM_COOKIETYPE_OFTICON; 202 return AIM_COOKIETYPE_OFTICON;
203 break; 203 break;