French updates
[adiumx.git] / Source / ESFileTransferController.h
blobfed4519893632577a8872df56092481d5bcb45a9
1 /*
2 * Adium is the legal property of its developers, whose names are listed in the copyright file included
3 * with this source distribution.
4 *
5 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
6 * General Public License as published by the Free Software Foundation; either version 2 of the License,
7 * or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
10 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
11 * Public License for more details.
13 * You should have received a copy of the GNU General Public License along with this program; if not,
14 * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 #define FileTransfer_NewFileTransfer @"NewFileTransfer"
19 #define PREF_GROUP_FILE_TRANSFER @"FileTransfer"
21 #define KEY_FT_AUTO_ACCEPT @"FT AutoAccept"
22 #define KEY_FT_AUTO_OPEN_SAFE @"FT AutoOpenSafe"
23 #define KEY_FT_AUTO_CLEAR_COMPLETED @"FT AutoClearCompleted"
24 #define KEY_FT_SHOW_PROGRESS_WINDOW @"FT ShowProgressWindow"
26 typedef enum {
27 Unknown_FileTransfer = 0,
28 Incoming_FileTransfer,
29 Outgoing_FileTransfer,
30 } FileTransferType;
32 typedef enum {
33 Unknown_Status_FileTransfer = 0,
34 Not_Started_FileTransfer, //File transfer is pending confirmation from a user, either local or remote
35 Accepted_FileTransfer, //Could also be called Began_FileTransfer or Started_FileTransfer
36 In_Progress_FileTransfer, //Currently transferring, not yet complete
37 Complete_FileTransfer, //File is complete; transferring is finished.
38 Canceled_Local_FileTransfer, //The local user canceled the transfer
39 Canceled_Remote_FileTransfer //The remote user canceled the transfer
40 } FileTransferStatus;
42 typedef enum {
43 AutoAccept_None = 0,
44 AutoAccept_All,
45 AutoAccept_FromContactList,
46 } FTAutoAcceptType;
48 @class ESFileTransfer, AIListContact, AIAccount;
50 @protocol AIEventHandler;
52 //File transfers
53 @interface ESFileTransferController : NSObject <AIEventHandler> {
54 IBOutlet AIAdium *adium;
56 NSMenuItem *menuItem_sendFile;
57 NSMenuItem *menuItem_sendFileContext;
59 NSMenuItem *menuItem_showFileTransferProgress;
61 NSMutableArray *fileTransferArray;
62 NSSet *safeFileExtensions;
64 FTAutoAcceptType autoAcceptType;
65 BOOL autoChooseFolder;
66 BOOL autoOpenSafe;
67 BOOL autoClearCompletedTransfers;
68 BOOL showProgressWindow;
71 //Should be the only vendor of new ESFileTransfer* objects, as it creates, tracks, and returns them
72 - (ESFileTransfer *)newFileTransferWithContact:(AIListContact *)inContact forAccount:(AIAccount *)inAccount;
73 - (NSArray *)fileTransferArray;
75 - (NSWindowController *)receiveRequestForFileTransfer:(ESFileTransfer *)fileTransfer;
77 - (void)fileTransfer:(ESFileTransfer *)fileTransfer didSetStatus:(FileTransferStatus)status;
79 - (void)sendFile:(NSString *)inFile toListContact:(AIListContact *)listContact;
80 - (void)requestForSendingFileToListContact:(AIListContact *)listContact;
82 - (NSString *)stringForSize:(unsigned long long)inSize;
83 - (NSString *)stringForSize:(unsigned long long)inSize of:(unsigned long long)totalSize ofString:(NSString *)totalSizeString;
85 //Private
86 - (void)initController;
87 - (void)closeController;
89 @end