source: protocols/msn/invitation.h @ a6cd799

Last change on this file since a6cd799 was 6f10697, checked in by dequis <dx@…>, at 2015-01-16T19:50:23Z

Fix incorrect Free Software Foundation address

  • Property mode set to 100644
File size: 2.8 KB
Line 
1/********************************************************************\
2* BitlBee -- An IRC to other IM-networks gateway                     *
3*                                                                    *
4* Copyright 2006 Marijn Kruisselbrink and others                     *
5\********************************************************************/
6
7/* MSN module - File transfer support             */
8
9/*
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.
14 
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.
19 
20 You should have received a copy of the GNU General Public License with
21 the Debian GNU/Linux distribution in /usr/share/common-licenses/GPL;
22 if not, write to the Free Software Foundation, Inc., 51 Franklin St.,
23 Fifth Floor, Boston, MA  02110-1301  USA
24 */
25
26#ifndef _MSN_INVITATION_H
27#define _MSN_INVITATION_H
28
29#include "msn.h"
30
31#define MSN_INVITE_HEADERS      "MIME-Version: 1.0\r\n" \
32                                "Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n" \
33                                "\r\n"
34
35#define MSNFTP_PSIZE 2048
36
37typedef enum {
38        MSN_TRANSFER_RECEIVING  = 1,
39        MSN_TRANSFER_SENDING    = 2
40} msn_filetransfer_status_t;
41
42typedef struct msn_filetransfer
43{
44/* Generic invitation data */   
45        /* msn_data instance this invitation was received with. */
46        struct msn_data *md;
47        /* Cookie specifying this invitation. */
48        unsigned int invite_cookie;
49        /* Handle of user that started this invitation. */
50        char *handle;
51
52/* File transfer specific data */
53        /* Current status of the file transfer. */
54        msn_filetransfer_status_t status;
55        /* Pointer to the dcc structure for this transfer. */
56        file_transfer_t *dcc;
57        /* Socket the transfer is taking place over. */
58        int fd;
59        /* Cookie received in the original invitation, this must be sent as soon as
60           a connection has been established. */
61        unsigned int auth_cookie;
62        /* Data remaining to be received in the current packet. */
63        unsigned int data_remaining;
64        /* Buffer containing received, but unprocessed text. */
65        char tbuf[256];
66        unsigned int tbufpos;
67       
68        unsigned int data_sent;
69
70        gint r_event_id;
71        gint w_event_id;
72       
73        unsigned char sbuf[2048];
74        int sbufpos;
75
76} msn_filetransfer_t;
77
78void msn_invitation_invite( struct msn_switchboard *sb, char *handle, unsigned int cookie, char *body, int blen );
79void msn_invitation_accept( struct msn_switchboard *sb, char *handle, unsigned int cookie, char *body, int blen );
80void msn_invitation_cancel( struct msn_switchboard *sb, char *handle, unsigned int cookie, char *body, int blen );
81
82#endif
Note: See TracBrowser for help on using the repository browser.