6 * Copyright (C) 2010 Jakub Adam <jakub.adam@tieto.com>
7 * Copyright (C) 2010 Tomáš Hrabčík <tomas.hrabcik@tieto.com>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 * Interface dependencies:
30 /* Forward declarations */
32 struct _PurpleAccount
;
35 * Called when remote peer wants to send a file.
37 * Function initializes libpurple filetransfer API structure and calls
38 * purple_xfer_request().
40 * @param account PurpleAccount corresponding to the request
41 * @param msg SIP message
42 * @param body parsed SIP message body as name-value pairs
44 void sipe_ft_incoming_transfer(struct _PurpleAccount
*account
, struct sipmsg
*msg
, const GSList
*body
);
46 * Handles incoming filetransfer message with ACCEPT invitation command.
48 * This message is sent during the negotiation phase when parameters of the
49 * transfer like IP address or TCP port are going to be set up.
51 * @param account PurpleAccount corresponding to the request
52 * @param body parsed SIP message body as name-value pairs
54 void sipe_ft_incoming_accept(struct _PurpleAccount
*account
, const GSList
*body
);
56 * Called when remote peer cancels ongoing file transfer.
58 * Function dispatches the request to libpurple
60 * @param account PurpleAccount corresponding to the request
61 * @param body parsed SIP message body as name-value pairs
63 void sipe_ft_incoming_cancel(struct _PurpleAccount
*account
, GSList
*body
);
66 * Parses file transfer message body and creates a list with name-value pairs
68 * @param body file transfer SIP message body
70 * @return GSList of name-value pairs parsed from message body, NULL if body has
73 GSList
* sipe_ft_parse_msg_body(const gchar
*body
);