comparison src/protocols/oscar/conn.c @ 13234:f2431a7e33aa

[gaim-migrate @ 15600] Massive oscar shuffling. No change in functionality. I renamed each of the files that contains stuff for a SNAC family. I started splitting the file transfer/direct connect stuff into peer.c and peer.h. I stopped using fu8_t, fu16_t and fu32_t and switched to guint8, guint16 and guint32 instead. I changed the SNAC family and subtype defines so they are more meaningful. Added LGPL copyright header to each file. Added myself to the AUTHORS file. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 11 Feb 2006 21:45:18 +0000
parents 68880c90a652
children f260d319bbbc
comparison
equal deleted inserted replaced
13233:f09c6e8df82c 13234:f2431a7e33aa
1 /*
2 * Gaim's oscar protocol plugin
3 * This file is the legal property of its developers.
4 * Please see the AUTHORS file distributed alongside this file.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
1 /** 21 /**
2 * Low-level connection handling. 22 * Low-level connection handling.
3 * 23 *
4 * Does all this gloriously nifty connection handling stuff... 24 * Does all this gloriously nifty connection handling stuff...
5 * 25 *
6 */ 26 */
7 27
8 #define FAIM_INTERNAL 28 #include "oscar.h"
9 #define FAIM_NEED_CONN_INTERNAL 29
10 #include <aim.h> 30 /* This is defined in oscar.h, but only when !FAIM_INTERNAL, since the rest of
11
12 /* This is defined in aim.h, but only when !FAIM_INTERNAL, since the rest of
13 * the library is not allowed to call it. */ 31 * the library is not allowed to call it. */
14 faim_export void aim_conn_kill(aim_session_t *sess, aim_conn_t **deadconn); 32 faim_export void aim_conn_kill(aim_session_t *sess, aim_conn_t **deadconn);
15 33
16 #ifndef _WIN32 34 #ifndef _WIN32
17 #include <netdb.h> 35 #include <netdb.h>
76 * have to be more creative. That is done rather early, though, so I don't 94 * have to be more creative. That is done rather early, though, so I don't
77 * think you have to worry about it. Unless you're me. I care deeply 95 * think you have to worry about it. Unless you're me. I care deeply
78 * about such inane things. 96 * about such inane things.
79 * 97 *
80 */ 98 */
81 faim_internal void aim_conn_addgroup(aim_conn_t *conn, fu16_t group) 99 faim_internal void aim_conn_addgroup(aim_conn_t *conn, guint16 group)
82 { 100 {
83 aim_conn_inside_t *ins = (aim_conn_inside_t *)conn->inside; 101 aim_conn_inside_t *ins = (aim_conn_inside_t *)conn->inside;
84 struct snacgroup *sg; 102 struct snacgroup *sg;
85 103
86 if (!(sg = malloc(sizeof(struct snacgroup)))) 104 if (!(sg = malloc(sizeof(struct snacgroup))))
93 ins->groups = sg; 111 ins->groups = sg;
94 112
95 return; 113 return;
96 } 114 }
97 115
98 faim_export aim_conn_t *aim_conn_findbygroup(aim_session_t *sess, fu16_t group) 116 faim_export aim_conn_t *aim_conn_findbygroup(aim_session_t *sess, guint16 group)
99 { 117 {
100 aim_conn_t *cur; 118 aim_conn_t *cur;
101 119
102 for (cur = sess->connlist; cur; cur = cur->next) { 120 for (cur = sess->connlist; cur; cur = cur->next) {
103 aim_conn_inside_t *ins = (aim_conn_inside_t *)cur->inside; 121 aim_conn_inside_t *ins = (aim_conn_inside_t *)cur->inside;
517 * stuff in the aim_session_t struct. 535 * stuff in the aim_session_t struct.
518 * 536 *
519 * @param sess Session to initialize. 537 * @param sess Session to initialize.
520 * @param nonblocking Set to true if you want connections to be non-blocking. 538 * @param nonblocking Set to true if you want connections to be non-blocking.
521 */ 539 */
522 faim_export void aim_session_init(aim_session_t *sess, fu8_t nonblocking) 540 faim_export void aim_session_init(aim_session_t *sess, guint8 nonblocking)
523 { 541 {
524 542
525 if (!sess) 543 if (!sess)
526 return; 544 return;
527 545