Merge branch 'mob' of git+ssh://localhost/srv/git/siplcs into mob
[siplcs.git] / src / core / sipe-ft.h
blob4b449dadb4bfa8657e94b0ea0ef939a91f9735fb
1 /**
2 * @file sipe-ft.h
4 * pidgin-sipe
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
24 #include <libpurple/ft.h>
25 #include "sipmsg.h"
27 /**
28 * Called when remote peer wants to send a file.
30 * Function initializes libpurple filetransfer API structure and calls
31 * purple_xfer_request().
33 * @param account PurpleAccount corresponding to the request
34 * @param msg SIP message
36 void sipe_ft_incoming_transfer(PurpleAccount *account, struct sipmsg *msg);
37 /**
38 * Handles incoming filetransfer message with ACCEPT invitation command.
40 * This message is sent during the negotiation phase when parameters of the
41 * transfer like IP address or TCP port are going to be set up.
43 * @param account PurpleAccount corresponding to the request
44 * @param msg SIP message
46 void sipe_ft_incoming_accept(PurpleAccount *account, struct sipmsg *msg);
47 /**
48 * Called when remote peer cancels ongoing file transfer.
50 * Function dispatches the request to libpurple
52 * @param account PurpleAccount corresponding to the request
53 * @param msg SIP message
55 void sipe_ft_incoming_cancel(PurpleAccount *account, struct sipmsg *msg);
56 /**
57 * Initiates outgoing file transfer, sending @c file to remote peer identified
58 * by @c who.
60 * @param gc a PurpleConnection
61 * @param who string identifying receiver of the file
62 * @param file local file system path of the file to send
64 void sipe_ft_send_file(PurpleConnection *gc, const char *who, const char *file);
65 /**
66 * Creates new PurpleXfer structure representing a file transfer.
68 * @param gc a PurpleConnection
69 * @param who remote participant in the file transfer session
71 PurpleXfer * sipe_ft_new_xfer(PurpleConnection *gc, const char *who);