Update contact email
[siplcs.git] / src / core / sipe-ft.h
blobcb98bd5e1ed76cac90b827f830c0fe0a0f9f1098
1 /**
2 * @file sipe-ft.h
4 * pidgin-sipe
6 * Copyright (C) 2010 SIPE Project <http://sipe.sourceforge.net/>
7 * Copyright (C) 2010 Jakub Adam <jakub.adam@ktknet.cz>
8 * Copyright (C) 2010 Tomáš Hrabčík <tomas.hrabcik@tieto.com>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 /* Forward declarations */
26 struct sipe_core_private;
27 struct sipe_file_transfer;
30 /**
31 * Deallocate file transfer data structure
33 void sipe_core_ft_deallocate(struct sipe_file_transfer *ft);
35 /**
36 * Called when remote peer wants to send a file.
38 * Function initializes libpurple filetransfer API structure and calls
39 * purple_xfer_request().
41 * @param sipe_private Sipe core private data
42 * @param dialog SIP dialog used for the file transfer
43 * @param body parsed SIP message body as name-value pairs
45 void sipe_ft_incoming_transfer(struct sipe_core_private *sipe_private,
46 struct sip_dialog *dialog,
47 const GSList *body);
49 /**
50 * Handles incoming filetransfer message with ACCEPT invitation command.
52 * This message is sent during the negotiation phase when parameters of the
53 * transfer like IP address or TCP port are going to be set up.
55 * @param dialog SIP dialog used for the file transfer
56 * @param body parsed SIP message body as name-value pairs
58 void sipe_ft_incoming_accept(struct sip_dialog *dialog, const GSList *body);
60 /**
61 * Called when remote peer cancels ongoing file transfer.
63 * Function dispatches the request to libpurple
65 * @param dialog SIP dialog used for the file transfer
66 * @param body parsed SIP message body as name-value pairs
68 void sipe_ft_incoming_cancel(struct sip_dialog *dialog, const GSList *body);
70 /**
71 * Parses file transfer message body and creates a list with name-value pairs
73 * @param body file transfer SIP message body
75 * @return GSList of name-value pairs parsed from message body, NULL if body has
76 * incorrect format
78 GSList *sipe_ft_parse_msg_body(const gchar *body);