Frameworks/Adium Framework/Source/AIAdiumProtocol.h
author Zachary West <zacw@adium.im>
Tue Jun 02 17:22:19 2009 -0400 (2009-06-02)
changeset 2450 08aa9c3a346c
parent 2048 88d7a58c12b8
child 3038 f599fa0d98d5
permissions -rw-r--r--
Create a new advanced preference called "Confirmations". Move Quit Confirmations there.

Adds a new confirmation type for closing message windows with more than 1 tab open. Fixes #12006.

This new preference has two options: always confirm, only confirm when there's unread content. Displays an alert sheet when trying to close the window.
Matt@1636
     1
/* 
Matt@1636
     2
 * Adium is the legal property of its developers, whose names are listed in the copyright file included
Matt@1636
     3
 * with this source distribution.
Matt@1636
     4
 * 
Matt@1636
     5
 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
Matt@1636
     6
 * General Public License as published by the Free Software Foundation; either version 2 of the License,
Matt@1636
     7
 * or (at your option) any later version.
Matt@1636
     8
 * 
Matt@1636
     9
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
Matt@1636
    10
 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
Matt@1636
    11
 * Public License for more details.
Matt@1636
    12
 * 
Matt@1636
    13
 * You should have received a copy of the GNU General Public License along with this program; if not,
Matt@1636
    14
 * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
David@0
    15
 */
David@0
    16
David@0
    17
@class AICoreComponentLoader, AICorePluginLoader;
David@0
    18
David@0
    19
typedef enum {
David@0
    20
	AIQuitConfirmAlways = 0,
David@0
    21
	AIQuitConfirmSelective
David@0
    22
} AIQuitConfirmationType;
David@0
    23
zacw@2450
    24
typedef enum {
zacw@2450
    25
	AIMessageCloseAlways = 0,
zacw@2450
    26
	AIMessageCloseUnread
zacw@2450
    27
} AIMessageCloseConfirmationType;
zacw@2450
    28
David@0
    29
@protocol AIAccountController, AIChatController, AIContactAlertsController, AIDebugController, AIEmoticonController,
David@9
    30
		AIPreferenceController, AIMenuController, AIApplescriptabilityController, AIStatusController,
David@9
    31
		AIContentController, AIToolbarController, AISoundController, AIDockController,
David@9
    32
		AIFileTransferController, AILoginController, AIInterfaceController, AIContactController;
David@0
    33
David@0
    34
@protocol AIAdium <NSObject>
David@89
    35
@property (readonly, nonatomic) NSObject<AIAccountController> *accountController;
David@89
    36
@property (readonly, nonatomic) NSObject<AIChatController> *chatController;
David@89
    37
@property (readonly, nonatomic) NSObject<AIContactController> *contactController;
David@89
    38
@property (readonly, nonatomic) NSObject<AIContentController> *contentController;
David@89
    39
@property (readonly, nonatomic) NSObject<AIDockController> *dockController;
David@89
    40
@property (readonly, nonatomic) NSObject<AIEmoticonController> *emoticonController;
David@89
    41
@property (readonly, nonatomic) NSObject<AIInterfaceController> *interfaceController;
David@89
    42
@property (readonly, nonatomic) NSObject<AILoginController> *loginController;
David@89
    43
@property (readonly, nonatomic) NSObject<AIMenuController> *menuController;
David@89
    44
@property (readonly, nonatomic) NSObject<AIPreferenceController> *preferenceController;
David@89
    45
@property (readonly, nonatomic) NSObject<AISoundController> *soundController;
David@89
    46
@property (readonly, nonatomic) NSObject<AIStatusController> *statusController;
David@89
    47
@property (readonly, nonatomic) NSObject<AIToolbarController> *toolbarController;
David@89
    48
@property (readonly, nonatomic) NSObject<AIContactAlertsController> *contactAlertsController;
David@89
    49
@property (readonly, nonatomic) NSObject<AIFileTransferController> *fileTransferController;
David@89
    50
@property (readonly, nonatomic) NSObject<AIDebugController> *debugController;
David@89
    51
@property (readonly, nonatomic) NSObject<AIApplescriptabilityController> *applescriptabilityController;
David@0
    52
David@89
    53
@property (readonly, nonatomic) AICoreComponentLoader *componentLoader;
David@89
    54
@property (readonly, nonatomic) AICorePluginLoader *pluginLoader;
David@0
    55
David@89
    56
@property (readonly, nonatomic) NSString *applicationSupportDirectory;
David@0
    57
- (NSString *)createResourcePathForName:(NSString *)name;
David@0
    58
- (NSArray *)resourcePathsForName:(NSString *)name;
David@0
    59
- (NSArray *)allResourcesForName:(NSString *)name withExtensions:(id)extensions;
David@0
    60
- (NSString *)pathOfPackWithName:(NSString *)name extension:(NSString *)extension resourceFolderName:(NSString *)folderName;
David@89
    61
@property (readonly, nonatomic) NSString *cachesPath;
David@0
    62
David@0
    63
- (NSComparisonResult)compareVersion:(NSString *)versionA toVersion:(NSString *)versionB;
David@0
    64
David@89
    65
@property (readonly, nonatomic) BOOL isQuitting;
David@0
    66
David@0
    67
@end
David@0
    68
David@0
    69
//Adium events
David@0
    70
#define KEY_EVENT_DISPLAY_NAME		@"DisplayName"
David@0
    71
#define KEY_EVENT_NOTIFICATION		@"Notification"
David@0
    72
David@0
    73
//Adium Notifications
David@0
    74
#define CONTACT_STATUS_ONLINE_YES			@"Contact_StatusOnlineYes"	// Contact signs on
David@0
    75
#define CONTACT_STATUS_ONLINE_NO			@"Contact_StatusOnlineNo"	// Contact signs off
David@0
    76
#define CONTACT_STATUS_AWAY_YES				@"Contact_StatusAwayYes"
David@0
    77
#define CONTACT_STATUS_AWAY_NO				@"Contact_StatusAwayNo"
David@0
    78
#define CONTACT_STATUS_IDLE_YES				@"Contact_StatusIdleYes"
David@0
    79
#define CONTACT_STATUS_IDLE_NO				@"Contact_StatusIdleNo"
David@0
    80
#define CONTACT_STATUS_MESSAGE				@"Contact_StatusMessage"
David@0
    81
#define CONTACT_SEEN_ONLINE_YES				@"Contact_SeenOnlineYes"
David@0
    82
#define CONTACT_SEEN_ONLINE_NO				@"Contact_SeenOnlineNo"
zacw@492
    83
#define CONTACT_STATUS_MOBILE_YES			@"Contact_StatusMobileYes"
zacw@492
    84
#define CONTACT_STATUS_MOBILE_NO			@"Contact_StatusMobileNo"
David@0
    85
#define CONTENT_MESSAGE_SENT				@"Content_MessageSent"
David@0
    86
#define CONTENT_MESSAGE_RECEIVED			@"Content_MessageReceived"
David@0
    87
#define CONTENT_MESSAGE_RECEIVED_GROUP		@"Content_MessageReceivedGroup"
David@0
    88
#define CONTENT_MESSAGE_RECEIVED_FIRST		@"Content_MessageReceivedFirst"
David@0
    89
#define CONTENT_MESSAGE_RECEIVED_BACKGROUND	@"Content_MessageReceivedBackground"
David@0
    90
#define CONTENT_MESSAGE_RECEIVED_BACKGROUND_GROUP		@"Content_MessageReceivedBackgroundGroup"
David@0
    91
#define CONTENT_NUDGE_BUZZ_OCCURED			@"Content_NudgeBuzzOccured"
David@0
    92
#define CONTENT_CONTACT_JOINED_CHAT			@"Content_ContactJoinedChat"
David@0
    93
#define CONTENT_CONTACT_LEFT_CHAT			@"Content_ContactLeftChat"
David@0
    94
#define CONTENT_GROUP_CHAT_INVITE			@"Content_GroupChatInvite"
David@0
    95
#define CONTENT_GROUP_CHAT_MENTION			@"Content_GroupChatMention"
David@0
    96
#define INTERFACE_ERROR_MESSAGE				@"Interface_ErrorMessageReceived"
David@0
    97
David@0
    98
/* Note: The account connected/disconnected events are aggregated for many accounts connecting simultaneously.
David@0
    99
 * Use a list object observer (see AIContactController) if you are concerned about specific account connectivity changes.
David@0
   100
 */
David@0
   101
#define ACCOUNT_CONNECTED					@"Account_Connected"
David@0
   102
#define ACCOUNT_DISCONNECTED				@"Account_Disconnected"
David@0
   103
David@0
   104
#define	ACCOUNT_RECEIVED_EMAIL				@"Account_NewMailReceived"
David@0
   105
#define FILE_TRANSFER_REQUEST				@"FileTransfer_Request"
David@0
   106
#define FILE_TRANSFER_CHECKSUMMING			@"FileTransfer_Checksumming"
David@0
   107
#define FILE_TRANSFER_WAITING_REMOTE		@"File_Transfer_WaitingRemote"
David@0
   108
#define FILE_TRANSFER_BEGAN					@"FileTransfer_Began"
David@0
   109
#define FILE_TRANSFER_CANCELLED				@"FileTransfer_Cancelled"
David@0
   110
#define FILE_TRANSFER_FAILED				@"FileTransfer_Failed"
David@0
   111
#define FILE_TRANSFER_COMPLETE				@"FileTransfer_Complete"
David@0
   112
David@0
   113
#define AIXtrasDidChangeNotification				@"AIXtrasDidChange"
David@0
   114
#define AIApplicationDidFinishLoadingNotification	@"AIApplicationDidFinishLoading"
David@0
   115
#define AIAppWillTerminateNotification				@"AIAppWillTerminate"
David@0
   116
#define AIShowLogAtPathNotification					@"AIShowLogAtPath"
zacw@1705
   117
#define AIShowLogViewerAndReindexNotification		@"AIShowLogViewerAndReindex"
David@0
   118
#define AINetworkDidChangeNotification				@"AINetworkDidChange"