1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/Frameworks/libpurple.framework/Versions/0.6.2/Headers/slplink.h Fri Aug 21 13:25:11 2009 -0700
1.3 @@ -0,0 +1,95 @@
1.4 +/**
1.5 + * @file slplink.h MSNSLP Link support
1.6 + *
1.7 + * purple
1.8 + *
1.9 + * Purple is the legal property of its developers, whose names are too numerous
1.10 + * to list here. Please refer to the COPYRIGHT file distributed with this
1.11 + * source distribution.
1.12 + *
1.13 + * This program is free software; you can redistribute it and/or modify
1.14 + * it under the terms of the GNU General Public License as published by
1.15 + * the Free Software Foundation; either version 2 of the License, or
1.16 + * (at your option) any later version.
1.17 + *
1.18 + * This program is distributed in the hope that it will be useful,
1.19 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.20 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.21 + * GNU General Public License for more details.
1.22 + *
1.23 + * You should have received a copy of the GNU General Public License
1.24 + * along with this program; if not, write to the Free Software
1.25 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
1.26 + */
1.27 +#ifndef _MSN_SLPLINK_H_
1.28 +#define _MSN_SLPLINK_H_
1.29 +
1.30 +typedef struct _MsnSlpLink MsnSlpLink;
1.31 +
1.32 +#include "directconn.h"
1.33 +#include "slpcall.h"
1.34 +#include "slpmsg.h"
1.35 +
1.36 +#include "switchboard.h"
1.37 +
1.38 +#include "ft.h"
1.39 +
1.40 +#include "session.h"
1.41 +
1.42 +typedef void (*MsnSlpCb)(MsnSlpCall *slpcall,
1.43 + const guchar *data, gsize size);
1.44 +typedef void (*MsnSlpEndCb)(MsnSlpCall *slpcall, MsnSession *session);
1.45 +
1.46 +struct _MsnSlpLink
1.47 +{
1.48 + MsnSession *session;
1.49 + MsnSwitchBoard *swboard;
1.50 +
1.51 + char *remote_user;
1.52 +
1.53 + int slp_seq_id;
1.54 +
1.55 + MsnDirectConn *directconn;
1.56 +
1.57 + GList *slp_calls;
1.58 + GList *slp_msgs;
1.59 +
1.60 + GQueue *slp_msg_queue;
1.61 +};
1.62 +
1.63 +void msn_slplink_destroy(MsnSlpLink *slplink);
1.64 +
1.65 +/**
1.66 + * @return An MsnSlpLink for the given user, or NULL if there is no
1.67 + * existing MsnSlpLink.
1.68 + */
1.69 +MsnSlpLink *msn_session_find_slplink(MsnSession *session,
1.70 + const char *who);
1.71 +
1.72 +/**
1.73 + * @return An MsnSlpLink for the given user. One will be created if
1.74 + * it does not already exist.
1.75 + */
1.76 +MsnSlpLink *msn_session_get_slplink(MsnSession *session, const char *username);
1.77 +
1.78 +void msn_slplink_add_slpcall(MsnSlpLink *slplink, MsnSlpCall *slpcall);
1.79 +void msn_slplink_remove_slpcall(MsnSlpLink *slplink, MsnSlpCall *slpcall);
1.80 +MsnSlpCall *msn_slplink_find_slp_call(MsnSlpLink *slplink,
1.81 + const char *id);
1.82 +MsnSlpCall *msn_slplink_find_slp_call_with_session_id(MsnSlpLink *slplink, long id);
1.83 +void msn_slplink_queue_slpmsg(MsnSlpLink *slplink, MsnSlpMessage *slpmsg);
1.84 +void msn_slplink_send_slpmsg(MsnSlpLink *slplink,
1.85 + MsnSlpMessage *slpmsg);
1.86 +void msn_slplink_send_queued_slpmsgs(MsnSlpLink *slplink);
1.87 +void msn_slplink_process_msg(MsnSlpLink *slplink, MsnMessage *msg);
1.88 +void msn_slplink_request_ft(MsnSlpLink *slplink, PurpleXfer *xfer);
1.89 +
1.90 +void msn_slplink_request_object(MsnSlpLink *slplink,
1.91 + const char *info,
1.92 + MsnSlpCb cb,
1.93 + MsnSlpEndCb end_cb,
1.94 + const MsnObject *obj);
1.95 +
1.96 +MsnSlpCall *msn_slp_process_msg(MsnSlpLink *slplink, MsnSlpMessage *slpmsg);
1.97 +
1.98 +#endif /* _MSN_SLPLINK_H_ */