Do not include framework files
This commit is contained in:
parent
d35b07cf11
commit
c665c95a04
1848 changed files with 0 additions and 684663 deletions
|
@ -1 +0,0 @@
|
|||
Versions/Current/Adium
|
|
@ -1 +0,0 @@
|
|||
Versions/Current/Headers
|
|
@ -1 +0,0 @@
|
|||
Versions/Current/PrivateHeaders
|
|
@ -1 +0,0 @@
|
|||
Versions/Current/Resources
|
Binary file not shown.
|
@ -1,132 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIAccount.h>
|
||||
#import <Adium/AIPasswordPromptController.h>
|
||||
|
||||
typedef enum {
|
||||
AIReconnectNever = 0,
|
||||
AIReconnectNeverNoMessage,
|
||||
AIReconnectImmediately,
|
||||
AIReconnectNormally
|
||||
} AIReconnectDelayType;
|
||||
|
||||
@interface AIAccount (Abstract)
|
||||
|
||||
- (id)initWithUID:(NSString *)inUID internalObjectID:(NSString *)inInternalObjectID service:(AIService *)inService;
|
||||
@property (readwrite, retain, nonatomic) NSData *userIconData;
|
||||
@property (readwrite, nonatomic) BOOL enabled;
|
||||
@property (readonly, nonatomic) NSString *host;
|
||||
@property (readonly, nonatomic) int port;
|
||||
- (void)filterAndSetUID:(NSString *)inUID;
|
||||
|
||||
//Status
|
||||
- (void)preferencesChangedForGroup:(NSString *)group key:(NSString *)key object:(AIListObject *)object
|
||||
preferenceDict:(NSDictionary *)prefDict firstTime:(BOOL)firstTime;
|
||||
- (void)silenceAllContactUpdatesForInterval:(NSTimeInterval)interval;
|
||||
- (void)updateContactStatus:(AIListContact *)inContact;
|
||||
- (void)updateCommonStatusForKey:(NSString *)key;
|
||||
@property (readwrite, retain, nonatomic) AIStatus *statusState;
|
||||
@property (readonly, nonatomic) AIStatus *actualStatusState;
|
||||
- (void)setStatusStateAndRemainOffline:(AIStatus *)statusState;
|
||||
|
||||
/*!
|
||||
* @brief Sent by an account to itself to update its user icon
|
||||
*
|
||||
* Both NSImage and NSData forms are passed to prevent duplication of data; either or both may be used.
|
||||
*
|
||||
* The image should be resized as needed for the protocol.
|
||||
*
|
||||
* Subclasses MUST call super's implementation.
|
||||
*
|
||||
* @param image An NSImage of the user icon, or nil if no image.
|
||||
* @param originalData The original data which made the image, which may be in any NSImage-compatible format, or nil if no image.
|
||||
*/
|
||||
- (void)setAccountUserImage:(NSImage *)image withData:(NSData *)originalData;
|
||||
|
||||
/*!
|
||||
* @brief Called when the account was edited.
|
||||
*/
|
||||
- (void)accountEdited;
|
||||
|
||||
//Auto-Refreshing Status String
|
||||
- (NSAttributedString *)autoRefreshingOutgoingContentForStatusKey:(NSString *)key;
|
||||
- (void)autoRefreshingOutgoingContentForStatusKey:(NSString *)key selector:(SEL)selector context:(id)originalContext;
|
||||
- (NSAttributedString *)autoRefreshingOriginalAttributedStringForStatusKey:(NSString *)key;
|
||||
- (void)setValue:(id)value forProperty:(NSString *)key notify:(NotifyTiming)notify;
|
||||
- (void)startAutoRefreshingStatusKey:(NSString *)key forOriginalValueString:(NSString *)originalValueString;
|
||||
- (void)stopAutoRefreshingStatusKey:(NSString *)key;
|
||||
- (void)_startAttributedRefreshTimer;
|
||||
- (void)_stopAttributedRefreshTimer;
|
||||
- (void)gotFilteredStatusMessage:(NSAttributedString *)statusMessage forStatusState:(AIStatus *)statusState;
|
||||
- (void)updateLocalDisplayNameTo:(NSAttributedString *)displayName;
|
||||
@property (readonly, nonatomic) NSString *currentDisplayName;
|
||||
|
||||
//Contacts
|
||||
@property (readonly, nonatomic) NSArray *contacts;
|
||||
- (AIListContact *)contactWithUID:(NSString *)sourceUID;
|
||||
- (void)removeAllContacts;
|
||||
- (void)removePropertyValuesFromContact:(AIListContact *)listContact silently:(BOOL)silent;
|
||||
- (NSString *)fallbackAliasForContact:(AIListContact *)contact inChat:(AIChat *)chat;
|
||||
- (AIAccountGroupDeletionResponse)willDeleteGroup:(AIListGroup *)group;
|
||||
|
||||
//Connectivity
|
||||
@property (readwrite, nonatomic) BOOL shouldBeOnline;
|
||||
- (void)toggleOnline;
|
||||
- (void)didConnect;
|
||||
@property (readonly, nonatomic) NSSet *contactProperties;
|
||||
- (void)didDisconnect;
|
||||
- (void)connectScriptCommand:(NSScriptCommand *)command;
|
||||
- (void)disconnectScriptCommand:(NSScriptCommand *)command;
|
||||
- (void)serverReportedInvalidPassword;
|
||||
- (void)getProxyConfigurationNotifyingTarget:(id)target selector:(SEL)selector context:(id)context;
|
||||
- (NSString *)lastDisconnectionError;
|
||||
- (void)setLastDisconnectionError:(NSString *)inError;
|
||||
- (AIReconnectDelayType)shouldAttemptReconnectAfterDisconnectionError:(NSString * __strong *)disconnectionError;
|
||||
@property (readonly, nonatomic) BOOL encrypted;
|
||||
|
||||
//FUS Disconnecting
|
||||
- (void)autoReconnectAfterDelay:(NSTimeInterval)delay;
|
||||
- (double)minimumReconnectTime;
|
||||
- (void)cancelAutoReconnect;
|
||||
- (void)initFUSDisconnecting;
|
||||
|
||||
- (void)setPasswordTemporarily:(NSString *)inPassword;
|
||||
/*!
|
||||
* @brief While we are connected, return the password used to connect
|
||||
*
|
||||
* This will not look up the password in the keychain. Results are undefined if we are not connected.
|
||||
*/
|
||||
@property (readonly, nonatomic) NSString *passwordWhileConnected;
|
||||
|
||||
@end
|
||||
|
||||
@interface AIAccount (Abstract_ForSubclasses)
|
||||
//Chats
|
||||
- (void)displayYouHaveConnectedInChat:(AIChat *)chat;
|
||||
|
||||
- (void)passwordReturnedForConnect:(NSString *)inPassword
|
||||
returnCode:(AIPasswordPromptReturn)returnCode
|
||||
context:(id)inContext;
|
||||
|
||||
/*!
|
||||
* @brief Does joining a group chat require more information than is contained in the name alone?
|
||||
*
|
||||
* Default returns NO. Subclasses should return YES if additional information (via a chatCreationDictionary) is needed.
|
||||
*/
|
||||
- (BOOL)joiningGroupChatRequiresCreationDictionary;
|
||||
|
||||
@end
|
|
@ -1,245 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIWindowController.h>
|
||||
#import <AIUtilities/AISmoothTooltipTracker.h>
|
||||
|
||||
@class AIAutoScrollView, AIContactList, AIListOutlineView, AIListContactCell, AIListGroupCell, ESObjectWithProperties, AIListObject, AIListContact, AIChat;
|
||||
|
||||
@protocol AIContainingObject;
|
||||
|
||||
#define LIST_LAYOUT_FOLDER @"Contact List"
|
||||
#define LIST_LAYOUT_EXTENSION @"ListLayout"
|
||||
#define PREF_GROUP_LIST_LAYOUT @"List Layout"
|
||||
|
||||
#define KEY_LIST_LAYOUT_ALIGNMENT @"Contact Text Alignment"
|
||||
#define KEY_LIST_LAYOUT_GROUP_ALIGNMENT @"Group Text Alignment"
|
||||
#define KEY_LIST_LAYOUT_SHOW_ICON @"Show User Icon"
|
||||
#define KEY_LIST_LAYOUT_USER_ICON_SIZE @"User Icon Size"
|
||||
#define KEY_LIST_LAYOUT_SHOW_EXT_STATUS @"Show Extended Status"
|
||||
#define KEY_LIST_LAYOUT_SHOW_STATUS_ICONS @"Show Status Icons"
|
||||
#define KEY_LIST_LAYOUT_SHOW_SERVICE_ICONS @"Show Service Icons"
|
||||
#define KEY_LIST_LAYOUT_WINDOW_STYLE @"Window Style"
|
||||
|
||||
#define KEY_LIST_LAYOUT_EXTENDED_STATUS_STYLE @"Extended Status Style"
|
||||
#define KEY_LIST_LAYOUT_EXTENDED_STATUS_POSITION @"Extended Status Position"
|
||||
#define KEY_LIST_LAYOUT_USER_ICON_POSITION @"User Icon Position"
|
||||
#define KEY_LIST_LAYOUT_STATUS_ICON_POSITION @"Status Icon Position"
|
||||
#define KEY_LIST_LAYOUT_SERVICE_ICON_POSITION @"Service Icon Position"
|
||||
|
||||
#define KEY_LIST_LAYOUT_CONTACT_SPACING @"Contact Spacing"
|
||||
#define KEY_LIST_LAYOUT_GROUP_TOP_SPACING @"Group Top Spacing"
|
||||
|
||||
#define KEY_LIST_LAYOUT_VERTICAL_AUTOSIZE @"Vertical Autosizing"
|
||||
#define KEY_LIST_LAYOUT_HORIZONTAL_AUTOSIZE @"Horizontal Autosizing"
|
||||
#define KEY_LIST_LAYOUT_HORIZONTAL_WIDTH @"Horizontal Width"
|
||||
#define KEY_LIST_LAYOUT_VERTICAL_HEIGHT @"Vertical Height"
|
||||
#define KEY_LIST_LAYOUT_WINDOW_OPACITY @"Window Opacity"
|
||||
|
||||
#define KEY_LIST_LAYOUT_CONTACT_FONT @"Contact Font"
|
||||
#define KEY_LIST_LAYOUT_STATUS_FONT @"Status Font"
|
||||
#define KEY_LIST_LAYOUT_GROUP_FONT @"Group Font"
|
||||
|
||||
#define KEY_LIST_LAYOUT_CONTACT_LEFT_INDENT @"Contact Left Indent"
|
||||
#define KEY_LIST_LAYOUT_CONTACT_RIGHT_INDENT @"Contact Right Indent"
|
||||
|
||||
#define KEY_LIST_LAYOUT_OUTLINE_BUBBLE @"Outline Bubble"
|
||||
#define KEY_LIST_LAYOUT_CONTACT_BUBBLE_GRADIENT @"Contact Bubble Draw With Gradient"
|
||||
#define KEY_LIST_LAYOUT_GROUP_HIDE_BUBBLE @"Group Hide Bubble"
|
||||
#define KEY_LIST_LAYOUT_OUTLINE_BUBBLE_WIDTH @"Outline Bubble Line Width"
|
||||
|
||||
typedef enum {
|
||||
AIContactListWindowStyleStandard = 0,
|
||||
AIContactListWindowStyleBorderless,
|
||||
AIContactListWindowStyleGroupBubbles,
|
||||
AIContactListWindowStyleContactBubbles,
|
||||
AIContactListWindowStyleContactBubbles_Fitted,
|
||||
AIContactListWindowStyleGroupChat
|
||||
} AIContactListWindowStyle;
|
||||
|
||||
typedef enum {
|
||||
LIST_POSITION_NA = -1,
|
||||
LIST_POSITION_FAR_LEFT,
|
||||
LIST_POSITION_LEFT,
|
||||
LIST_POSITION_RIGHT,
|
||||
LIST_POSITION_FAR_RIGHT,
|
||||
LIST_POSITION_BADGE_LEFT,
|
||||
LIST_POSITION_BADGE_RIGHT,
|
||||
} LIST_POSITION;
|
||||
|
||||
typedef enum {
|
||||
EXTENDED_STATUS_POSITION_BESIDE_NAME = 0,
|
||||
EXTENDED_STATUS_POSITION_BELOW_NAME,
|
||||
EXTENDED_STATUS_POSITION_BOTH
|
||||
} EXTENDED_STATUS_POSITION;
|
||||
|
||||
typedef enum {
|
||||
STATUS_ONLY = 0,
|
||||
IDLE_ONLY,
|
||||
IDLE_AND_STATUS
|
||||
} EXTENDED_STATUS_STYLE;
|
||||
|
||||
//AIListThemeWindowController defines
|
||||
#define LIST_THEME_FOLDER @"Contact List"
|
||||
#define LIST_THEME_EXTENSION @"ListTheme"
|
||||
#define PREF_GROUP_LIST_THEME @"List Theme"
|
||||
|
||||
// Contact List Colors Enabled
|
||||
#define KEY_AWAY_ENABLED @"Away Enabled"
|
||||
#define KEY_IDLE_ENABLED @"Idle Enabled"
|
||||
#define KEY_TYPING_ENABLED @"Typing Enabled"
|
||||
#define KEY_SIGNED_OFF_ENABLED @"Signed Off Enabled"
|
||||
#define KEY_SIGNED_ON_ENABLED @"Signed On Enabled"
|
||||
#define KEY_UNVIEWED_ENABLED @"Unviewed Content Enabled"
|
||||
#define KEY_ONLINE_ENABLED @"Online Enabled"
|
||||
#define KEY_IDLE_AWAY_ENABLED @"Idle And Away Enabled"
|
||||
#define KEY_OFFLINE_ENABLED @"Offline Enabled"
|
||||
#define KEY_MOBILE_ENABLED @"Mobile Enabled"
|
||||
|
||||
#define KEY_LABEL_AWAY_COLOR @"Away Label Color"
|
||||
#define KEY_LABEL_IDLE_COLOR @"Idle Label Color"
|
||||
#define KEY_LABEL_TYPING_COLOR @"Typing Label Color"
|
||||
#define KEY_LABEL_SIGNED_OFF_COLOR @"Signed Off Label Color"
|
||||
#define KEY_LABEL_SIGNED_ON_COLOR @"Signed On Label Color"
|
||||
#define KEY_LABEL_UNVIEWED_COLOR @"Unviewed Content Label Color"
|
||||
#define KEY_LABEL_ONLINE_COLOR @"Online Label Color"
|
||||
#define KEY_LABEL_IDLE_AWAY_COLOR @"Idle And Away Label Color"
|
||||
#define KEY_LABEL_OFFLINE_COLOR @"Offline Label Color"
|
||||
#define KEY_LABEL_MOBILE_COLOR @"Mobile Label Color"
|
||||
|
||||
#define KEY_AWAY_COLOR @"Away Color"
|
||||
#define KEY_IDLE_COLOR @"Idle Color"
|
||||
#define KEY_TYPING_COLOR @"Typing Color"
|
||||
#define KEY_SIGNED_OFF_COLOR @"Signed Off Color"
|
||||
#define KEY_SIGNED_ON_COLOR @"Signed On Color"
|
||||
#define KEY_UNVIEWED_COLOR @"Unviewed Content Color"
|
||||
#define KEY_ONLINE_COLOR @"Online Color"
|
||||
#define KEY_IDLE_AWAY_COLOR @"Idle And Away Color"
|
||||
#define KEY_OFFLINE_COLOR @"Offline Color"
|
||||
#define KEY_MOBILE_COLOR @"Mobile Color"
|
||||
|
||||
#define KEY_LIST_THEME_BACKGROUND_IMAGE_ENABLED @"Use Background Image"
|
||||
#define KEY_LIST_THEME_BACKGROUND_IMAGE_PATH @"Background Image Path"
|
||||
#define KEY_LIST_THEME_BACKGROUND_FADE @"Background Fade"
|
||||
#define KEY_LIST_THEME_BACKGROUND_IMAGE_STYLE @"Background Image Style"
|
||||
|
||||
#define KEY_LIST_THEME_BACKGROUND_COLOR @"Background Color"
|
||||
#define KEY_LIST_THEME_HIGHLIGHT_COLOR @"Highlight Color"
|
||||
#define KEY_LIST_THEME_GRID_COLOR @"Grid Color"
|
||||
|
||||
#define KEY_LIST_THEME_GROUP_BACKGROUND @"Group Background"
|
||||
#define KEY_LIST_THEME_GROUP_BACKGROUND_GRADIENT @"Group Background Gradient"
|
||||
#define KEY_LIST_THEME_GROUP_TEXT_COLOR @"Group Text Color"
|
||||
#define KEY_LIST_THEME_GROUP_TEXT_COLOR_INVERTED @"Group Inverted Text Color"
|
||||
#define KEY_LIST_THEME_GROUP_SHADOW_COLOR @"Group Shadow Color"
|
||||
#define KEY_LIST_THEME_GROUP_GRADIENT @"Group Gradient"
|
||||
#define KEY_LIST_THEME_GROUP_SHADOW @"Group Shadow"
|
||||
|
||||
#define KEY_LIST_THEME_CONTACT_STATUS_COLOR @"Contact Status Text Color"
|
||||
|
||||
#define KEY_LIST_THEME_GRID_ENABLED @"Grid Enabled"
|
||||
#define KEY_LIST_THEME_HIGHLIGHT_ENABLED @"Custom Highlight Enabled"
|
||||
#define KEY_LIST_THEME_BACKGROUND_AS_STATUS @"Background As Status"
|
||||
#define KEY_LIST_THEME_BACKGROUND_AS_EVENTS @"Background As Events"
|
||||
|
||||
#define KEY_LIST_THEME_FADE_OFFLINE_IMAGES @"Fade Offline Images"
|
||||
|
||||
#define AIPerformExpandItemNotification @"AIPerformExpandItemNotification"
|
||||
#define AIPerformCollapseItemNotification @"AIPerformCollapseItemNotification"
|
||||
#define AIDisplayableContainedObjectsDidChange @"AIDisplayableContainedObjectsDidChange"
|
||||
|
||||
@protocol AIListControllerDelegate
|
||||
- (IBAction)performDefaultActionOnSelectedObject:(AIListObject *)selectedObject sender:(NSOutlineView *)sender;
|
||||
@end
|
||||
|
||||
@interface NSObject(AIListControllerOptionalDelegateMethods)
|
||||
- (void)toggleFindPanel:(id)sender;
|
||||
- (BOOL)forwardKeyEventToFindPanel:(NSEvent *)theEvent;
|
||||
@end
|
||||
|
||||
@interface AIAbstractListController : NSObject <AISmoothTooltipTrackerDelegate, NSOutlineViewDelegate, NSOutlineViewDataSource> {
|
||||
AIAutoScrollView *scrollView_contactList;
|
||||
AIListOutlineView *contactListView;
|
||||
|
||||
AISmoothTooltipTracker *tooltipTracker;
|
||||
|
||||
AIListContactCell *contentCell;
|
||||
AIListGroupCell *groupCell;
|
||||
|
||||
ESObjectWithProperties<AIContainingObject> *contactList;
|
||||
BOOL hideRoot;
|
||||
|
||||
CGFloat backgroundOpacity;
|
||||
|
||||
NSArray *dragItems;
|
||||
|
||||
BOOL configuredViewsAndTooltips;
|
||||
|
||||
id delegate;
|
||||
|
||||
BOOL showTooltips;
|
||||
BOOL showTooltipsInBackground;
|
||||
|
||||
BOOL useContactListGroups;
|
||||
int indentationPerLevel[9];
|
||||
}
|
||||
@property (readonly, nonatomic) AIListOutlineView *contactListView;
|
||||
|
||||
- (id)initWithContactListView:(AIListOutlineView *)inContactListView inScrollView:(AIAutoScrollView *)inScrollView_contactList delegate:(id<AIListControllerDelegate>)inDelegate;
|
||||
- (id)delegate;
|
||||
- (void)contactListWillBeRemovedFromWindow;
|
||||
- (void)contactListWasAddedBackToWindow;
|
||||
|
||||
- (void)setContactListRoot:(ESObjectWithProperties<AIContainingObject> *)newContactListRoot;
|
||||
- (ESObjectWithProperties<AIContainingObject> *)contactListRoot;
|
||||
|
||||
- (void)setHideRoot:(BOOL)inHideRoot;
|
||||
- (void)setUseContactListGroups:(BOOL)useContactListGroups;
|
||||
- (void)reloadData;
|
||||
|
||||
- (void)setBackgroundOpacity:(CGFloat)opacity;
|
||||
|
||||
- (IBAction)performDefaultActionOnSelectedItem:(NSOutlineView *)sender;
|
||||
|
||||
- (void)updateLayoutFromPrefDict:(NSDictionary *)prefDict andThemeFromPrefDict:(NSDictionary *)themeDict;
|
||||
- (void)updateCellRelatedThemePreferencesFromDict:(NSDictionary *)prefDict;
|
||||
|
||||
- (void)listObjectAttributeChangesComplete:(NSNotification *)notification;
|
||||
- (void)contactListDesiredSizeChanged;
|
||||
- (void)updateTransparency;
|
||||
- (BOOL)useAliasesInContactListAsRequested;
|
||||
- (BOOL)shouldUseContactTextColors;
|
||||
- (BOOL)useStatusMessageAsExtendedStatus;
|
||||
|
||||
- (void)configureViewsAndTooltips;
|
||||
|
||||
//Tooltips
|
||||
- (void)showTooltipAtPoint:(NSPoint)screenPoint;
|
||||
- (AIListObject *)contactListItemAtScreenPoint:(NSPoint)screenPoint;
|
||||
- (void)hideTooltip;
|
||||
|
||||
- (void)setShowTooltips:(BOOL)inShowTooltips;
|
||||
- (void)setShowTooltipsInBackground:(BOOL)inShowTooltipsInBackground;
|
||||
- (void)pasteboard:(NSPasteboard *)sender provideDataForType:(NSString *)type;
|
||||
|
||||
//Drag & Drop
|
||||
- (void)setDragItems:(NSNotification *)notification;
|
||||
|
||||
//find panel
|
||||
- (void)outlineViewToggleFindPanel:(NSOutlineView *)outlineView;
|
||||
- (BOOL)outlineView:(NSOutlineView *)outlineView forwardKeyEventToFindPanel:(NSEvent *)event;
|
||||
|
||||
@end
|
|
@ -1,34 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
@class AIListObject;
|
||||
|
||||
@interface AIAbstractListObjectMenu : NSObject {
|
||||
NSArray *menuItems;
|
||||
NSMenu *menu;
|
||||
}
|
||||
|
||||
- (NSArray *)menuItems;
|
||||
- (NSMenu *)menu;
|
||||
- (NSMenuItem *)menuItemWithRepresentedObject:(id)object;
|
||||
- (void)rebuildMenu;
|
||||
|
||||
//For Subclassers
|
||||
- (NSArray *)buildMenuItems;
|
||||
- (NSImage *)imageForListObject:(AIListObject *)listObject usingUserIcon:(BOOL)useUserIcon;
|
||||
|
||||
@end
|
|
@ -1,351 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIListObject.h>
|
||||
|
||||
@class AIListContact, AIChat, AIContentObject, ESFileTransfer, AIStatus, AIContentMessage, AIContentNotification, AIContentTyping;
|
||||
|
||||
#define GROUP_ACCOUNT_STATUS @"Account Status"
|
||||
|
||||
//All keys below are for NSString objects
|
||||
#define KEY_CONNECT_HOST @"Connect Host"
|
||||
#define KEY_DEFAULT_USER_ICON @"Default User Icon"
|
||||
#define KEY_USE_USER_ICON @"Use User Icon"
|
||||
|
||||
//NSNumber objects
|
||||
#define KEY_CONNECT_PORT @"Connect Port"
|
||||
#define KEY_ACCOUNT_CHECK_MAIL @"Check Mail"
|
||||
#define KEY_ENABLED @"Enabled"
|
||||
#define KEY_AUTOCONNECT @"AutoConnect"
|
||||
#define KEY_ACCOUNT_REGISTER_ON_CONNECT @"Register on Connect"
|
||||
|
||||
//NSData archive of an NSAttributedString
|
||||
#define KEY_ACCOUNT_DISPLAY_NAME @"FullNameAttr"
|
||||
|
||||
#define Adium_RequestImmediateDynamicContentUpdate @"Adium_RequestImmediateDynamicContentUpdate"
|
||||
|
||||
//Proxy
|
||||
#define KEY_ACCOUNT_PROXY_ENABLED @"Proxy Enabled"
|
||||
#define KEY_ACCOUNT_PROXY_TYPE @"Proxy Type"
|
||||
#define KEY_ACCOUNT_PROXY_HOST @"Proxy Host"
|
||||
#define KEY_ACCOUNT_PROXY_PORT @"Proxy Port"
|
||||
#define KEY_ACCOUNT_PROXY_USERNAME @"Proxy Username"
|
||||
#define KEY_ACCOUNT_PROXY_PASSWORD @"Proxy Password"
|
||||
|
||||
//Proxy types
|
||||
typedef enum
|
||||
{
|
||||
Adium_Proxy_HTTP = 0,
|
||||
Adium_Proxy_SOCKS4,
|
||||
Adium_Proxy_SOCKS5,
|
||||
Adium_Proxy_Default_HTTP,
|
||||
Adium_Proxy_Default_SOCKS4,
|
||||
Adium_Proxy_Default_SOCKS5,
|
||||
Adium_Proxy_None,
|
||||
Adium_Proxy_Tor
|
||||
} AdiumProxyType;
|
||||
|
||||
//Privacy
|
||||
typedef enum {
|
||||
AIPrivacyTypePermit = 0,
|
||||
AIPrivacyTypeDeny
|
||||
} AIPrivacyType;
|
||||
|
||||
typedef enum {
|
||||
AIPrivacyOptionAllowAll = 1, //Anyone can conctact you
|
||||
AIPrivacyOptionDenyAll, //Nobody can contact you
|
||||
AIPrivacyOptionAllowUsers, //Only those on your allow list can contact you
|
||||
AIPrivacyOptionDenyUsers, //Those on your deny list can't contact you
|
||||
AIPrivacyOptionAllowContactList, //Only those on your contact list can contact you
|
||||
AIPrivacyOptionUnknown, //used by the privacy settings window, but could probably also be used by accounts
|
||||
AIPrivacyOptionCustom //used by the privacy settings window
|
||||
} AIPrivacyOption;
|
||||
|
||||
typedef enum {
|
||||
AIAuthorizationNoResponse = 0,
|
||||
AIAuthorizationDenied,
|
||||
AIAuthorizationAllowed
|
||||
} AIAuthorizationResponse;
|
||||
|
||||
typedef enum {
|
||||
AIAccountGroupDeletionShouldRemoveContacts = 0,
|
||||
AIAccountGroupDeletionShouldIgnoreContacts
|
||||
} AIAccountGroupDeletionResponse;
|
||||
|
||||
//Support for file transfer
|
||||
@protocol AIAccount_Files
|
||||
//can the account send entire folders on its own?
|
||||
- (BOOL)canSendFolders;
|
||||
|
||||
//Instructs the account to accept a file transfer request
|
||||
- (void)acceptFileTransferRequest:(ESFileTransfer *)fileTransfer;
|
||||
|
||||
//Instructs the account to reject a file receive request
|
||||
- (void)rejectFileReceiveRequest:(ESFileTransfer *)fileTransfer;
|
||||
|
||||
//Instructs the account to initiate sending of a file
|
||||
- (void)beginSendOfFileTransfer:(ESFileTransfer *)fileTransfer;
|
||||
|
||||
//Instructs the account to cancel a filet ransfer in progress
|
||||
- (void)cancelFileTransfer:(ESFileTransfer *)fileTransfer;
|
||||
@end
|
||||
|
||||
/*!
|
||||
* @protocol AIAccount_Privacy
|
||||
* @brief Support for privacy settings
|
||||
*
|
||||
* An AIAccount subclass may implement this protocol to support privacy settings
|
||||
*/
|
||||
@protocol AIAccount_Privacy
|
||||
/*!
|
||||
* @brief Add a list object to a privacy list
|
||||
*
|
||||
* @param inObject The object
|
||||
* @param type Either AIPrivacyTypePermit or AIPrivacyTypeDeny
|
||||
*
|
||||
* @result Boolean success
|
||||
*/
|
||||
-(BOOL)addListObject:(AIListObject *)inObject toPrivacyList:(AIPrivacyType)type;
|
||||
|
||||
/*!
|
||||
* @brief Remove a list object from a privacy list
|
||||
*
|
||||
* @param inObject The object
|
||||
* @param type Either AIPrivacyTypePermit or AIPrivacyTypeDeny
|
||||
*
|
||||
* @result Boolean success
|
||||
*/
|
||||
-(BOOL)removeListObject:(AIListObject *)inObject fromPrivacyList:(AIPrivacyType)type;
|
||||
|
||||
/*!
|
||||
* @brief Get the contacts on the specified privacy list
|
||||
*
|
||||
* @result An NSArray of AIListContacts, or an empty array if no contacts are on the requested list
|
||||
*/
|
||||
-(NSArray *)listObjectsOnPrivacyList:(AIPrivacyType)type;
|
||||
|
||||
/*!
|
||||
* @brief Set the privacy options
|
||||
*
|
||||
* @param option An AIPrivacyOption value
|
||||
*/
|
||||
-(void)setPrivacyOptions:(AIPrivacyOption)option;
|
||||
|
||||
/*!
|
||||
* @brief Get the privacy options
|
||||
*
|
||||
* @result An AIPrivacyOption value
|
||||
*/
|
||||
-(AIPrivacyOption)privacyOptions;
|
||||
@end
|
||||
|
||||
@class AdiumAccounts;
|
||||
@protocol AIAccountControllerRemoveConfirmationDialog;
|
||||
|
||||
/*!
|
||||
* @class AIAccount
|
||||
* @brief An account of ours (one we connect to and use to talk to handles)
|
||||
*
|
||||
* AIAccount is effectively an abstract superclass, as it can do nothing useful on its own.
|
||||
* Subclasses of AIAccount, however, inherit much power. With great power comes great responsibility.
|
||||
*/
|
||||
@interface AIAccount : AIListObject {
|
||||
NSString *password;
|
||||
BOOL silentAndDelayed; //We are waiting for and processing our sign on updates
|
||||
BOOL disconnectedByFastUserSwitch; //We are offline because of a fast user switch
|
||||
BOOL namesAreCaseSensitive;
|
||||
BOOL isTemporary;
|
||||
BOOL enabled;
|
||||
|
||||
int reconnectAttemptsPerformed;
|
||||
NSString *lastDisconnectionError;
|
||||
|
||||
//Attributed string refreshing
|
||||
NSTimer *attributedRefreshTimer;
|
||||
NSMutableSet *autoRefreshingKeys;
|
||||
NSMutableSet *dynamicKeys;
|
||||
|
||||
//Contact update guarding
|
||||
NSTimer *delayedUpdateStatusTimer;
|
||||
NSMutableArray *delayedUpdateStatusTargets;
|
||||
NSTimer *silenceAllContactUpdatesTimer;
|
||||
|
||||
// Former properties
|
||||
NSString *formattedUID;
|
||||
|
||||
AIStatus *accountStatus;
|
||||
NSDate *waitingToReconnect;
|
||||
|
||||
NSString *connectionProgressString;
|
||||
|
||||
NSString *currentDisplayName;
|
||||
|
||||
id<AIAccountControllerRemoveConfirmationDialog> confirmationDialogForAccountDeletion;
|
||||
}
|
||||
|
||||
- (void)initAccount;
|
||||
- (void)connect;
|
||||
- (void)disconnect;
|
||||
- (void)disconnectFromDroppedNetworkConnection;
|
||||
- (void)performRegisterWithPassword:(NSString *)inPassword;
|
||||
- (NSString *)accountWillSetUID:(NSString *)proposedUID;
|
||||
- (void)didChangeUID;
|
||||
- (void)willBeDeleted;
|
||||
- (id<AIAccountControllerRemoveConfirmationDialog>)confirmationDialogForAccountDeletion __attribute__((objc_method_family(new)));
|
||||
@property (unsafe_unretained, readonly, nonatomic) id<AIAccountControllerRemoveConfirmationDialog> confirmationDialogForAccountDeletion;
|
||||
@property (weak, readonly, nonatomic) NSAlert *alertForAccountDeletion;
|
||||
- (void)alertForAccountDeletion:(id<AIAccountControllerRemoveConfirmationDialog>)dialog didReturn:(NSInteger)returnCode;
|
||||
@property (weak, readonly, nonatomic) NSString *explicitFormattedUID;
|
||||
@property (readonly, nonatomic) BOOL useHostForPasswordServerName;
|
||||
@property (readonly, nonatomic) BOOL useInternalObjectIDForPasswordName;
|
||||
|
||||
//Properties
|
||||
@property (readonly, nonatomic) BOOL supportsAutoReplies;
|
||||
@property (readonly, nonatomic) BOOL disconnectOnFastUserSwitch;
|
||||
@property (readonly, nonatomic) BOOL connectivityBasedOnNetworkReachability;
|
||||
@property (readonly, nonatomic) BOOL suppressTypingNotificationChangesAfterSend;
|
||||
- (BOOL) canSendOfflineMessageToContact:(AIListContact *)inContact;
|
||||
- (BOOL) maySendMessageToInvisibleContact:(AIListContact *)inContact;
|
||||
@property (readonly, nonatomic) BOOL sendOfflineMessagesWithoutPrompting;
|
||||
@property (readonly, nonatomic) BOOL accountDisplaysFileTransferMessages;
|
||||
@property (readonly, nonatomic) BOOL managesOwnContactIconCache;
|
||||
//Temporary Accounts
|
||||
@property (readwrite, nonatomic) BOOL isTemporary;
|
||||
|
||||
//Status
|
||||
@property (weak, readonly, nonatomic) NSSet *supportedPropertyKeys;
|
||||
- (id)statusForKey:(NSString *)key;
|
||||
- (void)updateStatusForKey:(NSString *)key;
|
||||
- (void)delayedUpdateContactStatus:(AIListContact *)inContact;
|
||||
- (float)delayedUpdateStatusInterval;
|
||||
- (void)setStatusState:(AIStatus *)statusState usingStatusMessage:(NSAttributedString *)statusMessage;
|
||||
- (void)setSocialNetworkingStatusMessage:(NSAttributedString *)statusMessage;
|
||||
- (BOOL)shouldUpdateAutorefreshingAttributedStringForKey:(NSString *)inKey;
|
||||
|
||||
//Messaging, Chatting, Strings
|
||||
- (BOOL)availableForSendingContentType:(NSString *)inType toContact:(AIListContact *)inContact;
|
||||
- (BOOL)openChat:(AIChat *)chat;
|
||||
- (BOOL)closeChat:(AIChat *)chat;
|
||||
- (BOOL)inviteContact:(AIListObject *)contact toChat:(AIChat *)chat withMessage:(NSString *)inviteMessage;
|
||||
- (void)sendTypingObject:(AIContentTyping *)inTypingObject;
|
||||
- (BOOL)sendMessageObject:(AIContentMessage *)inMessageObject;
|
||||
- (NSString *)encodedAttributedString:(NSAttributedString *)inAttributedString forListObject:(AIListObject *)inListObject;
|
||||
- (NSString *)encodedAttributedStringForSendingContentMessage:(AIContentMessage *)inContentMessage;
|
||||
- (BOOL)rejoinChat:(AIChat*)chat;
|
||||
- (BOOL)groupChatsSupportTopic;
|
||||
- (void)setTopic:(NSString *)topic forChat:(AIChat *)chat;
|
||||
- (BOOL)shouldDisplayOutgoingMUCMessages;
|
||||
/*!
|
||||
* @brief Should an autoreply be sent to this message?
|
||||
*
|
||||
* This will only be called if the generic algorithm determines that an autoreply is appropriate. The account
|
||||
* gets an opportunity to suppress sending the autoreply, e.g. on the basis of the message's content or source.
|
||||
*/
|
||||
- (BOOL)shouldSendAutoreplyToMessage:(AIContentMessage *)message;
|
||||
|
||||
//Presence Tracking
|
||||
@property (readonly, nonatomic) BOOL contactListEditable;
|
||||
- (void)addContact:(AIListContact *)contact toGroup:(AIListGroup *)group;
|
||||
- (void)removeContacts:(NSArray *)objects fromGroups:(NSArray *)groups;
|
||||
- (void)deleteGroup:(AIListGroup *)group;
|
||||
- (void)moveListObjects:(NSArray *)objects fromGroups:(NSSet *)oldGroups toGroups:(NSSet *)groups;
|
||||
- (void)renameGroup:(AIListGroup *)group to:(NSString *)newName;
|
||||
- (BOOL)isContactIntentionallyListed:(AIListContact *)contact;
|
||||
|
||||
- (NSData *)serversideIconDataForContact:(AIListContact *)contact;
|
||||
|
||||
//Contact-specific menu items
|
||||
- (NSArray *)menuItemsForContact:(AIListContact *)inContact;
|
||||
|
||||
//Chat-specific menu items
|
||||
- (NSArray *)menuItemsForChat:(AIChat *)inChat;
|
||||
|
||||
//Account-specific menu items
|
||||
@property (weak, readonly, nonatomic) NSArray *accountActionMenuItems;
|
||||
- (void)accountMenuDidUpdate:(NSMenuItem*)menuItem;
|
||||
|
||||
//Secure messaging
|
||||
- (BOOL)allowSecureMessagingTogglingForChat:(AIChat *)inChat;
|
||||
@property (weak, readonly, nonatomic) NSString *aboutEncryption;
|
||||
- (void)requestSecureMessaging:(BOOL)inSecureMessaging
|
||||
inChat:(AIChat *)inChat;
|
||||
|
||||
/*!
|
||||
* @brief Can the account send images inline within a chat?
|
||||
*/
|
||||
- (BOOL)canSendImagesForChat:(AIChat *)inChat;
|
||||
|
||||
/*!
|
||||
* @brief Should the chat autocomplete the UID instead of the Display Name?
|
||||
*/
|
||||
- (BOOL)chatShouldAutocompleteUID:(AIChat *)inChat;
|
||||
|
||||
/*!
|
||||
* @brief Suffix for autocompleted contacts
|
||||
*/
|
||||
- (NSString *)suffixForAutocomplete:(AIChat *)inChat forPartialWordRange:(NSRange)charRange;
|
||||
|
||||
/*!
|
||||
* @brief Prefix for autocompleted contacts
|
||||
*/
|
||||
- (NSString *)prefixForAutocomplete:(AIChat *)inChat forPartialWordRange:(NSRange)charRange;
|
||||
|
||||
/*!
|
||||
* @brief Does the account support sending notifications?
|
||||
*/
|
||||
- (BOOL)supportsSendingNotifications;
|
||||
- (BOOL)sendNotificationObject:(AIContentNotification *)inContentNotification;
|
||||
|
||||
/*!
|
||||
* @brief An authorization prompt closed, granting or denying a contact's request for authorization
|
||||
*
|
||||
* @param inWindowController The window controller which closed; an account may have kept track of what windows were showing its authorization prompts
|
||||
* @param infoDict A dictionary of authorization information created by the account originally and possibly modified
|
||||
* @param authorizationResponse An AIAuthorizationResponse indicating if authorization was granted or denied or if there was no response
|
||||
*/
|
||||
- (void)authorizationWithDict:(NSDictionary *)__attribute__((ns_consumed))infoDict response:(AIAuthorizationResponse)authorizationResponse;
|
||||
|
||||
-(NSMenu*)actionMenuForChat:(AIChat*)chat;
|
||||
|
||||
- (BOOL)accountManagesGroupChatIgnore;
|
||||
- (BOOL)contact:(AIListContact *)inContact isIgnoredInChat:(AIChat *)chat;
|
||||
- (void)setContact:(AIListContact *)inContact ignored:(BOOL)inIgnored inChat:(AIChat *)chat;
|
||||
|
||||
/*!
|
||||
* @brief Should transcripts be stored for a given chat?
|
||||
*
|
||||
* Subclasses which intend to return YES should return [super shouldLogChat:chat].
|
||||
*/
|
||||
- (BOOL)shouldLogChat:(AIChat *)chat;
|
||||
|
||||
/*!
|
||||
* @brief The proxy's type used for this account.
|
||||
*/
|
||||
- (AdiumProxyType)proxyType;
|
||||
|
||||
/*!
|
||||
* @brief The proxy's hostname the user entered for this account.
|
||||
*/
|
||||
- (NSString *)proxyHost;
|
||||
|
||||
@end
|
||||
|
||||
@interface AIAccount (Private_ForSubclasses)
|
||||
- (void)gotFilteredDisplayName:(NSAttributedString *)attributedDisplayName;
|
||||
- (void)performDelete;
|
||||
@end
|
||||
|
||||
#import <Adium/AIAbstractAccount.h>
|
|
@ -1,209 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIControllerProtocol.h>
|
||||
|
||||
@class AIService, AIAccount, AIListContact, AIStatus;
|
||||
|
||||
#define Account_ListChanged @"Account_ListChanged"
|
||||
#define Adium_RequestSetManualIdleTime @"Adium_RequestSetManualIdleTime"
|
||||
|
||||
@protocol AIAccountControllerRemoveConfirmationDialog <NSObject>
|
||||
- (void)runModal;
|
||||
- (void)beginSheetModalForWindow:(NSWindow*)window;
|
||||
@end
|
||||
|
||||
@interface NSObject (AIEditAccountWindowControllerTarget)
|
||||
//Optional
|
||||
- (void)editAccountWindow:(NSWindow*)window didOpenForAccount:(AIAccount *)inAccount;
|
||||
|
||||
//Required
|
||||
- (void)editAccountSheetDidEndForAccount:(AIAccount *)inAccount withSuccess:(BOOL)successful;
|
||||
@end
|
||||
|
||||
typedef enum {
|
||||
AIPromptAsNeeded = 0,
|
||||
AIPromptAlways,
|
||||
AIPromptNever
|
||||
} AIPromptOption;
|
||||
|
||||
typedef enum {
|
||||
AINickServPassword,
|
||||
AIQPassword,
|
||||
AIXPassword,
|
||||
AIAuthServPassword
|
||||
} AISpecialPasswordType;
|
||||
|
||||
@protocol AIAccountController <AIController>
|
||||
|
||||
#pragma mark Services
|
||||
/*!
|
||||
* @brief Register an AIService instance
|
||||
*
|
||||
* All services should be registered before they are used. A service provides access to an instant messaging protocol.
|
||||
*/
|
||||
- (void)registerService:(AIService *)inService;
|
||||
|
||||
/*!
|
||||
* @brief Returns an array of all available services
|
||||
*
|
||||
* @return NSArray of AIService instances
|
||||
*/
|
||||
@property (nonatomic, readonly) NSArray *services;
|
||||
|
||||
/*!
|
||||
* @brief Returns an array of all active services
|
||||
*
|
||||
* "Active" services are those for which the user has an enabled account.
|
||||
* @param includeCompatible Include services which are compatible with an enabled account but not specifically active.
|
||||
* For example, if an AIM account is enabled, the ICQ service will be included if this is YES.
|
||||
* @return NSArray of AIService instances
|
||||
*/
|
||||
- (NSSet *)activeServicesIncludingCompatibleServices:(BOOL)includeCompatible;
|
||||
|
||||
/*!
|
||||
* @brief Retrieves a service by its unique ID
|
||||
*
|
||||
* @param uniqueID The serviceCodeUniqueID of the desired service
|
||||
* @return AIService if found, nil if not found
|
||||
*/
|
||||
- (AIService *)serviceWithUniqueID:(NSString *)uniqueID;
|
||||
|
||||
/*!
|
||||
* @brief Retrieves a service by service ID.
|
||||
*
|
||||
* Service IDs may be shared by multiple services if the same service is provided by two different plugins.
|
||||
* -[AIService serviceID] returns serviceIDs. An example is @"AIM".
|
||||
* @return The first service with the matching service ID, or nil if none is found.
|
||||
*/
|
||||
- (AIService *)firstServiceWithServiceID:(NSString *)serviceID;
|
||||
|
||||
#pragma mark Passwords
|
||||
/*!
|
||||
* @brief Set the password of an account
|
||||
*
|
||||
* @param inPassword password to store
|
||||
* @param inAccount account the password belongs to
|
||||
*/
|
||||
- (void)setPassword:(NSString *)inPassword forAccount:(AIAccount *)inAccount;
|
||||
|
||||
/*!
|
||||
* @brief Forget the password of an account
|
||||
*
|
||||
* @param inAccount account whose password should be forgotten. Any stored keychain item will be removed.
|
||||
*/
|
||||
- (void)forgetPasswordForAccount:(AIAccount *)inAccount;
|
||||
|
||||
/*!
|
||||
* @brief Retrieve the stored password of an account
|
||||
*
|
||||
* @param inAccount account whose password is desired
|
||||
* @return account password, or nil if the password is not available without prompting
|
||||
*/
|
||||
- (NSString *)passwordForAccount:(AIAccount *)inAccount;
|
||||
|
||||
/*!
|
||||
* @brief Retrieve the password of an account, prompting the user if necessary
|
||||
*
|
||||
* @param inAccount account whose password is desired
|
||||
* @param promptOption An AIPromptOption determining whether and how a prompt for the password should be displayed if it is needed. This allows forcing or suppressing of the prompt dialogue. If AIPromptOptionNever is used, the returnCode sent to the target will always be AIPasswordPromptOKReturn.
|
||||
* @param inTarget target to notify when password is available
|
||||
* @param inSelector selector to notify when password is available. Selector is of the form - (void)returnedPassword:(NSString *)p returnCode:(AIPasswordPromptReturn)returnCode context:(id)context
|
||||
* @param inContext context passed to target
|
||||
*/
|
||||
- (void)passwordForAccount:(AIAccount *)inAccount promptOption:(AIPromptOption)promptOption notifyingTarget:(id)inTarget selector:(SEL)inSelector context:(id)inContext;
|
||||
|
||||
/*!
|
||||
* @brief Set the password for a proxy server
|
||||
*
|
||||
* @param inPassword password to store. Nil to forget the password for this server/username pair.
|
||||
* @param server proxy server name
|
||||
* @param userName proxy server user name
|
||||
*
|
||||
* XXX - This is inconsistent. Above we have a separate forget method, here we forget when nil is passed...
|
||||
*/
|
||||
- (void)setPassword:(NSString *)inPassword forProxyServer:(NSString *)server userName:(NSString *)userName;
|
||||
|
||||
/*!
|
||||
* @brief Retrieve the stored password for a proxy server
|
||||
*
|
||||
* @param server proxy server name
|
||||
* @param userName proxy server user name
|
||||
* @return proxy server password, or nil if the password is not available without prompting
|
||||
*/
|
||||
- (NSString *)passwordForProxyServer:(NSString *)server userName:(NSString *)userName;
|
||||
|
||||
/*!
|
||||
* @brief Retrieve the password for a proxy server, prompting the user if necessary
|
||||
*
|
||||
* @param server proxy server name
|
||||
* @param userName proxy server user name
|
||||
* @param inTarget target to notify when password is available
|
||||
* @param inSelector selector to notify when password is available. Selector is of the form - (void)returnedPassword:(NSString *)p returnCode:(AIPasswordPromptReturn)returnCode context:(id)context
|
||||
* @param inContext context passed to target
|
||||
*/
|
||||
- (void)passwordForProxyServer:(NSString *)server userName:(NSString *)userName notifyingTarget:(id)inTarget selector:(SEL)inSelector context:(id)inContext;
|
||||
|
||||
// document
|
||||
- (void)passwordForType:(AISpecialPasswordType)inType forAccount:(AIAccount *)inAccount promptOption:(AIPromptOption)inOption name:(NSString *)inName notifyingTarget:(id)inTarget selector:(SEL)inSelector context:(id)inContext;
|
||||
- (NSString *)passwordForType:(AISpecialPasswordType)inType forAccount:(AIAccount *)inAccount name:(NSString *)inName;
|
||||
- (void)setPassword:(NSString *)inPassword forType:(AISpecialPasswordType)inType forAccount:(AIAccount *)inAccount name:(NSString *)inName;
|
||||
|
||||
#pragma mark Accounts
|
||||
@property (nonatomic, readonly) NSArray *accounts;
|
||||
- (NSArray *)accountsCompatibleWithService:(AIService *)service;
|
||||
- (NSArray *)accountsWithCurrentStatus:(AIStatus *)status;
|
||||
- (AIAccount *)accountWithInternalObjectID:(NSString *)objectID;
|
||||
- (AIAccount *)createAccountWithService:(AIService *)service UID:(NSString *)inUID;
|
||||
- (void)addAccount:(AIAccount *)inAccount;
|
||||
- (void)deleteAccount:(AIAccount *)inAccount;
|
||||
- (NSUInteger)moveAccount:(AIAccount *)account toIndex:(NSUInteger)destIndex;
|
||||
- (void)accountDidChangeUID:(AIAccount *)inAccount;
|
||||
|
||||
/*!
|
||||
* @brief Change an account's current and future service
|
||||
*
|
||||
* This should only be used by an AIAccount to upgrade itself to a new service, as may happen when
|
||||
* transitioning from one implementation to another.
|
||||
*
|
||||
* Generally, this is not necessary, as migration can be performed by simply substituting the new service ID
|
||||
* for the old one in -[AdiumAccounts _upgradeServiceID:forAccountDict:]. However, if that is insufficient,
|
||||
* because for example some processing must be done with information from both old and new accounts,
|
||||
* this may be useful for performing a move at runtime.
|
||||
*
|
||||
* It will save the change; account immediately becomes on service, and it will be on service when it is
|
||||
* next loaded.
|
||||
*/
|
||||
- (void)moveAccount:(AIAccount *)account toService:(AIService *)service;
|
||||
|
||||
//Preferred Accounts
|
||||
- (AIAccount *)preferredAccountForSendingContentType:(NSString *)inType toContact:(AIListContact *)inContact;
|
||||
|
||||
//Connection convenience methods
|
||||
- (void)disconnectAllAccounts;
|
||||
@property (nonatomic, readonly) BOOL oneOrMoreConnectedAccounts;
|
||||
@property (nonatomic, readonly) BOOL oneOrMoreConnectedOrConnectingAccounts;
|
||||
|
||||
/*!
|
||||
* @brief Display account configuration for an account
|
||||
*
|
||||
* @param account The account to edit. Must not be nil.
|
||||
* @param window The window on which to attach the configuration as a sheet. If nil, the editor is shown as a free-standing window.
|
||||
* @param target The target to notify when editing is complete. See the AIEditAccountWindowControllerTarget informal protocol.
|
||||
*/
|
||||
- (void)editAccount:(AIAccount *)account onWindow:(NSWindow *)window notifyingTarget:(id)target;
|
||||
|
||||
@end
|
|
@ -1,85 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIAbstractListObjectMenu.h>
|
||||
#import <Adium/AIContactObserverManager.h>
|
||||
#import <Adium/AIStatusMenu.h>
|
||||
|
||||
@class AIAccount;
|
||||
@protocol AIAccountMenuDelegate;
|
||||
|
||||
typedef enum {
|
||||
AIAccountNoSubmenu = 0,
|
||||
AIAccountStatusSubmenu,
|
||||
AIAccountOptionsSubmenu
|
||||
} AIAccountSubmenuType;
|
||||
|
||||
@interface AIAccountMenu : AIAbstractListObjectMenu <AIListObjectObserver, AIStatusMenuDelegate, NSMenuDelegate> {
|
||||
id<AIAccountMenuDelegate> delegate;
|
||||
BOOL delegateRespondsToDidSelectAccount;
|
||||
BOOL delegateRespondsToShouldIncludeAccount;
|
||||
|
||||
BOOL useSystemFont;
|
||||
BOOL submenuType;
|
||||
BOOL showTitleVerbs;
|
||||
BOOL includeDisabledAccountsMenu;
|
||||
BOOL includeAddAccountsMenu;
|
||||
BOOL delegateRespondsToSpecialMenuItem;
|
||||
|
||||
NSControlSize controlSize;
|
||||
|
||||
AIStatusMenu *statusMenu;
|
||||
}
|
||||
|
||||
+ (id)accountMenuWithDelegate:(id<AIAccountMenuDelegate>)inDelegate
|
||||
submenuType:(AIAccountSubmenuType)inSubmenuType
|
||||
showTitleVerbs:(BOOL)inShowTitleVerbs;
|
||||
|
||||
/*! @brief Whether to use the system font instead of the menu font.
|
||||
*
|
||||
* @par By default, menu items in the account menu use the menu font, but a client can request them with the system font instead.
|
||||
*/
|
||||
@property (readwrite, nonatomic) BOOL useSystemFont;
|
||||
|
||||
@property (readwrite, nonatomic, unsafe_unretained) id<AIAccountMenuDelegate> delegate;
|
||||
|
||||
- (NSMenuItem *)menuItemForAccount:(AIAccount *)account;
|
||||
|
||||
@end
|
||||
|
||||
@protocol AIAccountMenuDelegate <NSObject>
|
||||
- (void)accountMenu:(AIAccountMenu *)inAccountMenu didRebuildMenuItems:(NSArray *)menuItems;
|
||||
|
||||
@optional
|
||||
- (void)accountMenu:(AIAccountMenu *)inAccountMenu didSelectAccount:(AIAccount *)inAccount;
|
||||
- (BOOL)accountMenu:(AIAccountMenu *)inAccountMenu shouldIncludeAccount:(AIAccount *)inAccount;
|
||||
|
||||
/*!
|
||||
* @brief At what size will this menu be used?
|
||||
*
|
||||
* If not implemented, the default is NSRegularControlSize. NSMiniControlSize is not supported.
|
||||
*/
|
||||
- (NSControlSize)controlSizeForAccountMenu:(AIAccountMenu *)inAccountMenu;
|
||||
|
||||
//Should the account menu include a submenu of services for adding accounts?
|
||||
- (BOOL)accountMenuShouldIncludeAddAccountsMenu:(AIAccountMenu *)inAccountMenu;
|
||||
|
||||
//Does the menu require a special topmost item + seperator?
|
||||
- (NSMenuItem *)accountMenuSpecialMenuItem:(AIAccountMenu *)inAccountMenu;
|
||||
|
||||
//Should the account menu include a submenu of 'disabled accounts'?
|
||||
- (BOOL)accountMenuShouldIncludeDisabledAccountsMenu:(AIAccountMenu *)inAccountMenu;
|
||||
@end
|
|
@ -1,37 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIWindowController.h>
|
||||
#import <Adium/AIAccountMenu.h>
|
||||
|
||||
@class AIListContact, AICompletingTextField;
|
||||
|
||||
@interface AIAccountPlusFieldPromptController : AIWindowController <AIAccountMenuDelegate> {
|
||||
IBOutlet AICompletingTextField *textField_handle;
|
||||
IBOutlet NSPopUpButton *popUp_service;
|
||||
|
||||
IBOutlet NSButton *button_okay;
|
||||
IBOutlet NSButton *button_cancel;
|
||||
|
||||
AIAccountMenu *accountMenu;
|
||||
}
|
||||
|
||||
+ (void)showPrompt;
|
||||
+ (void)closeSharedInstance;
|
||||
- (IBAction)okay:(id)sender;
|
||||
- (AIListContact *)contactFromTextField;
|
||||
|
||||
@end
|
|
@ -1,75 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIContactControllerProtocol.h>
|
||||
|
||||
@class AIAccount;
|
||||
|
||||
@interface AIAccountViewController : NSObject {
|
||||
/* These are the views used in Adium's account preferences. If views aren't provided by a custom account view
|
||||
* nib, default views with the most common controls will be used. There is no need to provide a custom nib
|
||||
* if your account code only needs the default controls. Avoid using the auxiliary tabs if possible. */
|
||||
IBOutlet NSView *view_setup; //Account setup (UID, password, etc)
|
||||
IBOutlet NSView *view_profile; //Account profile (Alias, profile)
|
||||
IBOutlet NSView *view_options; //Account options (Host, port, mail, protocol, etc)
|
||||
IBOutlet NSView *view_privacy; //Account privacy (Encryption, typing, etc)
|
||||
IBOutlet NSTabView *view_auxiliaryTabView; //Tab view containing auxiliary tabs
|
||||
|
||||
//These common controls are used by most protocols, so we place them here as a convenience to protocol code.
|
||||
//Custom account view nibs are encouraged to connect to these outlets.
|
||||
IBOutlet NSTextField *textField_accountUIDLabel; //Label on UID field
|
||||
IBOutlet NSTextField *textField_accountUID; //UID field
|
||||
IBOutlet NSTextField *label_password; //Label on the password field
|
||||
IBOutlet NSTextField *textField_password; //Password field
|
||||
IBOutlet NSButton *button_signUp; //Sign up for account
|
||||
IBOutlet NSTextField *textField_connectHost; //Connect host
|
||||
IBOutlet NSTextField *textField_connectPort; //Connect port
|
||||
IBOutlet NSTextField *textField_alias; //User alias (or display name)
|
||||
IBOutlet NSTextField *label_alias; //Label for the alias field
|
||||
IBOutlet NSButton *checkBox_checkMail; //Check for new mail
|
||||
|
||||
IBOutlet NSTextField *label_port; //Label for the port field
|
||||
IBOutlet NSTextField *label_server; //Label for the login server field
|
||||
|
||||
IBOutlet NSTextField *label_typing; //Label for the typing preference
|
||||
IBOutlet NSButton *checkBox_sendTyping; //Send the user's typing state
|
||||
|
||||
IBOutlet NSTextField *label_encryption; //Label for the encryption preference
|
||||
IBOutlet NSPopUpButton *popUp_encryption; //Encryption preference
|
||||
|
||||
//Instance variables
|
||||
AIAccount *account;
|
||||
NSMutableDictionary *changedPrefDict;
|
||||
}
|
||||
|
||||
+ (id)accountViewController;
|
||||
- (id)init;
|
||||
- (NSView *)setupView;
|
||||
- (NSView *)profileView;
|
||||
- (NSView *)optionsView;
|
||||
- (NSView *)privacyView;
|
||||
- (void)configureForAccount:(AIAccount *)inAccount;
|
||||
- (IBAction)changedPreference:(id)sender;
|
||||
- (IBAction)signUpAccount:(id)sender;
|
||||
- (NSString *)nibName;
|
||||
- (void)saveConfiguration;
|
||||
|
||||
@end
|
||||
|
||||
@interface AIAccountViewController (ForSubclasses)
|
||||
- (NSDictionary *)keyToKeyDict;
|
||||
- (void)localizeStrings;
|
||||
@end
|
|
@ -1,34 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIModularPane.h>
|
||||
|
||||
@class AIListObject;
|
||||
|
||||
@interface AIActionDetailsPane : AIModularPane {
|
||||
|
||||
}
|
||||
|
||||
+ (AIActionDetailsPane *)actionDetailsPane;
|
||||
+ (AIActionDetailsPane *)actionDetailsPaneForPlugin:(id)inPlugin;
|
||||
- (void)configureForActionDetails:(NSDictionary *)inDetails listObject:(AIListObject *)inObject;
|
||||
- (void)configureForEventID:(NSString *)eventID listObject:(AIListObject *)inObject;
|
||||
|
||||
- (NSDictionary *)actionDetails;
|
||||
|
||||
- (void)detailsForHeaderChanged;
|
||||
|
||||
@end
|
|
@ -1,79 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <AddressBook/AddressBook.h>
|
||||
#import <Adium/AIContactObserverManager.h>
|
||||
#import <Adium/AIContactControllerProtocol.h>
|
||||
#import <Adium/AIUserIcons.h>
|
||||
|
||||
#define PREF_GROUP_ADDRESSBOOK @"Address Book"
|
||||
#define KEY_AB_ENABLE_IMPORT @"AB Enable Import"
|
||||
#define KEY_AB_DISPLAYFORMAT @"AB Display Format String"
|
||||
#define KEY_AB_NOTE_SYNC @"AB Note Sync"
|
||||
#define KEY_AB_USE_IMAGES @"AB Use AB Images"
|
||||
#define KEY_AB_IMAGE_SYNC @"AB Image Sync"
|
||||
#define KEY_AB_PREFER_ADDRESS_BOOK_IMAGES @"AB Prefer AB Images"
|
||||
#define KEY_AB_USE_FIRSTNAME @"AB Use FirstName"
|
||||
#define KEY_AB_USE_NICKNAME @"AB Use NickName Only"
|
||||
#define KEY_AB_CREATE_METACONTACTS @"AB Create MetaContacts"
|
||||
#define AB_DISPLAYFORMAT_DEFAULT_PREFS @"AB Display Format Defaults"
|
||||
|
||||
#define FORMAT_FULL @"FULL"
|
||||
#define FORMAT_INITIAL @"INITIAL"
|
||||
#define FORMAT_FIRST_INITIAL @"%[FIRSTINITIAL]"
|
||||
#define FORMAT_FIRST_FULL @"%[FIRSTFULL]"
|
||||
#define FORMAT_MIDDLE_INITIAL @"%[MIDDLEINITIAL]"
|
||||
#define FORMAT_MIDDLE_FULL @"%[MIDDLEFULL]"
|
||||
#define FORMAT_LAST_INITIAL @"%[LASTINITIAL]"
|
||||
#define FORMAT_LAST_FULL @"%[LASTFULL]"
|
||||
#define FORMAT_NICK_INITIAL @"%[NICKINITIAL]"
|
||||
#define FORMAT_NICK_FULL @"%[NICKFULL]"
|
||||
|
||||
@class AIService, AIAddressBookUserIconSource;
|
||||
|
||||
typedef enum {
|
||||
AIRequiresAddressBookEntry,
|
||||
AIRequiresNoAddressBookEntry
|
||||
} AIAddressBookContextMenuTag;
|
||||
|
||||
@interface AIAddressBookController : NSObject <AIListObjectObserver, ABImageClient> {
|
||||
@private
|
||||
NSMenuItem *showInABContextualMenuItem;
|
||||
NSMenuItem *editInABContextualMenuItem;
|
||||
NSMenuItem *addToABContexualMenuItem;
|
||||
|
||||
NSInteger meTag;
|
||||
|
||||
NSString *displayFormat;
|
||||
BOOL enableImport;
|
||||
BOOL useFirstName;
|
||||
BOOL useNickNameOnly;
|
||||
BOOL automaticUserIconSync;
|
||||
BOOL createMetaContacts;
|
||||
|
||||
AIAddressBookUserIconSource *addressBookUserIconSource;
|
||||
|
||||
NSMutableDictionary *personUniqueIdToMetaContactDict;
|
||||
}
|
||||
|
||||
+ (void) startAddressBookIntegration;
|
||||
+ (void) stopAddressBookIntegration;
|
||||
|
||||
+ (AIService *)serviceFromProperty:(NSString *)property;
|
||||
+ (NSString *)propertyFromService:(AIService *)service;
|
||||
+ (ABPerson *)personForListObject:(AIListObject *)inObject;
|
||||
|
||||
@end
|
|
@ -1,112 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
@class AICoreComponentLoader, AICorePluginLoader;
|
||||
|
||||
@protocol AIAccountController, AIChatController, AIContactAlertsController, AIDebugController, AIEmoticonController,
|
||||
AIPreferenceController, AIMenuController, AIApplescriptabilityController, AIStatusController,
|
||||
AIContentController, AIToolbarController, AISoundController, AIDockController,
|
||||
AIFileTransferController, AILoginController, AIInterfaceController, AIContactController;
|
||||
|
||||
@protocol AIAdium <NSObject>
|
||||
@property (readonly, nonatomic) NSObject<AIAccountController> *accountController;
|
||||
@property (readonly, nonatomic) NSObject<AIChatController> *chatController;
|
||||
@property (readonly, nonatomic) NSObject<AIContactController> *contactController;
|
||||
@property (readonly, nonatomic) NSObject<AIContentController> *contentController;
|
||||
@property (readonly, nonatomic) NSObject<AIDockController> *dockController;
|
||||
@property (readonly, nonatomic) NSObject<AIEmoticonController> *emoticonController;
|
||||
@property (readonly, nonatomic) NSObject<AIInterfaceController> *interfaceController;
|
||||
@property (readonly, nonatomic) NSObject<AILoginController> *loginController;
|
||||
@property (readonly, nonatomic) NSObject<AIMenuController> *menuController;
|
||||
@property (readonly, nonatomic) NSObject<AIPreferenceController> *preferenceController;
|
||||
@property (readonly, nonatomic) NSObject<AISoundController> *soundController;
|
||||
@property (readonly, nonatomic) NSObject<AIStatusController> *statusController;
|
||||
@property (readonly, nonatomic) NSObject<AIToolbarController> *toolbarController;
|
||||
@property (readonly, nonatomic) NSObject<AIContactAlertsController> *contactAlertsController;
|
||||
@property (readonly, nonatomic) NSObject<AIFileTransferController> *fileTransferController;
|
||||
@property (readonly, nonatomic) NSObject<AIDebugController> *debugController;
|
||||
@property (readonly, nonatomic) NSObject<AIApplescriptabilityController> *applescriptabilityController;
|
||||
|
||||
@property (readonly, nonatomic) AICoreComponentLoader *componentLoader;
|
||||
@property (readonly, nonatomic) AICorePluginLoader *pluginLoader;
|
||||
|
||||
@property (readonly, nonatomic) NSString *applicationSupportDirectory;
|
||||
- (NSString *)createResourcePathForName:(NSString *)name;
|
||||
- (NSArray *)resourcePathsForName:(NSString *)name;
|
||||
- (NSArray *)allResourcesForName:(NSString *)name withExtensions:(id)extensions;
|
||||
- (NSString *)pathOfPackWithName:(NSString *)name extension:(NSString *)extension resourceFolderName:(NSString *)folderName;
|
||||
@property (readonly, nonatomic) NSString *cachesPath;
|
||||
|
||||
- (NSComparisonResult)compareVersion:(NSString *)versionA toVersion:(NSString *)versionB;
|
||||
- (NSString *)earliestLaunchedAdiumVersion;
|
||||
|
||||
@property (readonly, nonatomic) BOOL isQuitting;
|
||||
|
||||
@end
|
||||
|
||||
//Adium events
|
||||
#define KEY_EVENT_DISPLAY_NAME @"DisplayName"
|
||||
#define KEY_EVENT_NOTIFICATION @"Notification"
|
||||
|
||||
//Adium Notifications
|
||||
#define CONTACT_STATUS_ONLINE_YES @"Contact_StatusOnlineYes" // Contact signs on
|
||||
#define CONTACT_STATUS_ONLINE_NO @"Contact_StatusOnlineNo" // Contact signs off
|
||||
#define CONTACT_STATUS_AWAY_YES @"Contact_StatusAwayYes"
|
||||
#define CONTACT_STATUS_AWAY_NO @"Contact_StatusAwayNo"
|
||||
#define CONTACT_STATUS_IDLE_YES @"Contact_StatusIdleYes"
|
||||
#define CONTACT_STATUS_IDLE_NO @"Contact_StatusIdleNo"
|
||||
#define CONTACT_STATUS_MESSAGE @"Contact_StatusMessage"
|
||||
#define CONTACT_SEEN_ONLINE_YES @"Contact_SeenOnlineYes"
|
||||
#define CONTACT_SEEN_ONLINE_NO @"Contact_SeenOnlineNo"
|
||||
#define CONTACT_STATUS_MOBILE_YES @"Contact_StatusMobileYes"
|
||||
#define CONTACT_STATUS_MOBILE_NO @"Contact_StatusMobileNo"
|
||||
#define CONTENT_MESSAGE_SENT @"Content_MessageSent"
|
||||
#define CONTENT_MESSAGE_SENT_GROUP @"Content_MessageSentGroup"
|
||||
#define CONTENT_MESSAGE_RECEIVED @"Content_MessageReceived"
|
||||
#define CONTENT_MESSAGE_RECEIVED_GROUP @"Content_MessageReceivedGroup"
|
||||
#define CONTENT_MESSAGE_RECEIVED_FIRST @"Content_MessageReceivedFirst"
|
||||
#define CONTENT_MESSAGE_RECEIVED_BACKGROUND @"Content_MessageReceivedBackground"
|
||||
#define CONTENT_MESSAGE_RECEIVED_BACKGROUND_GROUP @"Content_MessageReceivedBackgroundGroup"
|
||||
#define CONTENT_MESSAGE_RECEIVED_AWAY @"Content_MessageReceivedAway"
|
||||
#define CONTENT_MESSAGE_RECEIVED_AWAY_GROUP @"Content_MessageReceivedAwayGroup"
|
||||
#define CONTENT_NUDGE_BUZZ_OCCURED @"Content_NudgeBuzzOccured"
|
||||
#define CONTENT_CONTACT_JOINED_CHAT @"Content_ContactJoinedChat"
|
||||
#define CONTENT_CONTACT_LEFT_CHAT @"Content_ContactLeftChat"
|
||||
#define CONTENT_GROUP_CHAT_INVITE @"Content_GroupChatInvite"
|
||||
#define CONTENT_GROUP_CHAT_MENTION @"Content_GroupChatMention"
|
||||
#define INTERFACE_ERROR_MESSAGE @"Interface_ErrorMessageReceived"
|
||||
|
||||
/* Note: The account connected/disconnected events are aggregated for many accounts connecting simultaneously.
|
||||
* Use a list object observer (see AIContactController) if you are concerned about specific account connectivity changes.
|
||||
*/
|
||||
#define ACCOUNT_CONNECTED @"Account_Connected"
|
||||
#define ACCOUNT_DISCONNECTED @"Account_Disconnected"
|
||||
|
||||
#define ACCOUNT_RECEIVED_EMAIL @"Account_NewMailReceived"
|
||||
#define FILE_TRANSFER_REQUEST @"FileTransfer_Request"
|
||||
#define FILE_TRANSFER_CHECKSUMMING @"FileTransfer_Checksumming"
|
||||
#define FILE_TRANSFER_WAITING_REMOTE @"File_Transfer_WaitingRemote"
|
||||
#define FILE_TRANSFER_BEGAN @"FileTransfer_Began"
|
||||
#define FILE_TRANSFER_CANCELLED @"FileTransfer_Cancelled"
|
||||
#define FILE_TRANSFER_FAILED @"FileTransfer_Failed"
|
||||
#define FILE_TRANSFER_COMPLETE @"FileTransfer_Complete"
|
||||
|
||||
#define AIXtrasDidChangeNotification @"AIXtrasDidChange"
|
||||
#define AIApplicationDidFinishLoadingNotification @"AIApplicationDidFinishLoading"
|
||||
#define AIAppWillTerminateNotification @"AIAppWillTerminate"
|
||||
#define AIShowLogAtPathNotification @"AIShowLogAtPath"
|
||||
#define AIShowLogViewerAndReindexNotification @"AIShowLogViewerAndReindex"
|
||||
#define AINetworkDidChangeNotification @"AINetworkDidChange"
|
|
@ -1,23 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import "AIPreferencePane.h"
|
||||
|
||||
@interface AIAdvancedPreferencePane : AIPreferencePane {
|
||||
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,26 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIControllerProtocol.h>
|
||||
|
||||
@protocol AIApplescriptabilityController <AIController>
|
||||
- (void)runApplescriptAtPath:(NSString *)inPath
|
||||
function:(NSString *)function
|
||||
arguments:(NSArray *)arguments
|
||||
notifyingTarget:(id)target
|
||||
selector:(SEL)selector
|
||||
userInfo:(id)userInfo;
|
||||
@end
|
|
@ -1,44 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIWindowController.h>
|
||||
|
||||
#define AUTHORIZATION_REQUESTS AILocalizedString(@"Authorization Requests", nil)
|
||||
#define GET_INFO AILocalizedString(@"Get Info", nil)
|
||||
#define AUTHORIZE AILocalizedString(@"Authorize", nil)
|
||||
#define AUTHORIZE_ADD AILocalizedString(@"Authorize and Add", nil)
|
||||
#define DENY AILocalizedString(@"Deny", nil)
|
||||
#define DENY_BLOCK AILocalizedString(@"Deny and Block", nil)
|
||||
#define IGNORE AILocalizedString(@"Ignore", nil)
|
||||
#define IGNORE_BLOCK AILocalizedString(@"Ignore and Block", nil)
|
||||
|
||||
@class AIAccount;
|
||||
|
||||
@interface AIAuthorizationRequestsWindowController : AIWindowController <NSToolbarDelegate,NSTableViewDelegate,NSTableViewDataSource> {
|
||||
IBOutlet NSTableView *tableView;
|
||||
|
||||
NSMutableArray *requests;
|
||||
|
||||
NSMutableDictionary *toolbarItems;
|
||||
NSMutableDictionary *requiredHeightDict;
|
||||
}
|
||||
|
||||
+ (AIAuthorizationRequestsWindowController *)sharedController;
|
||||
|
||||
- (void)addRequestWithDict:(NSDictionary *)dict;
|
||||
- (void)removeRequest:(id)request;
|
||||
|
||||
@end
|
|
@ -1,189 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/ESObjectWithProperties.h>
|
||||
#import <Adium/AIContentTyping.h>
|
||||
#import <Adium/AIListObject.h>
|
||||
#import <Adium/AIInterfaceControllerProtocol.h>
|
||||
|
||||
@class AIAccount, AIListObject, AIListContact, AIContentObject, AIEmoticon;
|
||||
|
||||
#define Chat_OrderDidChange @"Chat_OrderDidChange"
|
||||
#define Chat_WillClose @"Chat_WillClose"
|
||||
#define Chat_DidOpen @"Chat_DidOpen"
|
||||
#define Chat_BecameActive @"Chat_BecameActive"
|
||||
#define Chat_AttributesChanged @"Chat_AttributesChanged"
|
||||
#define Chat_StatusChanged @"Chat_StatusChagned"
|
||||
#define Chat_ParticipatingListObjectsChanged @"Chat_ParticipatingListObjectsChanged"
|
||||
#define Chat_SourceChanged @"Chat_SourceChanged"
|
||||
#define Chat_DestinationChanged @"Chat_DestinationChanged"
|
||||
|
||||
#define KEY_UNVIEWED_CONTENT @"unviewedContent"
|
||||
#define KEY_UNVIEWED_MENTION @"unviewedMention"
|
||||
#define KEY_TYPING @"typing"
|
||||
|
||||
#define KEY_CHAT_TIMED_OUT @"Timed Out"
|
||||
#define KEY_CHAT_CLOSED_WINDOW @"Closed Window"
|
||||
|
||||
#define KEY_TOPIC @"topic"
|
||||
#define KEY_TOPIC_SETTER @"topicSetter"
|
||||
|
||||
typedef enum {
|
||||
AIChatCanNotSendMessage = 0,
|
||||
AIChatMayNotBeAbleToSendMessage,
|
||||
AIChatCanSendMessageNow,
|
||||
AIChatCanSendViaServersideOfflineMessage
|
||||
} AIChatSendingAbilityType;
|
||||
|
||||
#define KEY_ENCRYPTED_CHAT_PREFERENCE @"Encrypted Chat Preference"
|
||||
#define GROUP_ENCRYPTION @"Encryption"
|
||||
|
||||
typedef enum {
|
||||
EncryptedChat_Default = -2, /* For use by a menu which wants to provide a 'no preference' option */
|
||||
EncryptedChat_Never = -1,
|
||||
EncryptedChat_Manually = 0, /* Manually is the default */
|
||||
EncryptedChat_Automatically = 1,
|
||||
EncryptedChat_RejectUnencryptedMessages = 2
|
||||
} AIEncryptedChatPreference;
|
||||
|
||||
typedef enum {
|
||||
EncryptionStatus_None = 0,
|
||||
EncryptionStatus_Unverified,
|
||||
EncryptionStatus_Verified,
|
||||
EncryptionStatus_Finished
|
||||
} AIEncryptionStatus;
|
||||
|
||||
//Chat errors should be indicated by setting a property on this key
|
||||
//with an NSNumber of the appropriate error type as its object
|
||||
#define KEY_CHAT_ERROR @"Chat Error"
|
||||
|
||||
//This key may be set before sending KEY_CHAT_ERROR to provide any data the
|
||||
//the error message should make use of. It may be of any type.
|
||||
#define KEY_CHAT_ERROR_DETAILS @"Chat Error Details"
|
||||
|
||||
typedef enum {
|
||||
AIChatUnknownError = 0,
|
||||
AIChatMessageSendingUserIsBlocked,
|
||||
AIChatMessageSendingNotAllowedWhileInvisible,
|
||||
AIChatMessageSendingUserNotAvailable,
|
||||
AIChatMessageSendingTooLarge,
|
||||
AIChatMessageSendingTimeOutOccurred,
|
||||
AIChatMessageSendingConnectionError,
|
||||
AIChatMessageSendingMissedRateLimitExceeded,
|
||||
AIChatMessageReceivingMissedTooLarge,
|
||||
AIChatMessageReceivingMissedInvalid,
|
||||
AIChatMessageReceivingMissedRateLimitExceeded,
|
||||
AIChatMessageReceivingMissedRemoteIsTooEvil,
|
||||
AIChatMessageReceivingMissedLocalIsTooEvil,
|
||||
AIChatCommandFailed,
|
||||
AIChatInvalidNumberOfArguments
|
||||
} AIChatErrorType;
|
||||
|
||||
@interface AIChat : ESObjectWithProperties {
|
||||
AIAccount *account;
|
||||
NSDate *dateOpened;
|
||||
BOOL isOpen;
|
||||
BOOL hasSentOrReceivedContent;
|
||||
|
||||
NSMutableArray *pendingOutgoingContentObjects;
|
||||
|
||||
AIListContact *__weak preferredContact;
|
||||
NSString *name;
|
||||
NSString *uniqueChatID;
|
||||
id identifier;
|
||||
|
||||
NSMutableSet *ignoredListContacts;
|
||||
|
||||
BOOL hideUserIconAndStatus;
|
||||
|
||||
NSMutableSet *customEmoticons;
|
||||
|
||||
// Former properties
|
||||
NSDictionary *chatCreationInfo;
|
||||
|
||||
NSDictionary *securityDetails;
|
||||
|
||||
AIListContact *_listObject;
|
||||
|
||||
NSNumber *overrideLogging;
|
||||
}
|
||||
|
||||
+ (id)chatForAccount:(AIAccount *)inAccount;
|
||||
- (id)initForAccount:(AIAccount *)inAccount;
|
||||
|
||||
@property (readwrite, nonatomic, strong) AIAccount *account;
|
||||
|
||||
@property (readonly, nonatomic) NSDate *dateOpened;
|
||||
@property (readwrite, nonatomic, strong) NSDictionary *chatCreationDictionary;
|
||||
|
||||
@property (readwrite, nonatomic) BOOL isOpen;
|
||||
|
||||
@property (readwrite, nonatomic) BOOL hasSentOrReceivedContent;
|
||||
|
||||
@property (readonly, nonatomic) NSUInteger unviewedContentCount;
|
||||
@property (readonly, nonatomic) NSUInteger unviewedMentionCount;
|
||||
|
||||
- (void)incrementUnviewedContentCount;
|
||||
- (void)incrementUnviewedMentionCount;
|
||||
|
||||
- (void)clearUnviewedContentCount;
|
||||
|
||||
- (void)setDisplayName:(NSString *)inDisplayName;
|
||||
|
||||
//
|
||||
@property (readwrite, nonatomic, strong) AIListContact *listObject;
|
||||
@property (readwrite, nonatomic, weak) AIListContact *preferredListObject;
|
||||
|
||||
- (BOOL)shouldBeginSendingContentObject:(AIContentObject *)inObject;
|
||||
- (void)finishedSendingContentObject:(AIContentObject *)inObject;
|
||||
|
||||
@property (readwrite, nonatomic, strong) NSString *name;
|
||||
@property (readwrite, nonatomic, strong) id identifier;
|
||||
|
||||
@property (weak, readonly, nonatomic) NSString *uniqueChatID;
|
||||
|
||||
@property (unsafe_unretained, readonly, nonatomic) NSImage *chatImage;
|
||||
@property (unsafe_unretained, readonly, nonatomic) NSImage *chatMenuImage;
|
||||
|
||||
@property (readwrite, nonatomic, strong) NSDictionary *securityDetails;
|
||||
@property (readonly, nonatomic) BOOL isSecure;
|
||||
@property (readonly, nonatomic) AIEncryptionStatus encryptionStatus;
|
||||
@property (readonly, nonatomic) BOOL supportsSecureMessagingToggling;
|
||||
|
||||
@property (readonly, nonatomic) AIChatSendingAbilityType messageSendingAbility;
|
||||
@property (readonly, nonatomic) BOOL canSendImages;
|
||||
|
||||
- (BOOL)isListContactIgnored:(AIListObject *)inContact;
|
||||
- (void)setListContact:(AIListContact *)inContact isIgnored:(BOOL)isIgnored;
|
||||
|
||||
- (void)addCustomEmoticon:(AIEmoticon *)inEmoticon;
|
||||
@property (readonly, nonatomic) NSMutableSet *customEmoticons;
|
||||
|
||||
- (void)receivedError:(NSNumber *)type;
|
||||
|
||||
@property (readonly, nonatomic) id <AIChatContainer> chatContainer;
|
||||
|
||||
@property (readonly, nonatomic) NSMenu *actionMenu;
|
||||
|
||||
@property (readonly, nonatomic) BOOL shouldLog;
|
||||
|
||||
@property (readwrite, nonatomic) BOOL hideUserIconAndStatus;
|
||||
|
||||
// Compatibility. I don't like this here.
|
||||
- (NSArray *)containedObjects;
|
||||
- (BOOL)isGroupChat;
|
||||
|
||||
@end
|
|
@ -1,71 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIControllerProtocol.h>
|
||||
#import <Adium/AIGroupChat.h>
|
||||
|
||||
@protocol AIChatController_Private;
|
||||
@class AIChat, AIAccount, AIListContact;
|
||||
|
||||
//Observer which receives notifications of changes in chat status
|
||||
@protocol AIChatObserver
|
||||
- (NSSet *)updateChat:(AIChat *)inChat keys:(NSSet *)inModifiedKeys silent:(BOOL)silent;
|
||||
@end
|
||||
|
||||
@protocol AIChatController <AIController, AIChatController_Private>
|
||||
//Chats
|
||||
- (NSSet *)allChatsWithContact:(AIListContact *)inContact;
|
||||
- (NSSet *)allGroupChatsContainingContact:(AIListContact *)inContact;
|
||||
- (AIChat *)openChatWithContact:(AIListContact *)inContact onPreferredAccount:(BOOL)onPreferredAccount;
|
||||
- (AIChat *)chatWithContact:(AIListContact *)inContact;
|
||||
- (AIChat *)existingChatWithContact:(AIListContact *)inContact;
|
||||
- (AIChat *)existingChatWithUniqueChatID:(NSString *)uniqueChatID;
|
||||
- (AIGroupChat *)chatWithName:(NSString *)inName
|
||||
identifier:(id)identifier
|
||||
onAccount:(AIAccount *)account
|
||||
chatCreationInfo:(NSDictionary *)chatCreationInfo;
|
||||
|
||||
- (AIGroupChat *)existingChatWithIdentifier:(id)identifier onAccount:(AIAccount *)account;
|
||||
- (AIGroupChat *)existingChatWithName:(NSString *)name onAccount:(AIAccount *)account;
|
||||
|
||||
- (BOOL)closeChat:(AIChat *)inChat;
|
||||
- (void)accountDidCloseChat:(AIChat *)inChat;
|
||||
- (void)restoreChat:(AIChat *)inChat;
|
||||
|
||||
@property (nonatomic, readonly) NSSet *openChats;
|
||||
@property (nonatomic, readonly) AIChat *mostRecentUnviewedChat;
|
||||
@property (nonatomic, readonly) NSUInteger unviewedContentCount;
|
||||
@property (nonatomic, readonly) NSUInteger unviewedConversationCount;
|
||||
|
||||
- (void)switchChat:(AIChat *)chat toAccount:(AIAccount *)newAccount;
|
||||
- (void)switchChat:(AIChat *)chat toListContact:(AIListContact *)inContact usingContactAccount:(BOOL)useContactAccount;
|
||||
- (BOOL)contactIsInGroupChat:(AIListContact *)listContact;
|
||||
|
||||
//Status
|
||||
- (void)registerChatObserver:(id <AIChatObserver>)inObserver;
|
||||
- (void)unregisterChatObserver:(id <AIChatObserver>)inObserver;
|
||||
- (void)updateAllChatsForObserver:(id <AIChatObserver>)observer;
|
||||
|
||||
//Addition/removal of contacts to group chats
|
||||
- (void)chat:(AIChat *)chat addedListContacts:(NSArray *)contacts notify:(BOOL)notify;
|
||||
- (void)chat:(AIChat *)chat removedListContact:(AIListContact *)inContact;
|
||||
|
||||
- (NSString *)defaultInvitationMessageForRoom:(NSString *)room account:(AIAccount *)inAccount;
|
||||
@end
|
||||
|
||||
@protocol AIChatController_Private
|
||||
- (void)chatStatusChanged:(AIChat *)inChat modifiedStatusKeys:(NSSet *)inModifiedKeys silent:(BOOL)silent;
|
||||
@end
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//Private class :(
|
||||
@interface NSColorPickerSliders:NSColorPicker <NSColorPickingCustom>
|
||||
{
|
||||
id sliderModePopUp;
|
||||
}
|
||||
|
||||
- (void)_setupProfileUI;
|
||||
|
||||
@end
|
||||
|
||||
@interface AIColorPickerSliders : NSColorPickerSliders {
|
||||
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,30 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
@interface AIConsoleController : NSObject {
|
||||
IBOutlet NSWindow *consoleWindow;
|
||||
IBOutlet NSTextView *logView;
|
||||
IBOutlet NSTextView *injectView;
|
||||
}
|
||||
|
||||
- (IBAction)send:(id)sender;
|
||||
- (IBAction)clearLog:(id)sender;
|
||||
- (IBAction)showWindow:(id)sender;
|
||||
- (void)close;
|
||||
- (void)windowWillClose:(NSNotification *)notification;
|
||||
- (void)appendToLog:(NSAttributedString *)astr;
|
||||
|
||||
@end
|
|
@ -1,414 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIControllerProtocol.h>
|
||||
|
||||
@class AIListObject, AIChat, AIActionDetailsPane;
|
||||
|
||||
@protocol AIEventHandler, AIActionHandler;
|
||||
|
||||
//Event preferences
|
||||
#define PREF_GROUP_CONTACT_ALERTS @"Contact Alerts"
|
||||
#define KEY_CONTACT_ALERTS @"Contact Alerts"
|
||||
#define KEY_DEFAULT_EVENT_ID @"Default Event ID"
|
||||
#define KEY_DEFAULT_ACTION_ID @"Default Action ID"
|
||||
|
||||
//Event Dictionary keys
|
||||
#define KEY_EVENT_ID @"EventID"
|
||||
#define KEY_ACTION_ID @"ActionID"
|
||||
#define KEY_ACTION_DETAILS @"ActionDetails"
|
||||
#define KEY_ONE_TIME_ALERT @"OneTime"
|
||||
|
||||
typedef enum {
|
||||
AIContactsEventHandlerGroup = 0,
|
||||
AIMessageEventHandlerGroup,
|
||||
AIAccountsEventHandlerGroup,
|
||||
AIFileTransferEventHandlerGroup,
|
||||
AIOtherEventHandlerGroup
|
||||
} AIEventHandlerGroupType;
|
||||
#define EVENT_HANDLER_GROUP_COUNT 5
|
||||
|
||||
@protocol AIContactAlertsController <AIController>
|
||||
/*!
|
||||
* @brief Register an event
|
||||
*
|
||||
* An event must have a unique eventID. handler is responsible for providing information
|
||||
* about the event, such as short and long descriptions. The group determines how the event will be displayed in the events
|
||||
* preferences; events in the same group are displayed together.
|
||||
*
|
||||
* @param eventID Unique event ID
|
||||
* @param handler The handler, which must conform to AIEventHandler
|
||||
* @param inGroup The group
|
||||
* @param global If YES, the event will only be displayed in the global Events preferences; if NO, the event is available for contacts and groups via Get Info, as well.
|
||||
*/
|
||||
- (void)registerEventID:(NSString *)eventID withHandler:(id <AIEventHandler>)handler inGroup:(AIEventHandlerGroupType)inGroup globalOnly:(BOOL)global;
|
||||
|
||||
/*!
|
||||
* @brief Generate an event, returning a set of the actionIDs which were performed.
|
||||
*
|
||||
* This should be called when eventID occurs; it triggers all associated actions.
|
||||
*
|
||||
* @param eventID The event which occurred
|
||||
* @param listObject The object for which the event occurred
|
||||
* @param userInfo Event-specific user info
|
||||
* @param previouslyPerformedActionIDs If non-nil, a set of actionIDs which should be treated as if they had already been performed in this invocation.
|
||||
*
|
||||
* @result The set of actions which were performed, suitable for being passed back in for another event generation via previouslyPerformedActionIDs
|
||||
*/
|
||||
- (NSSet *)generateEvent:(NSString *)eventID forListObject:(AIListObject *)listObject userInfo:(id)userInfo previouslyPerformedActionIDs:(NSSet *)previouslyPerformedActionIDs;
|
||||
|
||||
/*!
|
||||
* @brief Return all event IDs
|
||||
*/
|
||||
- (NSArray *)allEventIDs;
|
||||
|
||||
/*!
|
||||
* @brief Return all event IDs for groups/contacts (but not global ones)
|
||||
*/
|
||||
- (NSArray *)nonGlobalEventIDs;
|
||||
|
||||
/*!
|
||||
* @brief Returns a menu of all events
|
||||
*
|
||||
* A menu item's represented object is the dictionary describing the event it represents
|
||||
*
|
||||
* @param target The target on which @selector(selectEvent:) will be called on selection.
|
||||
* @param global If YES, the events listed will include global ones (such as Error Occurred) in addition to contact-specific ones.
|
||||
* @result An NSMenu of the events
|
||||
*/
|
||||
- (NSMenu *)menuOfEventsWithTarget:(id)target forGlobalMenu:(BOOL)global;
|
||||
|
||||
/*!
|
||||
* @brief Sort an array of event IDs
|
||||
*
|
||||
* Given an array of various event IDs, this sorts them by category.
|
||||
*
|
||||
* @brief inArray The array of eventIDs to sort
|
||||
* @return Sorted version of inArray
|
||||
*/
|
||||
- (NSArray *)sortedArrayOfEventIDsFromArray:(NSArray *)inArray;
|
||||
|
||||
/*!
|
||||
* @brief Return the default event ID for a new alert
|
||||
*/
|
||||
- (NSString *)defaultEventID;
|
||||
|
||||
#pragma mark Descriptions
|
||||
|
||||
/*!
|
||||
* @brief Find the eventID associated with an English name
|
||||
*
|
||||
* This exists for compatibility with old AdiumXtras...
|
||||
*/
|
||||
- (NSString*)eventIDForEnglishDisplayName:(NSString *)displayName;
|
||||
|
||||
/*!
|
||||
* @brief Return a short description to describe eventID when considered globally
|
||||
*/
|
||||
- (NSString *)globalShortDescriptionForEventID:(NSString *)eventID;
|
||||
|
||||
/*!
|
||||
* @brief Return a description to describe eventID; this is more verbose than the short description
|
||||
* @param listObject The object for which the eventID should be described. If nil, it will be described globally.
|
||||
*/
|
||||
- (NSString *)longDescriptionForEventID:(NSString *)eventID forListObject:(AIListObject *)listObject;
|
||||
|
||||
/*!
|
||||
* @brief Return a natural language, localized description for an event
|
||||
*
|
||||
* This will be suitable for display to the user such as in a message window or a Growl notification
|
||||
*
|
||||
* @param eventID The event
|
||||
* @param listObject The object for which the event occurred
|
||||
* @param userInfo Event-specific userInfo
|
||||
* @param includeSubject If YES, the return value is a complete sentence. If NO, the return value is suitable for display after a name or other identifier.
|
||||
* @result The natural language description
|
||||
*/
|
||||
- (NSString *)naturalLanguageDescriptionForEventID:(NSString *)eventID
|
||||
listObject:(AIListObject *)listObject
|
||||
userInfo:(id)userInfo
|
||||
includeSubject:(BOOL)includeSubject;
|
||||
|
||||
/*!
|
||||
* @brief Return the image associated with an event
|
||||
*/
|
||||
- (NSImage *)imageForEventID:(NSString *)eventID;
|
||||
|
||||
/*!
|
||||
* @brief The description for multiple combined events.
|
||||
*
|
||||
* @param eventID The event
|
||||
* @param listObject The object for which the event references
|
||||
* @param chat The chat for which the event references
|
||||
* @param count The count of combined events
|
||||
*
|
||||
* @return The description of the event
|
||||
*
|
||||
*/
|
||||
- (NSString *)descriptionForCombinedEventID:(NSString *)eventID
|
||||
forListObject:(AIListObject *)listObject
|
||||
forChat:(AIChat *)chat
|
||||
withCount:(NSUInteger)count;
|
||||
|
||||
#pragma mark Event types
|
||||
/*!
|
||||
* @brief Is the passed event a message event?
|
||||
*
|
||||
* Examples of messages events are "message sent" and "message received."
|
||||
*
|
||||
* @result YES if it is a message event
|
||||
*/
|
||||
- (BOOL)isMessageEvent:(NSString *)eventID;
|
||||
|
||||
/*!
|
||||
* @brief Is the passed event a contact status event?
|
||||
*
|
||||
* Examples of messages events are "contact signed on" and "contact went away."
|
||||
*
|
||||
* @result YES if it is a contact status event
|
||||
*/
|
||||
- (BOOL)isContactStatusEvent:(NSString *)eventID;
|
||||
|
||||
#pragma mark Actions
|
||||
/*!
|
||||
* @brief Register an actionID and its handler
|
||||
*
|
||||
* When an event occurs -- that is, when the event is generated via
|
||||
* -[id<AIContactAlertsController> generateEvent:forListObject:userInfo:] -- the handler for each action
|
||||
* associated with that event within the appropriate list object's heirarchy (object -> containing group -> global)
|
||||
* will be called as per the AIActionHandler protocol.
|
||||
*
|
||||
* @param actionID The actionID
|
||||
* @param handler The handler, which must conform to the AIActionHandler protocol
|
||||
*/
|
||||
- (void)registerActionID:(NSString *)actionID withHandler:(id <AIActionHandler>)handler;
|
||||
|
||||
/*!
|
||||
* @brief Return a dictionary whose keys are action IDs and whose objects are objects conforming to AIActionHandler
|
||||
*/
|
||||
- (NSDictionary *)actionHandlers;
|
||||
|
||||
/*!
|
||||
* @brief Returns a menu of all actions
|
||||
*
|
||||
* A menu item's represented object is the dictionary describing the action it represents
|
||||
*
|
||||
* @param target The target on which @selector(selectAction:) will be called on selection
|
||||
* @result The NSMenu, which does not send validateMenuItem: messages
|
||||
*/
|
||||
- (NSMenu *)menuOfActionsWithTarget:(id)target;
|
||||
|
||||
/*!
|
||||
* @brief Return the default action ID for a new alert
|
||||
*/
|
||||
- (NSString *)defaultActionID;
|
||||
|
||||
#pragma mark Alerts
|
||||
/*!
|
||||
* @brief Returns an array of all the alerts of a given list object
|
||||
*
|
||||
* This calls alertsForListObject:withEventID:actionID with nil for eventID and actionID.
|
||||
*
|
||||
* @param listObject The object
|
||||
*/
|
||||
- (NSArray *)alertsForListObject:(AIListObject *)listObject;
|
||||
|
||||
/*!
|
||||
* @brief Return an array of all alerts for a list object with filtering
|
||||
*
|
||||
* @param listObject The object, or nil for global
|
||||
* @param eventID If specified, only return events matching eventID. If nil, don't filter based on events.
|
||||
* @param actionID If specified, only return actions matching actionID. If nil, don't filter based on actionID.
|
||||
*/
|
||||
- (NSArray *)alertsForListObject:(AIListObject *)listObject withEventID:(NSString *)eventID actionID:(NSString *)actionID;
|
||||
|
||||
/*!
|
||||
* @brief Add an alert (passed as a dictionary) to a list object
|
||||
*
|
||||
* @param newAlert The alert to add
|
||||
* @param listObject The object to which to add, or nil for global
|
||||
* @param setAsNewDefaults YES to make the type and details of newAlert be the new default for new alerts
|
||||
*/
|
||||
- (void)addAlert:(NSDictionary *)alert toListObject:(AIListObject *)listObject setAsNewDefaults:(BOOL)setAsNewDefaults;
|
||||
|
||||
/*!
|
||||
* @brief Add an alert at the global level
|
||||
*/
|
||||
- (void)addGlobalAlert:(NSDictionary *)newAlert;
|
||||
|
||||
/*!
|
||||
* @brief Remove an alert from a listObject
|
||||
*
|
||||
* @param victimAlert The alert to remove; it will be tested against existing alerts using isEqual: so must be identical
|
||||
* @param listObject The object (or nil, for global) from which to remove victimAlert
|
||||
*/
|
||||
- (void)removeAlert:(NSDictionary *)victimAlert fromListObject:(AIListObject *)listObject;
|
||||
|
||||
/*!
|
||||
* @brief Remove all current global alerts and replace them with the alerts in allGlobalAlerts
|
||||
*
|
||||
* Used for setting a preset of events
|
||||
*/
|
||||
- (void)setAllGlobalAlerts:(NSArray *)allGlobalAlerts;
|
||||
|
||||
/*!
|
||||
* @brief Remove all global (root-level) alerts with a given action ID
|
||||
*/
|
||||
- (void)removeAllGlobalAlertsWithActionID:(NSString *)actionID;
|
||||
|
||||
/*!
|
||||
* @brief Move all contact alerts from oldObject to newObject
|
||||
*
|
||||
* This is useful when adding oldObject to the metaContact newObject so that any existing contact alerts for oldObject
|
||||
* are applied at the contact-general level, displayed and handled properly for the new, combined contact.
|
||||
*
|
||||
* @param oldObject The object from which to move contact alerts
|
||||
* @param newObject The object to which to we want to add the moved contact alerts
|
||||
*/
|
||||
- (void)mergeAndMoveContactAlertsFromListObject:(AIListObject *)oldObject intoListObject:(AIListObject *)newObject;
|
||||
@end
|
||||
|
||||
/*!
|
||||
* @protocol AIEventHandler
|
||||
* @brief Protocol for a class which posts and supplies information about an Event
|
||||
*
|
||||
* Example Events are Account Connected, Contact Signed On, New Message Received
|
||||
*/
|
||||
@protocol AIEventHandler <NSObject>
|
||||
/*!
|
||||
* @brief Short description
|
||||
* @result A short localized description of the passed event
|
||||
*/
|
||||
- (NSString *)shortDescriptionForEventID:(NSString *)eventID;
|
||||
|
||||
/*!
|
||||
* @brief Global short description for an event
|
||||
* @result A short localized description of the passed event in the case that it is not associated with an object
|
||||
*/
|
||||
- (NSString *)globalShortDescriptionForEventID:(NSString *)eventID;
|
||||
|
||||
/*!
|
||||
* @brief English, non-translated global short description for an event
|
||||
*
|
||||
* This exists because old X(tras) relied upon matching the description of event IDs, and I don't feel like making
|
||||
* a converter for old packs. If anyone wants to fix this situation, please feel free :)
|
||||
*
|
||||
* @result English global short description which should only be used internally
|
||||
*/
|
||||
- (NSString *)englishGlobalShortDescriptionForEventID:(NSString *)eventID;
|
||||
|
||||
/*!
|
||||
* @brief Long description for an event
|
||||
* @result A localized description of an event, for listObject if passed, which is more verbose than the short description.
|
||||
*/
|
||||
- (NSString *)longDescriptionForEventID:(NSString *)eventID forListObject:(AIListObject *)listObject;
|
||||
|
||||
/*!
|
||||
* @brief Natural language description for an event
|
||||
*
|
||||
* @param eventID The event identifier
|
||||
* @param listObject The listObject triggering the event
|
||||
* @param userInfo Event-specific userInfo
|
||||
* @param includeSubject If YES, return a full sentence. If not, return a fragment.
|
||||
* @result The natural language description.
|
||||
*/
|
||||
- (NSString *)naturalLanguageDescriptionForEventID:(NSString *)eventID
|
||||
listObject:(AIListObject *)listObject
|
||||
userInfo:(id)userInfo
|
||||
includeSubject:(BOOL)includeSubject;
|
||||
|
||||
/*!
|
||||
* @brief Return an image icon for the specified eventID.
|
||||
*/
|
||||
- (NSImage *)imageForEventID:(NSString *)eventID;
|
||||
|
||||
/*!
|
||||
* @brief The description for multiple combined events.
|
||||
*
|
||||
* @param eventID The event
|
||||
* @param listObject The object for which the event references
|
||||
* @param chat The chat for which the event references
|
||||
* @param count The count of combined events
|
||||
*
|
||||
* @return The description of the event
|
||||
*
|
||||
*/
|
||||
- (NSString *)descriptionForCombinedEventID:(NSString *)eventID
|
||||
forListObject:(AIListObject *)listObject
|
||||
forChat:(AIChat *)chat
|
||||
withCount:(NSUInteger)count;
|
||||
|
||||
@end
|
||||
|
||||
/*!
|
||||
* @protocol AIActionHandler
|
||||
* @brief Protocol for an Action which can be taken in response to an Event
|
||||
*
|
||||
* An action may optionally supply a details pane. If it does, it can store information in a details dictionary
|
||||
* which will be passed back to the action when it is triggered as well as when it is queried for a long description.
|
||||
*
|
||||
* Example Actions are Play Sound, Speak Event, Display Growl Notification
|
||||
*/
|
||||
@protocol AIActionHandler <NSObject>
|
||||
/*!
|
||||
* @brief Short description
|
||||
* @result A short localized description of the action
|
||||
*/
|
||||
- (NSString *)shortDescriptionForActionID:(NSString *)actionID;
|
||||
|
||||
/*!
|
||||
* @brief Long description
|
||||
* @result A longer localized description of the action which should take into account the details dictionary as appropraite.
|
||||
*/
|
||||
- (NSString *)longDescriptionForActionID:(NSString *)actionID withDetails:(NSDictionary *)details;
|
||||
|
||||
/*!
|
||||
* @brief Image
|
||||
*/
|
||||
- (NSImage *)imageForActionID:(NSString *)actionID;
|
||||
|
||||
/*!
|
||||
* @brief Details pane
|
||||
* @result An <tt>AIActionDetailsPane</tt> to use for configuring this action, or nil if no configuration is possible.
|
||||
*/
|
||||
- (AIActionDetailsPane *)detailsPaneForActionID:(NSString *)actionID;
|
||||
|
||||
/*!
|
||||
* @brief Perform an action
|
||||
*
|
||||
* @param actionID The ID of the action to perform
|
||||
* @param listObject The listObject associated with the event triggering the action. It may be nil
|
||||
* @param details If set by the details pane when the action was created, the details dictionary for this particular action
|
||||
* @param eventID The eventID which triggered this action
|
||||
* @param userInfo Additional information associated with the event; userInfo's type will vary with the actionID.
|
||||
*
|
||||
* @result YES if the action was performed successfully. If NO, other actions of the same type will be attempted even if allowMultipleActionsWithID: returns NO for eventID.
|
||||
*/
|
||||
- (BOOL)performActionID:(NSString *)actionID forListObject:(AIListObject *)listObject withDetails:(NSDictionary *)details triggeringEventID:(NSString *)eventID userInfo:(id)userInfo;
|
||||
|
||||
/*!
|
||||
* @brief Allow multiple actions?
|
||||
*
|
||||
* If this method returns YES, every one of this action associated with the triggering event will be executed.
|
||||
* If this method returns NO, only the first will be.
|
||||
*
|
||||
* Example of relevance: An action which plays a sound may return NO so that if the user has sound actions associated
|
||||
* with the "Message Received (Initial)" and "Message Received" events will hear the "Message Received (Initial)"
|
||||
* sound [which is triggered first] and not the "Message Received" sound when an initial message is received. If this
|
||||
* method returned YES, both sounds would be played.
|
||||
*/
|
||||
- (BOOL)allowMultipleActionsWithID:(NSString *)actionID;
|
||||
@end
|
|
@ -1,152 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIControllerProtocol.h>
|
||||
|
||||
@class AIListObject, AIListContact, AIChat;
|
||||
@protocol AIContainingObject;
|
||||
|
||||
/* Posted for a single object whose attributes changed.
|
||||
* Must be used for observing only! Only the contact controller should post this notification. */
|
||||
#define ListObject_AttributesChanged @"ListObject_AttributesChanged"
|
||||
|
||||
/* Called when one or more ListObject_AttributesChanged notifications are done and all delays have cleared.
|
||||
* We're ready to update the display at this point.
|
||||
* Must be used for observing only! Only the contact controller should post this notification. */
|
||||
#define ListObject_AttributeChangesComplete @"ListObject_AttributeChangesComplete"
|
||||
|
||||
#define ListObject_StatusChanged @"ListObject_StatusChanged"
|
||||
#define Contact_OrderChanged @"Contact_OrderChanged"
|
||||
#define Contact_ListChanged @"Contact_ListChanged"
|
||||
#define Contact_SortSelectorListChanged @"Contact_SortSelectorListChanged"
|
||||
|
||||
#define Contact_ApplyDisplayName @"Contact_ApplyDisplayName"
|
||||
#define Contact_AddNewContact @"Contact_AddNewContact"
|
||||
|
||||
//A unique group name for our root group
|
||||
#define ADIUM_ROOT_GROUP_NAME @"ROOTJKSHFOEIZNGIOEOP"
|
||||
|
||||
//Preference groups and keys used for contacts throughout Adium
|
||||
#define PREF_GROUP_ALIASES @"Aliases" //Preference group in which to store aliases
|
||||
#define PREF_GROUP_USERICONS @"User Icons"
|
||||
#define KEY_USER_ICON @"User Icon"
|
||||
#define PREF_GROUP_NOTES @"Notes" //Preference group to store notes in
|
||||
#define PREF_GROUP_ADDRESSBOOK @"Address Book"
|
||||
#define PREF_GROUP_ALWAYS_VISIBLE @"Always Visible"
|
||||
|
||||
#define KEY_EXPANDED @"IsExpanded"
|
||||
|
||||
#define KEY_HIDE_CONTACTS @"Hide Contacts"
|
||||
#define KEY_SHOW_OFFLINE_CONTACTS @"Show Offline Contacts"
|
||||
#define KEY_SHOW_BLOCKED_CONTACTS @"Show Blocked Contacts"
|
||||
#define KEY_SHOW_IDLE_CONTACTS @"Show Idle Contacts"
|
||||
#define KEY_SHOW_MOBILE_CONTACTS @"Show Mobile Contacts"
|
||||
#define KEY_SHOW_AWAY_CONTACTS @"Show Away Contacts"
|
||||
#define KEY_HIDE_ACCOUNT_CONTACTS @"Hide Account Contacts"
|
||||
|
||||
#define KEY_USE_OFFLINE_GROUP @"Use Offline Group"
|
||||
#define KEY_HIDE_CONTACT_LIST_GROUPS @"Hide Contact List Groups"
|
||||
#define PREF_GROUP_CONTACT_LIST_DISPLAY @"Contact List Display"
|
||||
#define PREF_GROUP_CONTACT_LIST @"Contact List"
|
||||
|
||||
#define PREF_GROUP_OBJECT_STATUS_CACHE @"Object Status Cache"
|
||||
|
||||
typedef enum {
|
||||
AIUserInfoLabelValuePair = 0 /* default */,
|
||||
AIUserInfoSectionHeader,
|
||||
AIUserInfoSectionBreak
|
||||
} AIUserInfoEntryType;
|
||||
|
||||
typedef enum {
|
||||
AIInfo_Profile = 1,
|
||||
AIInfo_Accounts,
|
||||
AIInfo_Alerts,
|
||||
AIInfo_Settings
|
||||
} AIContactInfoCategory;
|
||||
|
||||
typedef enum {
|
||||
AISortGroup = 0,
|
||||
AISortGroupAndSubGroups,
|
||||
AISortGroupAndSuperGroups
|
||||
} AISortMode;
|
||||
|
||||
@protocol AIListObjectObserver;
|
||||
@class AIListGroup, AIContactList, AIListObject, AIListContact, AIMetaContact, AIService, AIAccount, AISortController, AIListBookmark, AIContactHidingController;
|
||||
|
||||
@protocol AIContactController <AIController>
|
||||
//Contact list access
|
||||
@property (readonly, nonatomic) AIContactList *contactList;
|
||||
- (AIListContact *)contactWithService:(AIService *)inService account:(AIAccount *)inAccount UID:(NSString *)inUID;
|
||||
- (void)setUID:(NSString *)UID forContact:(AIListContact *)contact;
|
||||
- (AIListObject *)existingListObjectWithUniqueID:(NSString *)uniqueID;
|
||||
- (AIListContact *)existingContactWithService:(AIService *)inService account:(AIAccount *)inAccount UID:(NSString *)inUID;
|
||||
- (AIListGroup *)groupWithUID:(NSString *)groupUID;
|
||||
@property (readonly, nonatomic) NSArray *allGroups;
|
||||
/*!
|
||||
* @brief Returns a flat array of all contacts
|
||||
*/
|
||||
@property (readonly, nonatomic) NSArray *allContacts;
|
||||
- (NSArray *)allContactsInObject:(id<AIContainingObject>)inGroup onAccount:(AIAccount *)inAccount;
|
||||
@property (readonly, nonatomic) NSArray *allBookmarks;
|
||||
@property (readonly, nonatomic) NSArray *allMetaContacts;
|
||||
- (NSMenu *)groupMenuWithTarget:(id)target;
|
||||
- (NSSet *)allContactsWithService:(AIService *)service UID:(NSString *)inUID;
|
||||
@property (readonly, nonatomic) AIListGroup *offlineGroup;
|
||||
@property (readonly, nonatomic) BOOL useOfflineGroup;
|
||||
|
||||
- (AIListBookmark *)existingBookmarkForChat:(AIChat *)inChat;
|
||||
- (AIListBookmark *)existingBookmarkForChatName:(NSString *)inName
|
||||
onAccount:(AIAccount *)inAccount
|
||||
chatCreationInfo:(NSDictionary *)inCreationInfo;
|
||||
- (AIListBookmark *)bookmarkForChat:(AIChat *)inChat inGroup:(AIListGroup *)group;
|
||||
- (void)removeBookmark:(AIListBookmark *)listBookmark;
|
||||
|
||||
- (AIMetaContact *)knownMetaContactForGroupingUIDs:(NSArray *)UIDsArray forServices:(NSArray *)servicesArray;
|
||||
- (AIMetaContact *)groupUIDs:(NSArray *)UIDsArray forServices:(NSArray *)servicesArray usingMetaContactHint:(AIMetaContact *)metaContactHint;
|
||||
- (AIMetaContact *)metaContactWithObjectID:(NSNumber *)inObjectID;
|
||||
|
||||
- (AIMetaContact *)groupContacts:(NSArray *)contactsToGroupArray;
|
||||
- (void)clearAllMetaContactData;
|
||||
|
||||
//Contact list sorting
|
||||
- (void)sortContactList;
|
||||
- (void)sortListObject:(AIListObject *)inObject;
|
||||
|
||||
//Preferred contacts
|
||||
- (AIListContact *)preferredContactForContentType:(NSString *)inType forListContact:(AIListContact *)inContact;
|
||||
- (AIListContact *)preferredContactWithUID:(NSString *)UID andServiceID:(NSString *)serviceID forSendingContentType:(NSString *)inType;
|
||||
|
||||
//Editing
|
||||
- (void)explodeMetaContact:(AIMetaContact *)metaContact; //Unpack contained contacts and then remove the meta
|
||||
- (void)removeListGroup:(AIListGroup *)listGroup;
|
||||
- (void)requestAddContactWithUID:(NSString *)contactUID service:(AIService *)inService account:(AIAccount *)inAccount;
|
||||
- (void)moveGroup:(AIListGroup *)group fromContactList:(AIContactList *)oldContactList toContactList:(AIContactList *)contactList;
|
||||
- (void)moveContact:(AIListObject *)listContact fromGroups:(NSSet *)oldGroups intoGroups:(NSSet *)groups;
|
||||
- (void)_moveContactLocally:(AIListContact *)listContact fromGroups:(NSSet *)oldGroups toGroups:(NSSet *)groups;
|
||||
@property (readonly, nonatomic) BOOL useContactListGroups;
|
||||
|
||||
//For Accounts
|
||||
- (void)accountDidStopTrackingContact:(AIListContact *)listContact;
|
||||
|
||||
//Contact List
|
||||
- (AIContactList *)createDetachedContactList;
|
||||
- (void)removeDetachedContactList:(AIContactList *)detachedList;
|
||||
|
||||
@end
|
||||
|
||||
//Empty protocol to allow easy checking for if a particular object is a contact list outline view
|
||||
@protocol ContactListOutlineView
|
||||
@end
|
|
@ -1,48 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#import <Adium/AIContactObserverManager.h>
|
||||
#define CONTACT_VISIBILITY_OPTIONS_CHANGED_NOTIFICATION @"AIContactVisibilityOptionsDidChangeNotification"
|
||||
|
||||
@class AIListContact;
|
||||
@protocol AIContainingObject;
|
||||
@interface AIContactHidingController : NSObject {
|
||||
@private
|
||||
NSString *searchString;
|
||||
NSMutableDictionary *matchedContacts;
|
||||
NSPredicate *filterPredicate;
|
||||
NSPredicate *filterPredicateTemplate;
|
||||
|
||||
NSArray *hideAccounts;
|
||||
|
||||
BOOL hideOfflineIdleOrMobileContacts;
|
||||
|
||||
BOOL showOfflineContacts;
|
||||
BOOL showIdleContacts;
|
||||
BOOL showMobileContacts;
|
||||
BOOL showBlockedContacts;
|
||||
BOOL showAwayContacts;
|
||||
BOOL useOfflineGroup;
|
||||
|
||||
BOOL useContactListGroups;
|
||||
}
|
||||
|
||||
+ (AIContactHidingController *)sharedController;
|
||||
|
||||
@property (readonly, nonatomic) NSString *contactFilteringSearchString;
|
||||
- (BOOL)filterContacts:(NSString *)inSearchString;
|
||||
- (BOOL)visibilityOfListObject:(AIListObject *)listObject inContainer:(id<AIContainingObject>)container;
|
||||
- (NSPredicate*) createPredicateWithSearchString: (NSString *) inSearchString;
|
||||
@end
|
|
@ -1,28 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIContactControllerProtocol.h>
|
||||
#import <Adium/AIModularPane.h>
|
||||
|
||||
@interface AIContactInfoPane : AIModularPane {
|
||||
|
||||
}
|
||||
|
||||
+ (AIContactInfoPane *)contactInfoPane;
|
||||
- (void)configureForListObject:(AIListObject *)inListObject;
|
||||
- (AIContactInfoCategory)contactInfoCategory;
|
||||
|
||||
@end
|
|
@ -1,24 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIListGroup.h>
|
||||
|
||||
@interface AIContactList : AIListGroup
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,60 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIAbstractListObjectMenu.h>
|
||||
#import <Adium/AIContactObserverManager.h>
|
||||
|
||||
@class AIAccount, AIListContact, AIListObject;
|
||||
|
||||
@protocol AIContactMenuDelegate;
|
||||
|
||||
@interface AIContactMenu : AIAbstractListObjectMenu <AIListObjectObserver,NSMenuDelegate> {
|
||||
AIListObject *containingObject;
|
||||
|
||||
id<AIContactMenuDelegate> delegate;
|
||||
BOOL delegateRespondsToDidSelectContact;
|
||||
BOOL delegateRespondsToShouldIncludeContact;
|
||||
BOOL delegateRespondsToValidateContact;
|
||||
BOOL shouldUseDisplayName;
|
||||
BOOL shouldDisplayGroupHeaders;
|
||||
BOOL shouldUseUserIcon;
|
||||
BOOL shouldSetTooltip;
|
||||
BOOL shouldIncludeContactListMenuItem;
|
||||
BOOL populateMenuLazily;
|
||||
}
|
||||
|
||||
+ (id)contactMenuWithDelegate:(id<AIContactMenuDelegate>)inDelegate forContactsInObject:(AIListObject *)inContainingObject;
|
||||
- (void)setContainingObject:(AIListObject *)inContainingObject;
|
||||
|
||||
@property (readwrite, nonatomic, unsafe_unretained) id<AIContactMenuDelegate> delegate;
|
||||
|
||||
@end
|
||||
|
||||
@protocol AIContactMenuDelegate <NSObject>
|
||||
- (void)contactMenuDidRebuild:(AIContactMenu *)inContactMenu;
|
||||
@optional
|
||||
- (void)contactMenu:(AIContactMenu *)inContactMenu didSelectContact:(AIListContact *)inContact;
|
||||
- (AIListContact *)contactMenu:(AIContactMenu *)inContactMenu validateContact:(AIListContact *)inContact;
|
||||
- (BOOL)contactMenu:(AIContactMenu *)inContactMenu shouldIncludeContact:(AIListContact *)inContact;
|
||||
- (BOOL)contactMenuShouldUseUserIcon:(AIContactMenu *)inContactMenu;
|
||||
- (BOOL)contactMenuShouldSetTooltip:(AIContactMenu *)inContactMenu;
|
||||
- (BOOL)contactMenuShouldIncludeContactListMenuItem:(AIContactMenu *)inContactMenu;
|
||||
- (BOOL)contactMenuShouldPopulateMenuLazily:(AIContactMenu *)inContactMenu;
|
||||
|
||||
// Called on each rebuild:
|
||||
- (BOOL)contactMenuShouldDisplayGroupHeaders:(AIContactMenu *)inContactMenu; //only applies to contained groups
|
||||
- (BOOL)contactMenuShouldUseDisplayName:(AIContactMenu *)inContactMenu;
|
||||
@end
|
|
@ -1,63 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
@class AIListObject, AIListContact;
|
||||
|
||||
//Observer which receives notifications of changes in list object status
|
||||
@protocol AIListObjectObserver
|
||||
- (NSSet *)updateListObject:(AIListObject *)inObject keys:(NSSet *)inModifiedKeys silent:(BOOL)silent;
|
||||
@end
|
||||
|
||||
@interface AIContactObserverManager : NSObject {
|
||||
//Status and Attribute updates
|
||||
NSMutableSet *contactObservers;
|
||||
NSMutableSet *removedContactObservers;
|
||||
NSTimer *delayedUpdateTimer;
|
||||
NSInteger quietDelayedUpdatePeriodsRemaining;
|
||||
|
||||
|
||||
NSInteger delayedStatusChanges;
|
||||
NSMutableSet *delayedModifiedStatusKeys;
|
||||
NSInteger delayedAttributeChanges;
|
||||
NSMutableSet *delayedModifiedAttributeKeys;
|
||||
|
||||
BOOL updatesAreDelayedUntilInactivity;
|
||||
NSMutableSet *changedObjects;
|
||||
|
||||
BOOL informingObservers;
|
||||
NSInteger delayedContactChanges;
|
||||
NSInteger delayedUpdateRequests;
|
||||
}
|
||||
|
||||
+ (AIContactObserverManager *)sharedManager;
|
||||
- (void)registerListObjectObserver:(id <AIListObjectObserver>)inObserver;
|
||||
- (void)unregisterListObjectObserver:(id)inObserver;
|
||||
- (void)updateAllListObjectsForObserver:(id <AIListObjectObserver>)inObserver;
|
||||
- (void)updateContacts:(NSSet *)contacts forObserver:(id <AIListObjectObserver>)inObserver;
|
||||
- (void)delayListObjectNotifications;
|
||||
- (void)endListObjectNotificationsDelay;
|
||||
- (void)endListObjectNotificationsDelaysImmediately;
|
||||
- (void)delayListObjectNotificationsUntilInactivity;
|
||||
- (BOOL)shouldDelayUpdates;
|
||||
- (void)listObjectStatusChanged:(AIListObject *)inObject modifiedStatusKeys:(NSSet *)inModifiedKeys silent:(BOOL)silent;
|
||||
- (void)listObjectAttributesChanged:(AIListObject *)inObject modifiedKeys:(NSSet *)inModifiedKeys;
|
||||
- (void)updateListContactStatus:(AIListContact *)inContact;
|
||||
|
||||
- (void)_updateAllAttributesOfObject:(AIListObject *)inObject;
|
||||
|
||||
- (void)noteContactChanged:(AIListObject *)inObject;
|
||||
|
||||
@end
|
|
@ -1,25 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIContentMessage.h>
|
||||
|
||||
#define CONTENT_CONTEXT_TYPE @"Context" //Type ID for this content
|
||||
|
||||
@interface AIContentContext : AIContentMessage {
|
||||
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,263 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIControllerProtocol.h>
|
||||
|
||||
#define Content_ContentObjectAdded @"Content_ContentObjectAdded"
|
||||
#define Content_ChatDidFinishAddingUntrackedContent @"Content_ChatDidFinishAddingUntrackedContent"
|
||||
#define Content_WillSendContent @"Content_WillSendContent"
|
||||
#define Content_WillReceiveContent @"Content_WillReceiveContent"
|
||||
|
||||
//XXX - This is really UI, but it can live here for now
|
||||
#define PREF_GROUP_FORMATTING @"Formatting"
|
||||
#define KEY_FORMATTING_FONT @"Default Font"
|
||||
#define KEY_FORMATTING_TEXT_COLOR @"Default Text Color"
|
||||
#define KEY_FORMATTING_BACKGROUND_COLOR @"Default Background Color"
|
||||
|
||||
// Used to hide from events' descriptions parts of messages
|
||||
#define AIHiddenMessagePartAttributeName @"AIHiddenMessagePart"
|
||||
|
||||
//Not displayed, but used for internal identification of the encryption menu
|
||||
#define ENCRYPTION_MENU_TITLE @"Encryption Menu"
|
||||
|
||||
typedef enum {
|
||||
AIFilterContent = 0, // Changes actual message and non-message content
|
||||
AIFilterDisplay, // Changes only how non-message content is displayed locally (Profiles, aways, auto-replies, ...)
|
||||
AIFilterMessageDisplay, // Changes only how messages are displayed locally
|
||||
AIFilterTooltips, // Changes only information displayed in contact tooltips
|
||||
AIFilterContactList, // Changes only information in statuses displayed in the contact list
|
||||
/* A special content mode for AIM auto-replies that will only apply to bounced away messages. This allows us to
|
||||
* filter %n,%t,... just like the official client. A small tumor in our otherwise beautiful filter system *cry*
|
||||
*/
|
||||
AIFilterAutoReplyContent
|
||||
|
||||
} AIFilterType;
|
||||
#define FILTER_TYPE_COUNT 6
|
||||
|
||||
typedef enum {
|
||||
AIFilterIncoming = 0, // Content we are receiving
|
||||
AIFilterOutgoing // Content we are sending
|
||||
} AIFilterDirection;
|
||||
#define FILTER_DIRECTION_COUNT 2
|
||||
|
||||
#define HIGHEST_FILTER_PRIORITY 0
|
||||
#define HIGH_FILTER_PRIORITY 0.25f
|
||||
#define DEFAULT_FILTER_PRIORITY 0.5f
|
||||
#define LOW_FILTER_PRIORITY 0.75f
|
||||
#define LOWEST_FILTER_PRIORITY 1.0f
|
||||
|
||||
@protocol AIContentFilter, AIDelayedContentFilter, AIHTMLContentFilter;
|
||||
@protocol AdiumMessageEncryptor;
|
||||
|
||||
@class AIAccount, AIChat, AIListContact, AIListObject, AIContentObject;
|
||||
@class AIContentMessage;
|
||||
|
||||
@protocol AIContentController <AIController>
|
||||
//Typing
|
||||
- (void)userIsTypingContentForChat:(AIChat *)chat hasEnteredText:(BOOL)hasEnteredText;
|
||||
|
||||
//Formatting
|
||||
- (NSDictionary *)defaultFormattingAttributes;
|
||||
|
||||
//Content Filtering
|
||||
- (void)registerContentFilter:(id <AIContentFilter>)inFilter
|
||||
ofType:(AIFilterType)type
|
||||
direction:(AIFilterDirection)direction;
|
||||
- (void)registerDelayedContentFilter:(id <AIDelayedContentFilter>)inFilter
|
||||
ofType:(AIFilterType)type
|
||||
direction:(AIFilterDirection)direction;
|
||||
- (void)registerHTMLContentFilter:(id <AIHTMLContentFilter>)inFilter
|
||||
direction:(AIFilterDirection)direction;
|
||||
- (void)unregisterContentFilter:(id <AIContentFilter>)inFilter;
|
||||
- (void)unregisterDelayedContentFilter:(id <AIDelayedContentFilter>)inFilter;
|
||||
- (void)unregisterHTMLContentFilter:(id <AIHTMLContentFilter>)inFilter;
|
||||
- (void)registerFilterStringWhichRequiresPolling:(NSString *)inPollString;
|
||||
- (BOOL)shouldPollToUpdateString:(NSString *)inString;
|
||||
|
||||
- (NSAttributedString *)filterAttributedString:(NSAttributedString *)attributedString
|
||||
usingFilterType:(AIFilterType)type
|
||||
direction:(AIFilterDirection)direction
|
||||
context:(id)context;
|
||||
- (void)filterAttributedString:(NSAttributedString *)attributedString
|
||||
usingFilterType:(AIFilterType)type
|
||||
direction:(AIFilterDirection)direction
|
||||
filterContext:(id)filterContext
|
||||
notifyingTarget:(id)target
|
||||
selector:(SEL)selector
|
||||
context:(id)context;
|
||||
- (void)delayedFilterDidFinish:(NSAttributedString *)attributedString uniqueID:(unsigned long long)uniqueID;
|
||||
- (NSString *)filterHTMLString:(NSString *)htmlString
|
||||
direction:(AIFilterDirection)direction
|
||||
content:(AIContentObject*)content;
|
||||
|
||||
//Sending / Receiving content
|
||||
- (void)receiveContentObject:(AIContentObject *)inObject;
|
||||
- (BOOL)sendContentObject:(AIContentObject *)inObject;
|
||||
- (void)sendRawMessage:(NSString *)inString toContact:(AIListContact *)inContact;
|
||||
/*!
|
||||
* @brief Display content, optionally using content filters
|
||||
*
|
||||
* This should only be used for content which is not being sent or received but only displayed, such as message history. If you
|
||||
*
|
||||
* The ability to force filtering to be completed immediately exists for message history, which needs to put its display
|
||||
* in before the first message; otherwise, the use of delayed filtering would mean that message history showed up after the first message.
|
||||
*
|
||||
* @param inObject The object to display
|
||||
* @param useContentFilters Should filters be used?
|
||||
* @param immediately If YES, only immediate filters will be used, and inObject will have its message set before we return.
|
||||
* If NO, immediate and delayed filters will be used, and inObject will be filtered over the course of some number of future run loops.
|
||||
*/
|
||||
- (void)displayContentObject:(AIContentObject *)inObject usingContentFilters:(BOOL)useContentFilters immediately:(BOOL)immediately;
|
||||
- (void)displayEvent:(NSString *)message ofType:(NSString *)type inChat:(AIChat *)inChat;
|
||||
|
||||
//Encryption
|
||||
- (NSAttributedString *)decodedIncomingMessage:(NSString *)inString
|
||||
fromContact:(AIListContact *)inListContact
|
||||
onAccount:(AIAccount *)inAccount
|
||||
tryDecrypt:(BOOL)decrypt;
|
||||
- (NSString *)decryptedIncomingMessage:(NSString *)inString
|
||||
fromContact:(AIListContact *)inListContact
|
||||
onAccount:(AIAccount *)inAccount;
|
||||
|
||||
- (NSMenu *)encryptionMenuNotifyingTarget:(id)target withDefault:(BOOL)withDefault;
|
||||
|
||||
- (BOOL)chatIsReceivingContent:(AIChat *)chat;
|
||||
|
||||
//OTR
|
||||
- (void)setEncryptor:(id<AdiumMessageEncryptor>)inEncryptor;
|
||||
- (void)requestSecureOTRMessaging:(BOOL)inSecureMessaging inChat:(AIChat *)inChat;
|
||||
- (void)promptToVerifyEncryptionIdentityInChat:(AIChat *)inChat;
|
||||
- (void)questionVerifyEncryptionIdentityInChat:(AIChat *)inChat;
|
||||
- (void)sharedVerifyEncryptionIdentityInChat:(AIChat *)inChat;
|
||||
@end
|
||||
|
||||
|
||||
/*!
|
||||
* @protocol AIContentFilter
|
||||
* @brief Protocol to be implemented by regular content filter objects
|
||||
*
|
||||
* See registerContentFilter:ofType:direction: for registration
|
||||
*/
|
||||
@protocol AIContentFilter
|
||||
/*!
|
||||
* @brief Filter an attributed string
|
||||
*
|
||||
* Given an attributed string, the filtering object makes any desired changes and returns the resulting string.
|
||||
* If no changes are made, the original attributed string should be returned.
|
||||
* If after handling the attributed string it should be discarded rather than used (e.g. processing a message's
|
||||
* attributed string led to an action, and the message itself should no longer be sent), return nil.
|
||||
*
|
||||
* @param inAttributedString NSAttributedString to filter
|
||||
* @param context An object, such as an AIListContact or an AIAccount, potentially relevant to filtration. May be anything, so check its class as needed.
|
||||
* @result The filtered attributed string, which may be the same as attributedString, or nil if the attributed string should be discared.
|
||||
*/
|
||||
- (NSAttributedString *)filterAttributedString:(NSAttributedString *)inAttributedString context:(id)context;
|
||||
|
||||
/*!
|
||||
* @brief The priority for this filter
|
||||
*
|
||||
* This is a float between 0.0 and 1.0. Lower numbers indicate a higher priority.
|
||||
* Filter priority determines the order in which filters are executed on a given string.
|
||||
* DEFAULT_FILTER_PRIORITY should be used unless you have a reason to care that your filter happen earlier or later.
|
||||
*
|
||||
* @result A float between 0.0 and 1.0, with (HIGHEST_FILTER_PRIORITY == 0.0) and (LOWEST_FILTER_PRIORITY == 1.0)
|
||||
*/
|
||||
- (CGFloat)filterPriority;
|
||||
@end
|
||||
|
||||
/*!
|
||||
* @protocol AIHTMLContentFilter
|
||||
* @brief Protocol to be implemented by HTML content filter objects
|
||||
*
|
||||
* See registerHTMLContentFilter:direction: for registration
|
||||
* AIHTMLContentFilters only see strings just as the WKMV is about to display them. This allows outputting custom html for display
|
||||
*/
|
||||
@protocol AIHTMLContentFilter
|
||||
/*!
|
||||
* @brief Filter an HTML string
|
||||
*
|
||||
* Given an HTML string, the filtering object makes any desired changes and returns the resulting string.
|
||||
* If no changes are made, the original HTML string should be returned.
|
||||
* This filtration occurs immediately before the HTML is displayed to the user in the WebKit Message View
|
||||
*
|
||||
* @param inHTMLString HTML to filter
|
||||
* @param content The AIContentObject associated with this HTML, allowing access to the source and destination for the message
|
||||
* @result The filtered HTML string, which may be the same as inHTMLString
|
||||
*/
|
||||
- (NSString *)filterHTMLString:(NSString *)inHTMLString content:(AIContentObject*)content;
|
||||
|
||||
/*!
|
||||
* @brief The priority for this filter
|
||||
*
|
||||
* This is a float between 0.0 and 1.0. Lower numbers indicate a higher priority.
|
||||
* Filter priority determines the order in which filters are executed on a given string.
|
||||
* DEFAULT_FILTER_PRIORITY should be used unless you have a reason to care that your filter happen earlier or later.
|
||||
*
|
||||
* @result A float between 0.0 and 1.0, with (HIGHEST_FILTER_PRIORITY == 0.0) and (LOWEST_FILTER_PRIORITY == 1.0)
|
||||
*/
|
||||
- (CGFloat)filterPriority;
|
||||
@end
|
||||
|
||||
/*!
|
||||
* @protocol AIDelayedContentFilter
|
||||
* @brief Protocol to be implemented by delayed content filter objects
|
||||
*
|
||||
* A delayed content filter is able to begin working on filtering an attributed string and then
|
||||
* return its results an unspecified amount of time later. This allows nonblocking filtration.
|
||||
*
|
||||
* This should only be used if the expected time for execution is nontrivial. Use AIContentFilter if
|
||||
* the filtration occurs quickly.
|
||||
*
|
||||
* See registerDelayedContentFilter:ofType:direction: for registration
|
||||
*/
|
||||
@protocol AIDelayedContentFilter
|
||||
/*!
|
||||
* @brief Filter an attributed string over an unspecified period of time
|
||||
*
|
||||
* Given an attributed string, the filtering object may begin working on the result of its filter
|
||||
*
|
||||
* [adium.contentController delayedFilterDidFinish:uniqueID:] should be called with the eventual result if this method returns YES.
|
||||
* If the filter eventually fails, this method MUST be called with the original inAttributedString.
|
||||
*
|
||||
* @param inAttributedString NSAttributedString to filter
|
||||
* @param context An object, such as an AIListContact or an AIAccount, potentially relevant to filtration. May be anything, so check its class as needed.
|
||||
* @param uniqueID A uniqueID which will be passed back to [adium.contentController delayedFilterDidFinish:uniqueID:] when this filtration is complete.
|
||||
*
|
||||
* @result YES if a delayed filtration process began; NO if no changes are to be made.
|
||||
*/
|
||||
- (BOOL)delayedFilterAttributedString:(NSAttributedString *)inAttributedString context:(id)context uniqueID:(unsigned long long)uniqueID;
|
||||
|
||||
/*!
|
||||
* @brief The priority for this filter
|
||||
*
|
||||
* This is a float between 0.0 and 1.0. Lower numbers indicate a higher priority.
|
||||
* Filter priority determines the order in which filters are executed on a given string.
|
||||
* DEFAULT_FILTER_PRIORITY should be used unless you have a reason to care that your filter happen earlier or later.
|
||||
*
|
||||
* @result A float between 0.0 and 1.0, with (HIGHEST_FILTER_PRIORITY == 0.0) and (LOWEST_FILTER_PRIORITY == 1.0)
|
||||
*/
|
||||
- (CGFloat)filterPriority;
|
||||
@end
|
||||
|
||||
@protocol AdiumMessageEncryptor <NSObject>
|
||||
- (void)willSendContentMessage:(AIContentMessage *)inContentMessage;
|
||||
- (NSString *)decryptIncomingMessage:(NSString *)inString fromContact:(AIListContact *)inListContact onAccount:(AIAccount *)inAccount;
|
||||
|
||||
- (void)requestSecureOTRMessaging:(BOOL)inSecureMessaging inChat:(AIChat *)inChat;
|
||||
- (void)promptToVerifyEncryptionIdentityInChat:(AIChat *)inChat;
|
||||
- (void)questionVerifyEncryptionIdentityInChat:(AIChat *)inChat;
|
||||
- (void)sharedVerifyEncryptionIdentityInChat:(AIChat *)inChat;
|
||||
@end
|
|
@ -1,34 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIContentStatus.h>
|
||||
|
||||
#define CONTENT_EVENT_TYPE @"Event" //Type ID for this content
|
||||
|
||||
@interface AIContentEvent : AIContentStatus {
|
||||
|
||||
}
|
||||
|
||||
@property (weak, readonly, nonatomic) NSString *eventType;
|
||||
|
||||
+ (id)eventInChat:(AIChat *)inChat
|
||||
withSource:(id)inSource
|
||||
destination:(id)inDest
|
||||
date:(NSDate *)inDate
|
||||
message:(NSAttributedString *)inMessage
|
||||
withType:(NSString *)inStatus;
|
||||
|
||||
@end
|
|
@ -1,105 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIContentObject.h>
|
||||
|
||||
#define CONTENT_MESSAGE_TYPE @"Message" //Type ID for this content
|
||||
|
||||
@class AIChat;
|
||||
|
||||
/*! @class AIContentMessage
|
||||
* @brief A message in a chat. Subclass of AIContentObject.
|
||||
*
|
||||
* @par A content message is a type of content object that represents a message sent by one user to another user (except in the case of an autoreply, which is sent by the user's client).
|
||||
*
|
||||
* @par The content of the message is handled as an attributed string. This allows AIContentMessages to be used with all services, regardless of the format they use for text (HTML, XHTML, Markdown, etc.).
|
||||
*
|
||||
* @par A content message can be an autoreply. This happens when the message was sent automatically (or will be) in response to the sender receiving a previous message while away. Not all services support autoreplies; on those that don't, the AIContentMessage for an incoming autoreply will not have its \c autoreply flag set.
|
||||
*
|
||||
* @par AIContentMessage is a concrete subclass of AIContentObject. All methods and properties of AIContentObject also work with AIContentMessage.
|
||||
*/
|
||||
|
||||
@interface AIContentMessage : AIContentObject {
|
||||
BOOL isAutoreply;
|
||||
NSString *encodedMessage;
|
||||
id encodedMessageAccountData;
|
||||
}
|
||||
|
||||
/*! @brief Create and autorelease an AIContentMessage.
|
||||
* @return An autoreleased AIContentMessage.
|
||||
*/
|
||||
+ (id)messageInChat:(AIChat *)inChat
|
||||
withSource:(id)inSource
|
||||
destination:(id)inDest
|
||||
date:(NSDate *)inDate
|
||||
message:(NSAttributedString *)inMessage
|
||||
autoreply:(BOOL)inAutoReply;
|
||||
|
||||
+ (id)messageInChat:(AIChat *)inChat
|
||||
withSource:(id)inSource
|
||||
sourceNick:(NSString *)inSourceNick
|
||||
destination:(id)inDest
|
||||
date:(NSDate *)inDate
|
||||
message:(NSAttributedString *)inMessage
|
||||
autoreply:(BOOL)inAutoreply;
|
||||
|
||||
/*! @brief Create an AIContentMessage.
|
||||
*
|
||||
* @par See <code>AIContentObject</code>'s <code>initWithChat:source:destination:date:message:</code> method for more information.
|
||||
*
|
||||
* @return An AIContentMessage.
|
||||
*/
|
||||
- (id)initWithChat:(AIChat *)inChat
|
||||
source:(id)inSource
|
||||
sourceNick:(NSString *)inSourceNick
|
||||
destination:(id)inDest
|
||||
date:(NSDate *)inDate
|
||||
message:(NSAttributedString *)inMessage
|
||||
autoreply:(BOOL)inAutoreply;
|
||||
|
||||
/*!
|
||||
* @brief Whether this message is an autoreply.
|
||||
*/
|
||||
@property (readwrite, nonatomic) BOOL isAutoreply;
|
||||
|
||||
/*! @brief The encoded string for the contents of this content message.
|
||||
*
|
||||
* @par This is the string containing the same message that the content message was initialized with (which is unchangeable), in a format suitable for use by the service (e.g., to be transmitted over the wire or having been received over the wire).
|
||||
*
|
||||
* @par Usually, the encoded string is obtained from the account by the content controller. In addition, it may be passed through one or more secondary encoders, such as an encrypter. Traditionally, the new string is set as the content message's encoded message using this method after every step.
|
||||
*
|
||||
* @return A string containing the message encoded to some sort of marked-up (or plain) source code, such as HTML source code.
|
||||
*/
|
||||
@property (readwrite, nonatomic) NSString *encodedMessage;
|
||||
|
||||
/*! @brief The object associated with this method for an account's benefit.
|
||||
*
|
||||
* @par This property is intended for use by accounts that need to associate some private data with a message. It is not used by anything else.
|
||||
*
|
||||
* @return The object associated with this message.
|
||||
*/
|
||||
@property (readwrite, nonatomic) id encodedMessageAccountData;
|
||||
|
||||
/*!
|
||||
* @brief The prefix string for the sender of this message.
|
||||
*
|
||||
* @return A textual representation of the highest level of flags the sender has in a chat.
|
||||
*
|
||||
* This is returned based on the user's flags in a group chat. For a normal chat, this is an empty string.
|
||||
*/
|
||||
@property (weak, readonly, nonatomic) NSString *senderPrefix;
|
||||
|
||||
@end
|
|
@ -1,41 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIContentEvent.h>
|
||||
|
||||
#define CONTENT_NOTIFICATION_TYPE @"Notification" //Type ID for this content
|
||||
|
||||
typedef enum {
|
||||
AIDefaultNotificationType = 0
|
||||
} AINotificationType;
|
||||
|
||||
@interface AIContentNotification : AIContentEvent {
|
||||
AINotificationType notificationType;
|
||||
}
|
||||
|
||||
/*! @brief Create and autorelease an AIContentNotification.
|
||||
* @return An autoreleased AIContentNotification.
|
||||
*/
|
||||
+ (id)notificationInChat:(AIChat *)inChat
|
||||
withSource:(id)inSource
|
||||
destination:(id)inDest
|
||||
date:(NSDate *)inDate
|
||||
notificationType:(AINotificationType)inNotificationType;
|
||||
|
||||
@property (readonly, nonatomic) AINotificationType notificationType;
|
||||
@property (weak, readonly, nonatomic) NSString *eventType;
|
||||
|
||||
@end
|
|
@ -1,267 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
@class AIChat, AIListObject;
|
||||
|
||||
/*! @class AIContentObject
|
||||
* @brief A complete unit of content. Abstract class.
|
||||
*
|
||||
* @par “Content” is a vague word, but this is an abstract class, so vagueness is to be expected. A content object is anything that travels from a source to a destination, relevant to a chat, that may or may not be outgoing, carrying a datestamp and a message.
|
||||
*
|
||||
* @par The most common kind of content object is a content message, which is what people use to communicate over chats (except on MSN, where some people use their status messages).
|
||||
*
|
||||
* @par A content object may be incoming or outgoing. AIContentObject's basic rule for determining the direction of the content is to examine the content's source: If the source is an account, then the content is outgoing; if the source is a contact, then the content is incoming. The direction of a content object determines which events are triggered by the content (if that isn't disabled for the content object), and can affect how the content is displayed in the message view.
|
||||
*
|
||||
* @par Not all content objects have a message. In particular, a typing notification (\c AIContentTyping) does not have a message.
|
||||
*
|
||||
* @par In addition, AIContentObject includes a number of methods and properties that exist for the convenience of other parts of Adium. These include:
|
||||
* @li <code>isSimilarToContent:</code> (used by message view to determine whether styles may want to group two content objects together)
|
||||
* @li <code>isFromSameDayAsContent:</code> (used by message view to determine whether to insert a date separator)
|
||||
* @li <code>displayClasses</code> (used by message view)
|
||||
*/
|
||||
|
||||
@interface AIContentObject : NSObject {
|
||||
AIChat *__weak chat;
|
||||
AIListObject *source;
|
||||
AIListObject *destination;
|
||||
NSString *sourceNick;
|
||||
BOOL outgoing;
|
||||
|
||||
NSAttributedString *message;
|
||||
NSDate *date;
|
||||
|
||||
BOOL filterContent;
|
||||
BOOL trackContent;
|
||||
BOOL displayContent;
|
||||
BOOL displayContentImmediately;
|
||||
BOOL sendContent;
|
||||
BOOL postProcessContent;
|
||||
|
||||
NSDictionary *userInfo;
|
||||
|
||||
NSMutableArray *customDisplayClasses;
|
||||
}
|
||||
|
||||
/*! @brief Create a content object without a message.
|
||||
*
|
||||
* @par If your subclass represents a type of content that wouldn't have a message associated with it (such as a typing notification), then this is the message you should send to \c super.
|
||||
*
|
||||
* @param inChat The chat with which this content is associated. The content may be presented in the message view and/or effect a change in the status icon for the tab (as well as the contact's row in the contact list).
|
||||
* @param inSource The account or contact from which the content originated. If it's an account, then this is outgoing content.
|
||||
* @param inDest The contact to which the content is addressed.
|
||||
* @param inDate The date and time at which the content was received or sent.
|
||||
* @return A shiny new content object.
|
||||
*/
|
||||
- (id)initWithChat:(AIChat *)inChat
|
||||
source:(AIListObject *)inSource
|
||||
destination:(AIListObject *)inDest
|
||||
date:(NSDate*)inDate;
|
||||
/*! @brief Create a content object with a message.
|
||||
*
|
||||
* @par Most content objects have a styled-text or plain-text message as their content. If your subclass represents a type of content that may have a message associated with it (such as a chat message), then this is the message you should send to \c super.
|
||||
*
|
||||
* @param inChat The chat with which this content is associated. The content may be presented in the message view and/or effect a change in the status icon for the tab (as well as the contact's row in the contact list).
|
||||
* @param inSource The account or contact from which the content originated. If it's an account, then this is outgoing content.
|
||||
* @param inDest The contact to which the content is addressed.
|
||||
* @param inDate The date and time at which the content was received or sent.
|
||||
* @param inMessage The message that is this object's content. May be \c nil; in that case, this is the same as the init method that doesn't have a message: parameter.
|
||||
* @return A shiny new content object.
|
||||
*/
|
||||
- (id)initWithChat:(AIChat *)inChat
|
||||
source:(AIListObject *)inSource
|
||||
destination:(AIListObject *)inDest
|
||||
date:(NSDate*)inDate
|
||||
message:(NSAttributedString *)inMessage;
|
||||
|
||||
- (id)initWithChat:(AIChat *)inChat
|
||||
source:(AIListObject *)inSource
|
||||
sourceNick:(NSString *)inSourceNick
|
||||
destination:(AIListObject *)inDest
|
||||
date:(NSDate*)inDate
|
||||
message:(NSAttributedString *)inMessage;
|
||||
|
||||
/*! @brief The type of content.
|
||||
*
|
||||
* @par There is at least one type defined for every concrete subclass of \c AIContentObject.
|
||||
*
|
||||
* @par Subclassing note: You must override the getter and return a string (not \c nil). This string should probably be constant, so that types can be compared using the <code>==</code> operator rather than string comparison.
|
||||
*
|
||||
* @return A string representing the type of content that this object bears.
|
||||
*/
|
||||
@property (weak, nonatomic, readonly) NSString *type;
|
||||
|
||||
#pragma mark Comparing
|
||||
|
||||
/*! @brief Compares the proximity of two content objects.
|
||||
*
|
||||
* @par The content objects are similar if they are of the same type, are from the same source, and have datestamps within five minutes of each other.
|
||||
*
|
||||
* @param inContent The content object to compare the receiver to.
|
||||
* @return \c YES if the receiver is similar to \a inContent; \c NO if not.
|
||||
*/
|
||||
- (BOOL)isSimilarToContent:(AIContentObject *)inContent;
|
||||
/*! @brief Reports whether two content objects were delivered on the same day.
|
||||
*
|
||||
* @par The content objects are on the same day if their datestamps have the same year, month, and date. The comparison is performed within the Common Era, i.e., the Gregorian calendar.
|
||||
*
|
||||
* @param inContent The content object to compare the receiver to.
|
||||
* @return \c YES if the receiver is from the same day of the common era as \a inContent; \c NO if not.
|
||||
*/
|
||||
- (BOOL)isFromSameDayAsContent:(AIContentObject *)inContent;
|
||||
|
||||
#pragma mark Content
|
||||
|
||||
/*! @brief The list object (usually, account or contact) that originated the content.
|
||||
*
|
||||
* @par If the source is an account, then the content is outgoing (the user sent it). Otherwise, it's incoming (the user received it).
|
||||
*
|
||||
* @par Content objects' source should not be not be confused with their chat. See \c chat if that's what you're looking for.
|
||||
*
|
||||
* @par This is set by the init methods.
|
||||
*
|
||||
* @return The source of the content.
|
||||
*/
|
||||
@property (nonatomic, readonly) AIListObject *source;
|
||||
/*! @brief The list object (usually, contact) that the content is addressed to.
|
||||
*
|
||||
* @par This is set by the init methods.
|
||||
*
|
||||
* @return The intended recipient of the content.
|
||||
*/
|
||||
@property (nonatomic, readonly) AIListObject *destination;
|
||||
|
||||
/*! @brief The date and time at which the content was sent.
|
||||
*
|
||||
* @par This is set by the init methods.
|
||||
*
|
||||
* @return The datestamp of the content.
|
||||
*/
|
||||
@property (nonatomic, readonly) NSDate *date;
|
||||
|
||||
/*! @brief Returns whether the content is outgoing (the user sent it), rather than incoming (the user received it).
|
||||
*
|
||||
* @par If the content's source is an account, then the content is outgoing (the user sent it). Otherwise, it's incoming (the user received it).
|
||||
*
|
||||
* @par Whether a content object is outgoing determines which events are triggered by the content (if that isn't disabled for the content object), and can affect how the content is displayed in the message view.
|
||||
*
|
||||
* @return \c YES if the content is outgoing; \c NO if it is incoming.
|
||||
*/
|
||||
@property (nonatomic, readonly) BOOL isOutgoing;
|
||||
|
||||
/*! @brief The chat with which this content is associated.
|
||||
*
|
||||
* @par All content is associated with a chat, even if only incidentally. While the content may not be chat-oriented, all content may eventually end up displayed in a chat somewhere, either inline in the message view (status changes and file transfers) or in the tab or title bar (typing notification).
|
||||
*
|
||||
* @return The chat with which this content is associated.
|
||||
*/
|
||||
@property (nonatomic, readwrite, weak) AIChat *chat;
|
||||
|
||||
/*! @brief Obtain the current message in the content.
|
||||
*
|
||||
* @return The current message.
|
||||
*/
|
||||
@property (nonatomic, strong) NSAttributedString *message;
|
||||
@property (weak, readonly, nonatomic) NSString *messageString;
|
||||
/*! @brief Get an array of CSS class names with which this content should be displayed.
|
||||
*
|
||||
* @par You should use these classes whenever inserting the content into an HTML or XHTML document, or anywhere else where CSS would be used with the content.
|
||||
*
|
||||
* @return An array of strings, each containing a class name.
|
||||
*/
|
||||
- (NSMutableArray *)displayClasses;
|
||||
|
||||
/*! @brief Add a custom display class to this object
|
||||
*
|
||||
* @par This can be used to tag messages with custom metadata which display engines can use to style them accordingly
|
||||
*/
|
||||
- (void) addDisplayClass:(NSString *)className;
|
||||
|
||||
/*! @brief Associate any object you want with this content object.
|
||||
*
|
||||
* @par \c AIContentObject does not use this object at all; it simply retains it. This property is entirely for your own use. This sort of property is also called a “reference constant”, especially by Carbon APIs.
|
||||
*
|
||||
* @par Beware of setting a mutable object as the user-info object, because the \c AIContentObject will not make a copy; it will only retain it. There's nothing wrong with putting a mutable object here; just make sure that you know you're doing that, that you document that you're willfully setting a mutable object here, and that nothing mutates the object contrarily to your expectations.
|
||||
*
|
||||
* @par It is safe to set this property to \c nil.
|
||||
*
|
||||
* @param inUserInfo The new user-info object.
|
||||
*/
|
||||
@property (nonatomic, strong) id userInfo;
|
||||
|
||||
#pragma mark Behavior
|
||||
|
||||
/*! @brief Return whether the content passes through content filters.
|
||||
*
|
||||
* @par Content filtering is performed by the content controller; see \c AIContentControllerProtocol. This property tells the content controller whether to apply its filters to the content object, or leave the content object unfiltered.
|
||||
*
|
||||
* @return \c YES if the content will be passed through content filters; \c NO if it will not be passed through filters.
|
||||
*/
|
||||
@property (nonatomic) BOOL filterContent;
|
||||
|
||||
/*! @brief Return whether the content will cause notifications and events.
|
||||
*
|
||||
* @par If this is \c YES, the content controller will post notifications and generate events so that other objects can monitor the progress of receipt and sending of content.
|
||||
*
|
||||
* @par See the \c AIContentControllerProtocol documentation for more information on content controller events.
|
||||
*
|
||||
* @par XXX We should list reasons why you would want or not want a content object to be tracked.
|
||||
*
|
||||
* @return \c YES if the content controller should generate events and post notifications about this content object; \c NO if it should keep mum.
|
||||
*/
|
||||
@property (nonatomic) BOOL trackContent;
|
||||
|
||||
|
||||
/*! @brief Return whether the content will be displayed to the user.
|
||||
*
|
||||
* @par Once a content object has completely passed through the content controller's receiving or sending procedure, including all filtering, the content controller then looks to this property to decide whether it should display the content. Some types of content, such as typing notification (\c AIContentTyping), are sent, but not displayed.
|
||||
*
|
||||
* @par This property also controls whether the content will be entered into its chat's transcript (if the logger knows how to transcribe this content). If it is not displayed, neither will it be logged. See also the \c postProcessContent property, which controls postprocessing (such as logging) independently of whether the content will be displayed.
|
||||
*
|
||||
* @return \c YES if the content controller will display this content; \c NO otherwise.
|
||||
*/
|
||||
@property (nonatomic) BOOL displayContent;
|
||||
|
||||
/*! @brief Return whether the content will be displayed immediately, or enqueued.
|
||||
*
|
||||
* @par The message view keeps a queue of messages which it eventually displays all at once rather than one at a time. When this is \c NO, the content is held in this queue until a suitable moment to display all the queued messages. Such a moment generally does arrive very soon; it is unlikely that the content will be held even for a whole second.
|
||||
*
|
||||
* @par The queue is for the benefit of the message history: it would be distracting if the message view were to scroll as one message after another were introduced into it, so the messages are inserted with <code>displayContentImmediately = YES</code>, so that they bypass the queue and instead all together instantly.
|
||||
*
|
||||
* @return \c YES if the content object should not be held in the queue; \c NO if it should.
|
||||
*/
|
||||
@property (nonatomic) BOOL displayContentImmediately;
|
||||
|
||||
/*! @brief Return whether to allow sending the content over the network.
|
||||
*
|
||||
* @par The content controller will not send ask the account to send a content object's content if the content object's \c sendContent property is \c NO. The content will still be displayed locally.
|
||||
*
|
||||
* @return \c YES if this content is OK for the content controller to send; \c NO if it should not be sent.
|
||||
*/
|
||||
@property (nonatomic) BOOL sendContent;
|
||||
|
||||
|
||||
/*! @brief Return whether any post-delivery treatment should be applied to the message.
|
||||
*
|
||||
* @par Logging (aka transcription) is one example of something that is done to messages and other content objects after they have finished being received or sent.
|
||||
*
|
||||
* @return \c YES if the content should be postprocessed; \c NO if it should not.
|
||||
*/
|
||||
@property (nonatomic) BOOL postProcessContent;
|
||||
|
||||
@property (nonatomic, retain) NSString *sourceNick;
|
||||
|
||||
@end
|
|
@ -1,51 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIContentObject.h>
|
||||
|
||||
#define CONTENT_STATUS_TYPE @"Status" //Type ID for this content
|
||||
|
||||
@interface AIContentStatus : AIContentObject {
|
||||
NSString *statusType;
|
||||
NSAttributedString *loggedMessage;
|
||||
NSString *coalescingKey;
|
||||
}
|
||||
|
||||
+ (id)statusInChat:(AIChat *)inChat
|
||||
withSource:(id)inSource
|
||||
destination:(id)inDest
|
||||
date:(NSDate *)inDate
|
||||
message:(NSAttributedString *)inMessage
|
||||
withType:(NSString *)inType;
|
||||
|
||||
- (id)initWithChat:(AIChat *)inChat
|
||||
source:(id)inSource
|
||||
destination:(id)inDest
|
||||
date:(NSDate *)inDate
|
||||
message:(NSAttributedString *)inMessage
|
||||
withType:(NSString *)inStatus;
|
||||
|
||||
/*!
|
||||
* @brief A key on which multiple status messages should be consolidated if possible
|
||||
*
|
||||
* The message view can choose to collapse multiple consecutive status messages into a single
|
||||
* or combined display if those messages have the same coalescing key.
|
||||
*/
|
||||
@property (readwrite, nonatomic, copy) NSString *coalescingKey;
|
||||
@property (readonly, nonatomic) NSString *status;
|
||||
@property (readwrite, nonatomic) NSAttributedString *loggedMessage;
|
||||
|
||||
@end
|
|
@ -1,37 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIContentMessage.h>
|
||||
|
||||
#define CONTENT_TOPIC_TYPE @"Topic" //Type ID for this content
|
||||
|
||||
|
||||
#define CONTENT_TOPIC_MESSAGE_ACTUALLY_EMPTY [NSAttributedString stringWithString:@"This Topic Intentionally Left Blank"]
|
||||
|
||||
@interface AIContentTopic : AIContentMessage {
|
||||
BOOL actuallyBlank;
|
||||
}
|
||||
|
||||
+ (id)topicInChat:(AIChat *)inChat
|
||||
withSource:(id)inSource
|
||||
sourceNick:(NSString *)inSourceNick
|
||||
destination:(id)inDest
|
||||
date:(NSDate *)inDate
|
||||
message:(NSAttributedString *)inMessage;
|
||||
|
||||
@property (nonatomic) BOOL actuallyBlank;
|
||||
|
||||
@end
|
|
@ -1,34 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIContentObject.h>
|
||||
|
||||
#define CONTENT_TYPING_TYPE @"Typing" //Type ID for this content
|
||||
|
||||
typedef enum {
|
||||
AINotTyping = 0,
|
||||
AITyping,
|
||||
AIEnteredText
|
||||
} AITypingState;
|
||||
|
||||
@interface AIContentTyping : AIContentObject {
|
||||
AITypingState typingState;
|
||||
}
|
||||
|
||||
+ (id)typingContentInChat:(AIChat *)inChat withSource:(id)inSource destination:(id)inDest typingState:(AITypingState)inTypingState;
|
||||
@property (readonly, nonatomic) AITypingState typingState;
|
||||
|
||||
@end
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
@interface AIContextMenuTextView : NSTextView {
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
@protocol AIController <NSObject>
|
||||
- (void)controllerDidLoad;
|
||||
- (void)controllerWillClose;
|
||||
@end
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIControllerProtocol.h>
|
||||
|
||||
@protocol AIPlugin;
|
||||
|
||||
@interface AICorePluginLoader : NSObject <AIController> {
|
||||
NSMutableArray *pluginArray;
|
||||
}
|
||||
|
||||
+ (void)loadPluginAtPath:(NSString *)pluginName confirmLoading:(BOOL)confirmLoading pluginArray:(NSMutableArray *)pluginArray;
|
||||
- (id <AIPlugin>)pluginWithClassName:(NSString *)className;
|
||||
+ (void)moveXtra:(NSString *)pluginPath toDisabledFolder:(BOOL)disable;
|
||||
|
||||
@end
|
|
@ -1,23 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIControllerProtocol.h>
|
||||
|
||||
@protocol AIDebugController <AIController>
|
||||
- (void)addMessage:(NSString *)actualMessage;
|
||||
@property (nonatomic, readonly) NSArray *debugLogArray;
|
||||
- (void)clearDebugLogArray;
|
||||
@end
|
|
@ -1,58 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIControllerProtocol.h>
|
||||
|
||||
#define PREF_GROUP_APPEARANCE @"Appearance"
|
||||
|
||||
#define KEY_ACTIVE_DOCK_ICON @"Dock Icon"
|
||||
#define FOLDER_DOCK_ICONS @"Dock Icons"
|
||||
|
||||
#define KEY_ANIMATE_DOCK_ICON @"Animate Dock Icon on Unread Messages"
|
||||
#define KEY_BADGE_DOCK_ICON @"Badge Dock Icon on Unread Messages"
|
||||
|
||||
@class AIIconState;
|
||||
|
||||
typedef enum {
|
||||
AIDockBehaviorStopBouncing = 0,
|
||||
AIDockBehaviorBounceOnce,
|
||||
AIDockBehaviorBounceRepeatedly,
|
||||
AIDockBehaviorBounceDelay_FiveSeconds,
|
||||
AIDockBehaviorBounceDelay_TenSeconds,
|
||||
AIDockBehaviorBounceDelay_FifteenSeconds,
|
||||
AIDockBehaviorBounceDelay_ThirtySeconds,
|
||||
AIDockBehaviorBounceDelay_OneMinute
|
||||
} AIDockBehavior;
|
||||
|
||||
@protocol AIDockController <AIController>
|
||||
//Icon animation & states
|
||||
- (void)setIconStateNamed:(NSString *)inName;
|
||||
- (void)removeIconStateNamed:(NSString *)inName;
|
||||
- (void)setIconState:(AIIconState *)iconState named:(NSString *)inName;
|
||||
- (NSImage *)baseApplicationIconImage;
|
||||
- (void)setOverlay:(NSImage *)image;
|
||||
|
||||
//Special access to icon pack loading
|
||||
- (NSArray *)availableDockIconPacks;
|
||||
- (BOOL)currentIconSupportsIconStateNamed:(NSString *)inName;
|
||||
- (NSMutableDictionary *)iconPackAtPath:(NSString *)folderPath;
|
||||
- (void)getName:(NSString **)outName previewState:(AIIconState **)outIconState forIconPackAtPath:(NSString *)folderPath;
|
||||
- (AIIconState *)previewStateForIconPackAtPath:(NSString *)folderPath;
|
||||
|
||||
//Bouncing & behavior
|
||||
- (BOOL)performBehavior:(AIDockBehavior)behavior;
|
||||
- (NSString *)descriptionForBehavior:(AIDockBehavior)behavior;
|
||||
@end
|
|
@ -1,80 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIWindowController.h>
|
||||
#import <Adium/AIStatus.h>
|
||||
|
||||
@class AIAccount, AITextViewWithPlaceholder, AIService, AIAutoScrollView, AISendingTextView;
|
||||
|
||||
@interface AIEditStateWindowController : AIWindowController <NSTextViewDelegate> {
|
||||
IBOutlet NSBox *box_title;
|
||||
IBOutlet NSTextField *label_title;
|
||||
IBOutlet NSTextField *textField_title;
|
||||
|
||||
IBOutlet NSBox *box_separatorLine;
|
||||
|
||||
IBOutlet NSBox *box_state;
|
||||
IBOutlet NSTextField *label_state;
|
||||
IBOutlet NSPopUpButton *popUp_state;
|
||||
BOOL needToRebuildPopUpState;
|
||||
|
||||
IBOutlet NSTextField *label_statusMessage;
|
||||
IBOutlet NSBox *box_statusMessage;
|
||||
IBOutlet AISendingTextView *textView_statusMessage;
|
||||
IBOutlet AIAutoScrollView *scrollView_statusMessage;
|
||||
|
||||
IBOutlet NSButton *checkbox_autoReply;
|
||||
IBOutlet NSButton *checkbox_customAutoReply;
|
||||
IBOutlet AISendingTextView *textView_autoReply;
|
||||
IBOutlet AIAutoScrollView *scrollView_autoReply;
|
||||
|
||||
IBOutlet NSButton *checkbox_idle;
|
||||
IBOutlet NSBox *box_idle;
|
||||
IBOutlet NSTextField *textField_idleMinutes;
|
||||
IBOutlet NSStepper *stepper_idleMinutes;
|
||||
IBOutlet NSTextField *textField_idleHours;
|
||||
IBOutlet NSStepper *stepper_idleHours;
|
||||
|
||||
IBOutlet NSButton *checkBox_save;
|
||||
IBOutlet NSButton *checkBox_muteSounds;
|
||||
IBOutlet NSButton *checkBox_silenceGrowl;
|
||||
IBOutlet NSButton *checkBox_okay;
|
||||
IBOutlet NSButton *checkBox_cancel;
|
||||
|
||||
AIStatus *originalStatusState;
|
||||
AIStatus *workingStatusState;
|
||||
AIAccount *account;
|
||||
|
||||
id target;
|
||||
|
||||
BOOL showSaveCheckbox;
|
||||
}
|
||||
|
||||
+ (id)editCustomState:(AIStatus *)inStatusState forType:(AIStatusType)inStatusType andAccount:(AIAccount *)inAccount withSaveOption:(BOOL)allowSave onWindow:(id)parentWindow notifyingTarget:(id)inTarget;
|
||||
|
||||
- (IBAction)cancel:(id)sender;
|
||||
- (IBAction)okay:(id)sender;
|
||||
- (IBAction)statusControlChanged:(id)sender;
|
||||
- (void)updateControlVisibilityAndResizeWindow;
|
||||
|
||||
- (void)configureForState:(AIStatus *)state;
|
||||
- (AIStatus *)currentConfiguration;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSObject (AICustomStatusWindowTarget)
|
||||
- (void)customStatusState:(AIStatus *)originalState changedTo:(AIStatus *)newState forAccount:(AIAccount *)account;
|
||||
@end
|
|
@ -1,44 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
@class AIEmoticonPack;
|
||||
|
||||
@interface AIEmoticon : NSObject {
|
||||
NSString *path;
|
||||
NSString *name;
|
||||
NSArray *textEquivalents;
|
||||
AIEmoticonPack *pack;
|
||||
|
||||
BOOL enabled;
|
||||
BOOL imageLoaded;
|
||||
|
||||
NSAttributedString *_cachedAttributedString;
|
||||
}
|
||||
|
||||
+ (id)emoticonWithIconPath:(NSString *)inPath equivalents:(NSArray *)inTextEquivalents name:(NSString *)inName pack:(AIEmoticonPack *)inPack;
|
||||
- (NSArray *)textEquivalents;
|
||||
- (NSMutableAttributedString *)attributedStringWithTextEquivalent:(NSString *)textEquivalent attachImages:(BOOL)attach;
|
||||
- (BOOL)isAppropriateForServiceClass:(NSString *)inServiceClass;
|
||||
- (NSImage *)image;
|
||||
- (void)setPath:(NSString *)inPath;
|
||||
- (NSString *)path;
|
||||
- (NSString *)name;
|
||||
- (void)setEnabled:(BOOL)inEnabled;
|
||||
- (BOOL)isEnabled;
|
||||
- (void)flushEmoticonImageCache;
|
||||
|
||||
@end
|
|
@ -1,38 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIControllerProtocol.h>
|
||||
|
||||
#define PREF_GROUP_EMOTICONS @"Emoticons"
|
||||
#define KEY_EMOTICON_ACTIVE_PACKS @"Active Emoticon Packs"
|
||||
#define KEY_EMOTICON_DISABLED @"Disabled Emoticons"
|
||||
#define KEY_EMOTICON_PACK_ORDERING @"Emoticon Pack Ordering"
|
||||
#define KEY_EMOTICON_SERVICE_APPROPRIATE @"Service Appropriate Emoticons"
|
||||
#define KEY_EMOTICON_MENU_ENABLED @"Emoticon Menu Enabled"
|
||||
|
||||
@class AIEmoticonPack, AIEmoticon;
|
||||
|
||||
@protocol AIEmoticonController <AIController>
|
||||
- (NSArray *)availableEmoticonPacks;
|
||||
- (AIEmoticonPack *)emoticonPackWithName:(NSString *)inName;
|
||||
- (NSArray *)activeEmoticons;
|
||||
- (NSArray *)activeEmoticonPacks;
|
||||
- (void)moveEmoticonPacks:(NSArray *)inPacks toIndex:(NSUInteger)index;
|
||||
- (void)setEmoticonPack:(AIEmoticonPack *)inPack enabled:(BOOL)enabled;
|
||||
- (void)setEmoticon:(AIEmoticon *)inEmoticon inPack:(AIEmoticonPack *)inPack enabled:(BOOL)enabled;
|
||||
- (void)flushEmoticonImageCache;
|
||||
- (void)xtrasChanged:(NSNotification *)notification;
|
||||
@end
|
|
@ -1,38 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
@interface AIEmoticonPack : NSObject<NSCopying> {
|
||||
NSBundle *bundle;
|
||||
NSString *path;
|
||||
NSString *name;
|
||||
NSString *serviceClass;
|
||||
NSMutableArray *emoticonArray;
|
||||
NSArray *enabledEmoticonArray;
|
||||
BOOL enabled;
|
||||
}
|
||||
|
||||
+ (id)emoticonPackFromPath:(NSString *)inPath;
|
||||
- (void)setDisabledEmoticons:(NSArray *)inArray;
|
||||
- (NSArray *)emoticons;
|
||||
- (NSArray *)enabledEmoticons;
|
||||
- (NSImage *)menuPreviewImage;
|
||||
- (NSString *)name;
|
||||
- (NSString *)path;
|
||||
- (NSString *)serviceClass;
|
||||
- (void)flushEmoticonImageCache;
|
||||
- (void)setIsEnabled:(BOOL)inEnabled;
|
||||
- (BOOL)isEnabled;
|
||||
@end
|
|
@ -1,75 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIControllerProtocol.h>
|
||||
|
||||
#define FileTransfer_NewFileTransfer @"NewFileTransfer"
|
||||
|
||||
#define PREF_GROUP_FILE_TRANSFER @"FileTransfer"
|
||||
|
||||
#define KEY_FT_AUTO_ACCEPT @"FT AutoAccept"
|
||||
#define KEY_FT_AUTO_OPEN_SAFE @"FT AutoOpenSafe"
|
||||
#define KEY_FT_AUTO_CLEAR_COMPLETED @"FT AutoClearCompleted"
|
||||
#define KEY_FT_SHOW_PROGRESS_WINDOW @"FT ShowProgressWindow"
|
||||
|
||||
typedef enum {
|
||||
Unknown_FileTransfer = 0,
|
||||
Incoming_FileTransfer,
|
||||
Outgoing_FileTransfer,
|
||||
} AIFileTransferType;
|
||||
|
||||
typedef enum {
|
||||
Unknown_Status_FileTransfer = 0,
|
||||
Not_Started_FileTransfer, //File transfer has not yet started
|
||||
Checksumming_Filetransfer, //Calculating a checksum for a file that is to be sent
|
||||
Waiting_on_Remote_User_FileTransfer, //Is pending confirmation from the remote user
|
||||
Connecting_FileTransfer, //Is negotiating a connection
|
||||
Accepted_FileTransfer, //Could also be called Began_FileTransfer or Started_FileTransfer
|
||||
In_Progress_FileTransfer, //Currently transferring, not yet complete
|
||||
Complete_FileTransfer, //File is complete; transferring is finished.
|
||||
Cancelled_Local_FileTransfer, //The local user cancelled the transfer
|
||||
Cancelled_Remote_FileTransfer, //The remote user cancelled the transfer
|
||||
Failed_FileTransfer //The transfer failed.
|
||||
} AIFileTransferStatus;
|
||||
|
||||
typedef enum {
|
||||
AutoAccept_None = 0,
|
||||
AutoAccept_All,
|
||||
AutoAccept_FromContactList,
|
||||
} AIFileTransferAutoAcceptType;
|
||||
|
||||
@class ESFileTransfer, AIAccount, AIListContact;
|
||||
|
||||
@protocol AIFileTransferController <AIController>
|
||||
//Should be the only vendor of new ESFileTransfer* objects, as it creates, tracks, and returns them
|
||||
- (ESFileTransfer *)newFileTransferWithContact:(AIListContact *)inContact forAccount:(AIAccount *)inAccount type:(AIFileTransferType)type __attribute__((objc_method_family(none)));
|
||||
|
||||
- (NSArray *)fileTransferArray;
|
||||
|
||||
- (NSUInteger)activeTransferCount;
|
||||
|
||||
- (void)receiveRequestForFileTransfer:(ESFileTransfer *)fileTransfer;
|
||||
|
||||
- (void)fileTransfer:(ESFileTransfer *)fileTransfer didSetStatus:(AIFileTransferStatus)status;
|
||||
|
||||
- (void)sendFile:(NSString *)inFile toListContact:(AIListContact *)listContact;
|
||||
- (void)requestForSendingFileToListContact:(AIListContact *)listContact;
|
||||
|
||||
- (NSString *)stringForSize:(unsigned long long)inSize;
|
||||
- (NSString *)stringForSize:(unsigned long long)inSize of:(unsigned long long)totalSize ofString:(NSString *)totalSizeString;
|
||||
|
||||
- (void)_removeFileTransfer:(ESFileTransfer *)fileTransfer;
|
||||
@end
|
|
@ -1,64 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import "AIChat.h"
|
||||
|
||||
@interface AIGroupChat : AIChat <AIContainingObject> {
|
||||
NSString *topic;
|
||||
NSString *topicSetter;
|
||||
|
||||
NSMutableDictionary *participatingNicksFlags;
|
||||
NSMutableDictionary *participatingNicksContacts;
|
||||
NSMutableArray *participatingNicks;
|
||||
|
||||
BOOL showJoinLeave;
|
||||
BOOL expanded;
|
||||
|
||||
NSDate *lastMessageDate;
|
||||
}
|
||||
|
||||
@property (readwrite, nonatomic) BOOL showJoinLeave;
|
||||
|
||||
@property (readonly, nonatomic) BOOL supportsTopic;
|
||||
|
||||
- (void)updateTopic:(NSString *)inTopic withSource:(NSString *)contact;
|
||||
- (void)setTopic:(NSString *)inTopic;
|
||||
|
||||
@property (readwrite, copy, nonatomic) NSDate *lastMessageDate;
|
||||
|
||||
// Group chat participants.
|
||||
- (AIListContact *)contactForNick:(NSString *)nick;
|
||||
- (AIGroupChatFlags)flagsForNick:(NSString *)nick;
|
||||
- (void)setFlags:(AIGroupChatFlags)flags forNick:(NSString *)nick;
|
||||
- (void)setContact:(AIListContact *)contact forNick:(NSString *)nick;
|
||||
- (void)changeNick:(NSString *)from to:(NSString *)to;
|
||||
- (void)removeSavedValuesForNick:(NSString *)nick;
|
||||
- (NSArray *)nicksForContact:(AIListObject *)contact;
|
||||
|
||||
- (void)addParticipatingNick:(NSString *)inObject notify:(BOOL)notify;
|
||||
- (void)addParticipatingNicks:(NSArray *)inObjects notify:(BOOL)notify;
|
||||
- (void)removeAllParticipatingContactsSilently;
|
||||
- (void)removeObject:(NSString *)inObject;
|
||||
|
||||
- (BOOL)inviteListContact:(AIListContact *)inObject withMessage:(NSString *)inviteMessage;
|
||||
|
||||
- (void)resortParticipants;
|
||||
|
||||
- (NSString *)visibleObjectAtIndex:(NSUInteger)idx;
|
||||
|
||||
- (NSString *)displayNameForContact:(AIListObject *)contact __attribute__((deprecated));
|
||||
|
||||
@end
|
|
@ -1,45 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#define PREF_GROUP_APPEARANCE @"Appearance"
|
||||
#define KEY_GROUP_CHAT_STATUS_ICONS @"Group Chat Status Icons"
|
||||
#define EXTENSION_GROUP_CHAT_STATUS_ICONS @"AdiumGroupChatStatusIcons"
|
||||
#define RESOURCE_GROUP_CHAT_STATUS_ICONS @"Group Chat Status Icons"
|
||||
|
||||
#define KEY_COLORS_DICT @"Colors"
|
||||
#define KEY_ICONS_DICT @"Icons"
|
||||
|
||||
#define FOUNDER @"Founder"
|
||||
#define OP @"Op"
|
||||
#define HOP @"Half-op"
|
||||
#define VOICE @"Voice"
|
||||
#define NONE @"None"
|
||||
|
||||
#import <Adium/AIListObject.h>
|
||||
#import <Adium/AIXtraInfo.h>
|
||||
|
||||
@interface AIGroupChatStatusIcons : AIXtraInfo {
|
||||
NSMutableDictionary *icons;
|
||||
NSMutableDictionary *colors;
|
||||
NSDictionary *iconInfo;
|
||||
NSDictionary *colorInfo;
|
||||
}
|
||||
|
||||
+ (AIGroupChatStatusIcons *)sharedIcons;
|
||||
- (NSImage *)imageForFlag:(AIGroupChatFlags)flag;
|
||||
- (NSColor *)colorForFlag:(AIGroupChatFlags)flags;
|
||||
|
||||
@end
|
|
@ -1,169 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
@class AIXMLElement;
|
||||
|
||||
@interface AIHTMLDecoder : NSObject {
|
||||
NSString *XMLNamespace;
|
||||
NSString *baseURL;
|
||||
|
||||
struct AIHTMLDecoderOptionsBitField {
|
||||
unsigned reserved: 18;
|
||||
|
||||
unsigned generateStrictXHTML: 1;
|
||||
|
||||
unsigned allowJavascriptURLs: 1;
|
||||
|
||||
//these next ten members are derived from the arguments to
|
||||
// +encodeHTML:::::::::::: in the old AIHTMLDecoder.
|
||||
unsigned headers: 1;
|
||||
unsigned fontTags: 1;
|
||||
unsigned closingFontTags: 1;
|
||||
unsigned colorTags: 1;
|
||||
unsigned styleTags: 1;
|
||||
|
||||
unsigned nonASCII: 1;
|
||||
unsigned allSpaces: 1;
|
||||
unsigned attachmentTextEquivalents: 1;
|
||||
unsigned onlyIncludeOutgoingImages: 1;
|
||||
unsigned bodyBackground: 1;
|
||||
|
||||
unsigned simpleTagsOnly: 1;
|
||||
|
||||
unsigned allowAIMsubprofileLinks: 1;
|
||||
} thingsToInclude;
|
||||
|
||||
//For the horribly ghetto span and div tags used by the HTML logs
|
||||
BOOL send;
|
||||
BOOL receive;
|
||||
BOOL inDiv;
|
||||
}
|
||||
|
||||
#define AIElementClassAttributeName @"AIElementClass"
|
||||
|
||||
#pragma mark Creation
|
||||
|
||||
//+decoder, +new, and -init all return an instance with all flags set to 0.
|
||||
|
||||
+ (AIHTMLDecoder *)decoder;
|
||||
|
||||
//convenience methods to get a decoder that's already been set up a certain way.
|
||||
|
||||
- (id)initWithHeaders:(BOOL)includeHeaders
|
||||
fontTags:(BOOL)includeFontTags
|
||||
closeFontTags:(BOOL)closeFontTags
|
||||
colorTags:(BOOL)includeColorTags
|
||||
styleTags:(BOOL)includeStyleTags
|
||||
encodeNonASCII:(BOOL)encodeNonASCII
|
||||
encodeSpaces:(BOOL)encodeSpaces
|
||||
attachmentsAsText:(BOOL)attachmentsAsText
|
||||
onlyIncludeOutgoingImages:(BOOL)onlyIncludeOutgoingImages
|
||||
simpleTagsOnly:(BOOL)simpleOnly
|
||||
bodyBackground:(BOOL)bodyBackground
|
||||
allowJavascriptURLs:(BOOL)allowJS;
|
||||
|
||||
+ (AIHTMLDecoder *)decoderWithHeaders:(BOOL)includeHeaders
|
||||
fontTags:(BOOL)includeFontTags
|
||||
closeFontTags:(BOOL)closeFontTags
|
||||
colorTags:(BOOL)includeColorTags
|
||||
styleTags:(BOOL)includeStyleTags
|
||||
encodeNonASCII:(BOOL)encodeNonASCII
|
||||
encodeSpaces:(BOOL)encodeSpaces
|
||||
attachmentsAsText:(BOOL)attachmentsAsText
|
||||
onlyIncludeOutgoingImages:(BOOL)onlyIncludeOutgoingImages
|
||||
simpleTagsOnly:(BOOL)simpleOnly
|
||||
bodyBackground:(BOOL)bodyBackground
|
||||
allowJavascriptURLs:(BOOL)allowJS;
|
||||
|
||||
#pragma mark Work methods
|
||||
|
||||
//turn HTML source into an attributed string.
|
||||
//uses no options.
|
||||
- (NSAttributedString *)decodeHTML:(NSString *)inMessage;
|
||||
|
||||
//turn HTML source into an attributed string, passing the default attributes to use when tags don't explicitly set them
|
||||
- (NSAttributedString *)decodeHTML:(NSString *)inMessage withDefaultAttributes:(NSDictionary *)inDefaultAttributes;
|
||||
|
||||
//turn an attributed string into HTML source.
|
||||
//uses all options.
|
||||
- (NSString *)encodeHTML:(NSAttributedString *)inMessage imagesPath:(NSString *)imagesPath;
|
||||
|
||||
//Turn an attributed string into the root element of a strict XHTML (1.0) document.
|
||||
//Uses options: XMLNamespace, includeHeaders, attachmentsAsText.
|
||||
- (AIXMLElement *)rootStrictXHTMLElementForAttributedString:(NSAttributedString *)inMessage imagesPath:(NSString *)imagesSavePath;
|
||||
|
||||
//pass a string containing all the attributes of a tag (for example,
|
||||
// @"src=\"window.jp2\" alt=\"Window on the World\""). you will get back a
|
||||
// dictionary containing those attributes (for example, @{ @"src" =
|
||||
// @"window.jp2", @"alt" = @"Window on the World" }).
|
||||
//uses no options.
|
||||
- (NSDictionary *)parseArguments:(NSString *)arguments;
|
||||
|
||||
#pragma mark Properties
|
||||
|
||||
@property (readwrite, nonatomic, copy) NSString *XMLNamespace;
|
||||
@property (readwrite, nonatomic) BOOL generatesStrictXHTML;
|
||||
//meaning <HTML> and </HTML>.
|
||||
@property (readwrite, nonatomic) BOOL includesHeaders;
|
||||
@property (readwrite, nonatomic) BOOL includesFontTags;
|
||||
@property (readwrite, nonatomic) BOOL closesFontTags;
|
||||
@property (readwrite, nonatomic) BOOL includesColorTags;
|
||||
@property (readwrite, nonatomic) BOOL includesStyleTags;
|
||||
//turn non-printable characters into entities.
|
||||
@property (readwrite, nonatomic) BOOL encodesNonASCII;
|
||||
@property (readwrite, nonatomic) BOOL preservesAllSpaces;
|
||||
@property (readwrite, nonatomic) BOOL usesAttachmentTextEquivalents;
|
||||
@property (readwrite, nonatomic) BOOL onlyConvertImageAttachmentsToIMGTagsWhenSendingAMessage;
|
||||
@property (readwrite, nonatomic) BOOL onlyUsesSimpleTags;
|
||||
@property (readwrite, nonatomic) BOOL includesBodyBackground;
|
||||
@property (readwrite, nonatomic) BOOL allowAIMsubprofileLinks;
|
||||
@property (readwrite, nonatomic) BOOL allowJavascriptURLs;
|
||||
@property (readwrite, nonatomic, copy) NSString *baseURL;
|
||||
|
||||
@end
|
||||
|
||||
@interface AIHTMLDecoder (ClassMethodCompatibility)
|
||||
|
||||
/*these bring back the class methods that I (boredzo) turned into instance
|
||||
* methods for the sake of clarity.
|
||||
*when these methods are no longer used, this category should be deleted.
|
||||
*/
|
||||
|
||||
+ (AIHTMLDecoder *)classMethodInstance;
|
||||
|
||||
+ (NSString *)encodeHTML:(NSAttributedString *)inMessage encodeFullString:(BOOL)encodeFullString;
|
||||
+ (NSString *)encodeHTML:(NSAttributedString *)inMessage
|
||||
headers:(BOOL)includeHeaders
|
||||
fontTags:(BOOL)includeFontTags
|
||||
includingColorTags:(BOOL)includeColorTags
|
||||
closeFontTags:(BOOL)closeFontTags
|
||||
styleTags:(BOOL)includeStyleTags
|
||||
closeStyleTagsOnFontChange:(BOOL)closeStyleTagsOnFontChange
|
||||
encodeNonASCII:(BOOL)encodeNonASCII
|
||||
encodeSpaces:(BOOL)encodeSpaces
|
||||
imagesPath:(NSString *)imagesPath
|
||||
attachmentsAsText:(BOOL)attachmentsAsText
|
||||
onlyIncludeOutgoingImages:(BOOL)onlyIncludeOutgoingImages
|
||||
simpleTagsOnly:(BOOL)simpleOnly
|
||||
bodyBackground:(BOOL)bodyBackground
|
||||
allowJavascriptURLs:(BOOL)allowJS;
|
||||
|
||||
+ (NSAttributedString *)decodeHTML:(NSString *)inMessage;
|
||||
+ (NSAttributedString *)decodeHTML:(NSString *)inMessage withDefaultAttributes:(NSDictionary *)inDefaultAttributes;
|
||||
|
||||
+ (NSDictionary *)parseArguments:(NSString *)arguments;
|
||||
|
||||
@end
|
|
@ -1,53 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
@interface AIIconState : NSObject {
|
||||
BOOL animated;
|
||||
BOOL overlay;
|
||||
|
||||
//Static
|
||||
NSImage *image;
|
||||
|
||||
//Animated
|
||||
NSMutableArray *imageArray;
|
||||
CGFloat delay;
|
||||
BOOL looping;
|
||||
NSInteger currentFrame;
|
||||
NSInteger numberOfFrames;
|
||||
|
||||
//Animated w/ delayed rendering
|
||||
NSArray *iconRendering_states;
|
||||
AIIconState *iconRendering_baseState;
|
||||
AIIconState *iconRendering_animationState;
|
||||
}
|
||||
|
||||
- (id)initWithImages:(NSArray *)inImages delay:(CGFloat)inDelay looping:(BOOL)inLooping overlay:(BOOL)inOverlay;
|
||||
- (id)initWithImage:(NSImage *)inImage overlay:(BOOL)inOverlay;
|
||||
- (id)initByCompositingStates:(NSArray *)inIconStates;
|
||||
- (BOOL)animated;
|
||||
- (CGFloat)animationDelay;
|
||||
- (BOOL)looping;
|
||||
- (BOOL)overlay;
|
||||
- (NSArray *)imageArray;
|
||||
- (NSImage *)image;
|
||||
- (NSImage *)_compositeStates:(NSArray *)iconStateArray withBaseState:(AIIconState *)baseState animatingState:(AIIconState *)animatingState forFrame:(NSInteger)frame;
|
||||
- (NSInteger)currentFrame;
|
||||
- (void)nextFrame;
|
||||
- (NSInteger)numberOfFrames;
|
||||
|
||||
@end
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
@class AIImageTextCell;
|
||||
|
||||
@interface AIImageTextCellView : NSView {
|
||||
AIImageTextCell *cell;
|
||||
}
|
||||
|
||||
- (void)setStringValue:(NSString *)inString;
|
||||
- (void)setImage:(NSImage *)inImage;
|
||||
- (void)setSubString:(NSString *)inSubString;
|
||||
|
||||
@end
|
|
@ -1,641 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIControllerProtocol.h>
|
||||
|
||||
#define Interface_ContactSelectionChanged @"Interface_ContactSelectionChanged"
|
||||
|
||||
/*!
|
||||
* @brief AIContactInfoInspectorDidChangeInspectedObject notification name
|
||||
*
|
||||
* userinfo is an NSDictionary with keys KEY_PREVIOUS_INSPECTED_OBJECT and KEY_NEW_INSPECTED_OBJECT and objects of class AIListObject
|
||||
*/
|
||||
#define AIContactInfoInspectorDidChangeInspectedObject @"AIContactInfoInspectorWillChangeInspectedObject"
|
||||
#define KEY_PREVIOUS_INSPECTED_OBJECT @"PreviousInspectedObject"
|
||||
#define KEY_NEW_INSPECTED_OBJECT @"NewInspectedObject"
|
||||
|
||||
#define Interface_SendEnteredMessage @"Interface_SendEnteredMessage"
|
||||
#define Interface_WillSendEnteredMessage @"Interface_WillSendEnteredMessage"
|
||||
#define Interface_DidSendEnteredMessage @"Interface_DidSendEnteredMessage"
|
||||
#define Interface_ShouldDisplayErrorMessage @"Interface_ShouldDisplayErrorMessage"
|
||||
#define Interface_ShouldDisplayQuestion @"Interface_ShouldDisplayQuestion"
|
||||
#define Interface_ContactListDidBecomeMain @"Interface_ContactListDidBecomeMain"
|
||||
#define Interface_ContactListDidResignMain @"Interface_contactListDidResignMain"
|
||||
#define Interface_ContactListDidClose @"Interface_contactListDidClose"
|
||||
#define Interface_TabArrangingPreferenceChanged @"Interface_TabArrangingPreferenceChanged"
|
||||
#define AIViewDesiredSizeDidChangeNotification @"AIViewDesiredSizeDidChangeNotification"
|
||||
|
||||
#define PREF_GROUP_INTERFACE @"Interface"
|
||||
#define KEY_TABBED_CHATTING @"Tabbed Chatting"
|
||||
#define KEY_GROUP_CHATS_BY_GROUP @"Group Chats By Group"
|
||||
#define KEY_SAVE_CONTAINERS @"Save Containers On Quit"
|
||||
#define KEY_CONTAINERS @"Containers"
|
||||
|
||||
#define KEY_CL_WINDOW_LEVEL @"Window Level"
|
||||
#define KEY_CL_HIDE @"Hide While in Background"
|
||||
#define KEY_CL_EDGE_SLIDE @"Hide On Screen Edges"
|
||||
#define KEY_CL_FLASH_UNVIEWED_CONTENT @"Flash Unviewed Content"
|
||||
#define KEY_CL_ANIMATE_CHANGES @"Animate Changes"
|
||||
#define KEY_CL_SHOW_TOOLTIPS @"Show Tooltips"
|
||||
#define KEY_CL_SHOW_TOOLTIPS_IN_BACKGROUND @"Show Tooltips in Background"
|
||||
#define KEY_CL_WINDOW_HAS_SHADOW @"Window Has Shadow"
|
||||
|
||||
#define PREF_GROUP_CONFIRMATIONS @"Confirmations"
|
||||
#define KEY_CONFIRM_QUIT_FT @"Suppress Quit Confirmation for File Transfers"
|
||||
#define KEY_CONFIRM_QUIT_UNREAD @"Suppress Quit Confirmation for Unread Messages"
|
||||
#define KEY_CONFIRM_MSG_CLOSE @"Confirm Message Window Close"
|
||||
#define KEY_CONFIRM_LOGGED_OTR @"Confirm Logging When Using OTR"
|
||||
#define KEY_CONFIRM_SEND_CRASH @"Suppress Send Crash Reports"
|
||||
|
||||
typedef enum {
|
||||
AINormalWindowLevel = 0,
|
||||
AIFloatingWindowLevel = 1,
|
||||
AIDesktopWindowLevel = 2
|
||||
} AIWindowLevel;
|
||||
|
||||
//Identifiers for the various message views
|
||||
typedef enum {
|
||||
DCStandardMessageView = 1, //webkit is not available
|
||||
DCWebkitMessageView //Preferred message view
|
||||
} DCMessageViewType;
|
||||
|
||||
typedef enum {
|
||||
AITextAndButtonsDefaultReturn = 1,
|
||||
AITextAndButtonsAlternateReturn = 0,
|
||||
AITextAndButtonsOtherReturn = -1,
|
||||
AITextAndButtonsClosedWithoutResponse = -2
|
||||
} AITextAndButtonsReturnCode;
|
||||
|
||||
typedef enum {
|
||||
AITextAndButtonsWindowButtonDefault = 0,
|
||||
AITextAndButtonsWindowButtonAlternate,
|
||||
AITextAndButtonsWindowButtonOther
|
||||
} AITextAndButtonsWindowButton;
|
||||
|
||||
@protocol AIInterfaceComponent, AIContactListComponent, AIMessageDisplayController, AIMessageDisplayPlugin;
|
||||
@protocol AIContactListTooltipEntry, AIFlashObserver, AIPlugin;
|
||||
|
||||
@class AIListWindowController, AIMessageWindowController, AIMessageViewController;
|
||||
|
||||
@class AIChat, AIListObject, AIListGroup, AIContactList;
|
||||
|
||||
@protocol AIInterfaceController <AIController>
|
||||
- (void)registerInterfaceController:(id <AIInterfaceComponent>)inController;
|
||||
- (void)registerContactListController:(id <AIContactListComponent>)inController;
|
||||
|
||||
/*! @brief Implement handling of the reopen Apple Event.
|
||||
*
|
||||
* @par The reopen handler should respond by making sure that at least one of Adium's windows is visible.
|
||||
*
|
||||
* @par Adium.app's implementation handles this event this way:
|
||||
*
|
||||
* @li If there are no chat windows, shows the Contact List.
|
||||
* @li Else, if the foremost chat window and chat tab has unviewed content, make sure it stays foremost (bringing it forward of the Contact List, if necessary).
|
||||
* @li Else, if any chat window has unviewed content, bring foremost the chat window and chat tab with the most recent unviewed content.
|
||||
* @li Else, if all chat windows are minimized, unminimize one of them.
|
||||
* @li If the application is hidden, unhide it.
|
||||
*
|
||||
* @return A value suitable for returning from the \c NSApplication delegate method <code>applicationShouldHandleReopen:hasVisibleWindows:
|
||||
</code>. Specifically: \c YES if AppKit should perform its usual response to the event; \c NO if AppKit should do nothing.
|
||||
*/
|
||||
- (BOOL)handleReopenWithVisibleWindows:(BOOL)visibleWindows;
|
||||
|
||||
//Contact List
|
||||
/*! @name Contact List */
|
||||
/* @{ */
|
||||
/*!
|
||||
* @brief Brings contact list to the front
|
||||
*/
|
||||
- (IBAction)showContactList:(id)sender;
|
||||
/*!
|
||||
* @brief Close the contact list window
|
||||
*/
|
||||
- (IBAction)closeContactList:(id)sender;
|
||||
/*!
|
||||
* @brief Toggle the contact list
|
||||
*
|
||||
* Show the contact list if it's closed, bring it to the front if it's open but not in the front,
|
||||
* or close it if it's active.
|
||||
*/
|
||||
- (IBAction)toggleContactList:(id)sender;
|
||||
/*!
|
||||
* @returns YES if contact list is visible and selected, otherwise NO
|
||||
*/
|
||||
@property (nonatomic, readonly) BOOL contactListIsVisibleAndMain;
|
||||
/*!
|
||||
* @returns YES if contact list is visible, otherwise NO
|
||||
*/
|
||||
@property (nonatomic, readonly) BOOL contactListIsVisible;
|
||||
/*! @} */
|
||||
|
||||
#pragma mark Detachable Contact List
|
||||
/*!
|
||||
* @brief Create a new AIListWindowController to display a given contact list group in a detached window
|
||||
*
|
||||
* @result Created contact list controller for detached contact list
|
||||
*/
|
||||
- (AIListWindowController *)detachContactList:(AIContactList *)aContactList;
|
||||
|
||||
#pragma mark Messaging
|
||||
/*!
|
||||
* @brief Opens tab or window for a chat (following user's preferences)
|
||||
*
|
||||
* @param inChat The chat. If already open, the chat will be brought to the front.
|
||||
*/
|
||||
- (void)openChat:(AIChat *)inChat;
|
||||
|
||||
/*!
|
||||
* @brief Opens a chat in a given container at a specific index
|
||||
*
|
||||
* NOTE: If the chat is already open, this won't move it and instead does nothing. Perhaps it should, though :)
|
||||
*
|
||||
* @param inChat The chat.
|
||||
* @param containerID The name of the container window.
|
||||
* @param index The index within that containter window.
|
||||
*/
|
||||
- (id)openChat:(AIChat *)inChat inContainerWithID:(NSString *)containerID atIndex:(NSUInteger)index;
|
||||
|
||||
/*!
|
||||
* @brief Move a chat to a new window container
|
||||
*
|
||||
* NOTE: The chat must already be open. That's a bug.
|
||||
*/
|
||||
- (void)moveChatToNewContainer:(AIChat *)inChat;
|
||||
|
||||
/*!
|
||||
* @brief Close the interface for a chat
|
||||
*
|
||||
* @param inChat The chat
|
||||
*/
|
||||
- (void)closeChat:(AIChat *)inChat;
|
||||
|
||||
/*!
|
||||
* @brief Consolidate all open chats into a single container
|
||||
*/
|
||||
- (void)consolidateChats;
|
||||
|
||||
/*!
|
||||
* @brief Active Chat property
|
||||
*
|
||||
* Setter brings the tab/window for a chat to the front and sets it as active
|
||||
* If no chat is active (a non-chat window is focused, or Adium is not focused), getter returns nil.
|
||||
*/
|
||||
@property (nonatomic, retain) AIChat *activeChat;
|
||||
|
||||
/*!
|
||||
* @brief Get the chat which was most recently active
|
||||
*
|
||||
* If -[self activeChat] is non-nil, this will be the same as activeChat. However, if no chat is active, so long
|
||||
* as any chat is open, this will return the chat most recently active. If no chats are open, this will return nil.
|
||||
*/
|
||||
@property (nonatomic, readonly) AIChat *mostRecentActiveChat;
|
||||
|
||||
/*!
|
||||
* @brief Get all open chats
|
||||
*
|
||||
* @result The open chats. Returns an empty array if no chats are open.
|
||||
*/
|
||||
@property (nonatomic, readonly) NSArray *openChats;
|
||||
|
||||
/*!
|
||||
* @brief Get all open chats in a given container.
|
||||
*
|
||||
* @result The array of open chats. Returns nil if no container with containerID exists.
|
||||
*/
|
||||
- (NSArray *)openChatsInContainerWithID:(NSString *)containerID;
|
||||
|
||||
/*!
|
||||
* @brief The container ID for a chat
|
||||
*
|
||||
* @param chat The chat to look up
|
||||
* @returns The container ID for the container the chat is in.
|
||||
*/
|
||||
- (NSString *)containerIDForChat:(AIChat *)chat;
|
||||
|
||||
/*!
|
||||
* @brief Get an array of the containerIDs of all open containers
|
||||
*/
|
||||
@property (nonatomic, readonly) NSArray *openContainerIDs;
|
||||
|
||||
/*!
|
||||
* @brief Open a new container with a given ID and name
|
||||
*
|
||||
* @param containerID The container's ID. Pass nil to let Adium generate one
|
||||
* @param containerName THe name of the container. Pass nil to not specify one.
|
||||
*
|
||||
* @result The newly created AIMessageWindowController
|
||||
*/
|
||||
- (AIMessageWindowController *)openContainerWithID:(NSString *)containerID name:(NSString *)containerName;
|
||||
|
||||
/*!
|
||||
* @brief Cycles to the next open chat, making it active
|
||||
*
|
||||
* This does not cross container boundaries. If there is no currently active chat, this has no effect.
|
||||
*/
|
||||
- (void)nextChat:(id)sender;
|
||||
|
||||
/*!
|
||||
* @brief Cycles to the previous open chat, making it active
|
||||
*
|
||||
* This does not cross container boundaries. If there is no currently active chat, this has no effect.
|
||||
*/
|
||||
- (void)previousChat:(id)sender;
|
||||
|
||||
#pragma mark Interface plugin callbacks
|
||||
/*!
|
||||
* @brief A chat window did open: rebuild our window menu to show the new chat
|
||||
*
|
||||
* This should be called by the interface plugin (e.g. AIDualWindowInterfacePlugin) after a chat opens
|
||||
*
|
||||
* @param inChat Newly created chat
|
||||
*/
|
||||
- (void)chatDidOpen:(AIChat *)inChat;
|
||||
|
||||
/*!
|
||||
* @brief A chat has become active: update our chat closing keys and flag this chat as selected in the window menu
|
||||
*
|
||||
* This should be called by the interface plugin (e.g. AIDualWindowInterfacePlugin)
|
||||
*
|
||||
* @param inChat Chat which has become active
|
||||
*/
|
||||
- (void)chatDidBecomeActive:(AIChat *)inChat;
|
||||
|
||||
/*!
|
||||
* @brief A chat has become visible: send out a notification for components and plugins to take action
|
||||
*
|
||||
* This should be called by the interface plugin (e.g. AIDualWindowInterfacePlugin)
|
||||
*
|
||||
* @param inChat Chat that has become active
|
||||
* @param inWindow Containing chat window
|
||||
*/
|
||||
- (void)chatDidBecomeVisible:(AIChat *)inChat inWindow:(NSWindow *)inWindow;
|
||||
|
||||
/*!
|
||||
* @brief A chat window did close: rebuild our window menu to remove the chat
|
||||
*
|
||||
* This should be called by the interface plugin (e.g. AIDualWindowInterfacePlugin)
|
||||
*
|
||||
* @param inChat Chat that closed
|
||||
*/
|
||||
- (void)chatDidClose:(AIChat *)inChat;
|
||||
|
||||
/*!
|
||||
* @brief The order of chats has changed: rebuild our window menu to reflect the new order
|
||||
*
|
||||
* This should be called by the interface plugin (e.g. AIDualWindowInterfacePlugin)
|
||||
*/
|
||||
- (void)chatOrderDidChange;
|
||||
|
||||
#pragma mark Chat window access
|
||||
/*!
|
||||
* @brief Find the window currently displaying a chat
|
||||
*
|
||||
* @returns Window for chat otherwise if the chat is not in any window, or is not visible in any window, returns nil
|
||||
*/
|
||||
- (NSWindow *)windowForChat:(AIChat *)inChat;
|
||||
|
||||
|
||||
/*!
|
||||
* @brief Find the chat active in a window
|
||||
*
|
||||
* If the window does not have an active chat, nil is returned
|
||||
*/
|
||||
- (AIChat *)activeChatInWindow:(NSWindow *)window;
|
||||
|
||||
#pragma mark Interface selection
|
||||
/*!
|
||||
* @brief Get the list object currently focused in the interface
|
||||
*
|
||||
* We find the first responder that knows about list objects and get its selected object.
|
||||
* This may be, for example, the contact list or a chat window.
|
||||
*/
|
||||
@property (readonly, nonatomic) AIListObject *selectedListObject;
|
||||
|
||||
/*!
|
||||
* @brief Get the list object currently selected in the contact list
|
||||
*
|
||||
* If multiple objects are selected, this returns the first one. If possible, use arrayOfSelectedListObjectsInContactList and
|
||||
* handle multiple selections.
|
||||
*/
|
||||
@property (readonly, nonatomic) AIListObject *selectedListObjectInContactList;
|
||||
|
||||
/*!
|
||||
* @brief Get the list objects currently selected in the contact list
|
||||
*
|
||||
* @result An NSArray of selected objects
|
||||
*/
|
||||
@property (readonly, nonatomic) NSArray *arrayOfSelectedListObjectsInContactList;
|
||||
|
||||
/*!
|
||||
* @brief Get the list objects currently selected in the contact list with their groups
|
||||
*
|
||||
* Each entry in the NSArray is an NSDictionary of the following layout:
|
||||
*
|
||||
* @"ListObject" => the AIListObject
|
||||
* @"ContainingObject" => the containing object
|
||||
*
|
||||
* @result An NSArray of selected objects
|
||||
*/
|
||||
@property (readonly, nonatomic) NSArray *arrayOfSelectedListObjectsWithGroupsInContactList;
|
||||
|
||||
#pragma mark Message View
|
||||
/*!
|
||||
* @brief Register an object which can handle displaying messages
|
||||
*
|
||||
* See @protocol AIMessageDisplayPlugin for details. An example of such an object is the WebKit Message View plugin.
|
||||
*
|
||||
* @param inPlugin The object, which must conform to @protocol(AIMessageDisplayPlugin)
|
||||
*/
|
||||
- (void)registerMessageDisplayPlugin:(id <AIMessageDisplayPlugin>)inPlugin;
|
||||
|
||||
/*!
|
||||
* @brief Unregister an object previously registered with registerMessageDisplayPlugin.
|
||||
*/
|
||||
- (void)unregisterMessageDisplayPlugin:(id <AIMessageDisplayPlugin>)inPlugin;
|
||||
|
||||
/*!
|
||||
* @brief Get the AIMessageDisplayController-conforming object for a chat
|
||||
*
|
||||
* Every chat has exactly one. You can get it!
|
||||
*/
|
||||
- (id <AIMessageDisplayController>)messageDisplayControllerForChat:(AIChat *)inChat;
|
||||
|
||||
#pragma mark Error Display
|
||||
- (void)handleErrorMessage:(NSString *)inTitle withDescription:(NSString *)inDesc;
|
||||
- (void)handleMessage:(NSString *)inTitle withDescription:(NSString *)inDesc withWindowTitle:(NSString *)inWindowTitle;
|
||||
|
||||
#pragma mark Question Display
|
||||
- (void)displayQuestion:(NSString *)inTitle withAttributedDescription:(NSAttributedString *)inDesc withWindowTitle:(NSString *)inWindowTitle
|
||||
defaultButton:(NSString *)inDefaultButton alternateButton:(NSString *)inAlternateButton otherButton:(NSString *)inOtherButton suppression:(NSString *)inSuppression
|
||||
responseHandler:(void (^)(AITextAndButtonsReturnCode ret, BOOL suppressed, id userInfo))handler;
|
||||
- (void)displayQuestion:(NSString *)inTitle withDescription:(NSString *)inDesc withWindowTitle:(NSString *)inWindowTitle
|
||||
defaultButton:(NSString *)inDefaultButton alternateButton:(NSString *)inAlternateButton otherButton:(NSString *)inOtherButton suppression:(NSString *)inSuppression
|
||||
responseHandler:(void (^)(AITextAndButtonsReturnCode ret, BOOL suppressed, id userInfo))handler;
|
||||
|
||||
- (void)displayQuestion:(NSString *)inTitle withAttributedDescription:(NSAttributedString *)inDesc withWindowTitle:(NSString *)inWindowTitle
|
||||
defaultButton:(NSString *)inDefaultButton alternateButton:(NSString *)inAlternateButton otherButton:(NSString *)inOtherButton suppression:(NSString *)inSuppression
|
||||
makeKey:(BOOL)key responseHandler:(void (^)(AITextAndButtonsReturnCode ret, BOOL suppressed, id userInfo))handler;
|
||||
- (void)displayQuestion:(NSString *)inTitle withDescription:(NSString *)inDesc withWindowTitle:(NSString *)inWindowTitle
|
||||
defaultButton:(NSString *)inDefaultButton alternateButton:(NSString *)inAlternateButton otherButton:(NSString *)inOtherButton suppression:(NSString *)inSuppression
|
||||
makeKey:(BOOL)key responseHandler:(void (^)(AITextAndButtonsReturnCode ret, BOOL suppressed, id userInfo))handler;
|
||||
|
||||
#pragma mark Synchronized Flashing
|
||||
- (void)registerFlashObserver:(id <AIFlashObserver>)inObserver;
|
||||
- (void)unregisterFlashObserver:(id <AIFlashObserver>)inObserver;
|
||||
- (int)flashState;
|
||||
|
||||
#pragma mark Tooltips
|
||||
/*!
|
||||
* @brief Register a tooltip-supplying object
|
||||
*
|
||||
* @param inEntry The object which will be queried for information when building a tooltip. Must conform to the AIContactListTooltipEntry protocol.
|
||||
* @param isSecondary Most tooltips are secondary; this means they are displayed in the bottom half of the tooltip which can expand as needed.
|
||||
*/
|
||||
- (void)registerContactListTooltipEntry:(id <AIContactListTooltipEntry>)inEntry secondaryEntry:(BOOL)isSecondary;
|
||||
|
||||
/*!
|
||||
* @brief Unregister a previously reigstered tooltip-supplying object
|
||||
*
|
||||
* @param inEntry The object to unregister
|
||||
* @param isSecondary This should match the value passed to registerContactListTooltipEntry:secondaryEntry:
|
||||
*/
|
||||
- (void)unregisterContactListTooltipEntry:(id <AIContactListTooltipEntry>)inEntry secondaryEntry:(BOOL)isSecondary;
|
||||
|
||||
/*!
|
||||
* @brief Get an array of all primary contact list tooltip entries
|
||||
*
|
||||
* @result An NSArray of objects conforming to AIContactListTooltipEntry
|
||||
*/
|
||||
- (NSArray *)contactListTooltipPrimaryEntries;
|
||||
|
||||
/*!
|
||||
* @brief Get an array of all secondary contact list tooltip entries
|
||||
*
|
||||
* @result An NSArray of objects conforming to AIContactListTooltipEntry
|
||||
*/
|
||||
- (NSArray *)contactListTooltipSecondaryEntries;
|
||||
|
||||
/*!
|
||||
* @brief Show an object's tooltip at a given point
|
||||
*
|
||||
* If object is not nil, the tooltip box will be shown for that object at the given point. It is created if needed;
|
||||
* if there is an existing object tooltip, that window is moved to the given point and reconfigured for object.
|
||||
* This is a rich-text, information-rich tooltip, not a simple text tooltip as seen elsewhere in Mac OS X.
|
||||
*
|
||||
* @param object The object for which the tooltip should be shown. Pass nil to hide any existing tooltip.
|
||||
* @param point The point in screen coordinates for the tooltip's origin. If object is nil, this value is ignored.
|
||||
* @param inWindow The window from which the tooltip is originating. If object is nil, this value is ignored.
|
||||
*/
|
||||
- (void)showTooltipForListObject:(AIListObject *)object atScreenPoint:(NSPoint)point onWindow:(NSWindow *)inWindow;
|
||||
|
||||
#pragma mark Window level menu
|
||||
/*!
|
||||
* @brief Build a menu of possible window levels
|
||||
*
|
||||
* Window levels may be, for example, 'Above other windows' or 'Normally'.
|
||||
*
|
||||
* @param target The target on which @selector(selectedWindowLevel:) will be called when a menu item is selected
|
||||
*/
|
||||
- (NSMenu *)menuForWindowLevelsNotifyingTarget:(id)target;
|
||||
|
||||
@end
|
||||
|
||||
//Controls a contact list view
|
||||
@protocol AIContactListViewController <NSObject>
|
||||
- (NSView *)contactListView;
|
||||
@end
|
||||
|
||||
//Manages contact list view controllers
|
||||
@protocol AIContactListController <NSObject>
|
||||
- (id <AIContactListViewController>)contactListViewController;
|
||||
@end
|
||||
|
||||
/*!
|
||||
* @protocol AIMessageDisplayController
|
||||
* @brief The message display controller is responsible for, unsurprisingly, the actual display of messages.
|
||||
*
|
||||
* The display controller manages a view ("messageView") which will be inserted along with other UI elements such
|
||||
* as a text entry area into a window. The Interface Plugin knows nothing about how the AIMessageDisplayController
|
||||
* keeps its messageView up to date, nor should it, but knows that the view will show messages.
|
||||
*
|
||||
* The AIMessageDisplayController is informed when the message view which is using it is closing.
|
||||
*
|
||||
* This is, for example, the AIWebKitMessageViewController.
|
||||
*/
|
||||
@protocol AIMessageDisplayController <NSObject>
|
||||
- (void)setChatContentSource:(NSString *)source;
|
||||
- (NSString *)chatContentSource;
|
||||
- (NSString *)contentSourceName; // Unique name for this particular style of "content source".
|
||||
|
||||
- (NSView *)messageView;
|
||||
- (NSView *)messageScrollView;
|
||||
- (void)messageViewIsClosing;
|
||||
- (void)clearView;
|
||||
|
||||
- (void)jumpToPreviousMark;
|
||||
- (BOOL)previousMarkExists;
|
||||
|
||||
- (void)jumpToNextMark;
|
||||
- (BOOL)nextMarkExists;
|
||||
|
||||
- (void)jumpToFocusMark;
|
||||
- (BOOL)focusMarkExists;
|
||||
|
||||
- (void)addMark;
|
||||
- (void)markForFocusChange;
|
||||
@end
|
||||
|
||||
/*
|
||||
* @protocol AIMessageDisplayPlugin
|
||||
* @brief A AIMessageDisplayPlugin provides AIMessageDisplayController objects on demand.
|
||||
*
|
||||
* The WebKit display plugin is one example.
|
||||
*/
|
||||
@protocol AIMessageDisplayPlugin <NSObject, AIPlugin>
|
||||
- (id <AIMessageDisplayController>)messageDisplayControllerForChat:(AIChat *)inChat;
|
||||
@end
|
||||
|
||||
@protocol AIContactListTooltipEntry <NSObject>
|
||||
- (NSString *)labelForObject:(AIListObject *)inObject;
|
||||
- (NSAttributedString *)entryForObject:(AIListObject *)inObject;
|
||||
- (BOOL)shouldDisplayInContactInspector;
|
||||
@end
|
||||
|
||||
@protocol AIFlashObserver <NSObject>
|
||||
- (void)flash:(int)value;
|
||||
@end
|
||||
|
||||
//Handles any attributed text entry
|
||||
@protocol AITextEntryView
|
||||
- (void)setAttributedString:(NSAttributedString *)inAttributedString;
|
||||
- (void)setTypingAttributes:(NSDictionary *)attrs;
|
||||
- (BOOL)availableForSending;
|
||||
- (AIChat *)chat;
|
||||
@end
|
||||
|
||||
@protocol AIInterfaceComponent <NSObject>
|
||||
- (void)openInterface;
|
||||
- (void)closeInterface;
|
||||
- (id)openChat:(AIChat *)chat inContainerWithID:(NSString *)containerID withName:(NSString *)containerName atIndex:(NSUInteger)index;
|
||||
- (void)setActiveChat:(AIChat *)inChat;
|
||||
- (void)moveChat:(AIChat *)chat toContainerWithID:(NSString *)containerID index:(NSUInteger)index;
|
||||
- (void)moveChatToNewContainer:(AIChat *)inChat;
|
||||
- (void)closeChat:(AIChat *)chat;
|
||||
- (AIMessageWindowController *)openContainerWithID:(NSString *)containerID name:(NSString *)containerName;
|
||||
/*!
|
||||
* @brief Return an array of NSDictionary objects for all open containers with associated information
|
||||
*
|
||||
* The returned array has zero or more NSDictionary objects with the following information for each container
|
||||
* Key Value
|
||||
* @"ID" NSString of the containerID
|
||||
* @"Frame" NSString of the window's [NSWindow frame]
|
||||
* @"Content" NSArray of the AIChat objects within that container
|
||||
* @"ActiveChat" AIChat that is currently active
|
||||
* @"Name" NSString of the container's name
|
||||
*/
|
||||
@property (readonly, nonatomic) NSArray *openContainersAndChats;
|
||||
@property (readonly, nonatomic) NSArray *openContainerIDs;
|
||||
@property (readonly, nonatomic) NSArray *openChats;
|
||||
- (NSArray *)openChatsInContainerWithID:(NSString *)containerID;
|
||||
- (NSString *)containerIDForChat:(AIChat *)chat;
|
||||
- (NSWindow *)windowForChat:(AIChat *)chat;
|
||||
- (AIChat *)activeChatInWindow:(NSWindow *)window;
|
||||
@end
|
||||
|
||||
/*!
|
||||
* @protocol AIInterfaceContainer
|
||||
* @brief This protocol is for a general interface element such as the contact list or the container of a chat
|
||||
*/
|
||||
@protocol AIInterfaceContainer <NSObject>
|
||||
- (void)makeActive:(id)sender; //Make the container active/front
|
||||
- (void)close:(id)sender; //Close the container
|
||||
@end
|
||||
|
||||
/*!
|
||||
* @protocol AIChatViewController
|
||||
* @brief A AIChatViewController manages everything pertaining to a chat's view area
|
||||
*
|
||||
* It will manage this view, text input, and any associated controls.
|
||||
*/
|
||||
@protocol AIChatViewController <NSObject>
|
||||
- (NSView *)view;
|
||||
- (NSScrollView *)messagesScrollView;
|
||||
- (AIChat *)chat;
|
||||
|
||||
/*!
|
||||
* @brief Show/hide the user list for a group chat.
|
||||
* Does nothing if not in a group chat.
|
||||
*/
|
||||
- (void)toggleUserList;
|
||||
|
||||
/*!
|
||||
* @brief Is the user list visible for a group chat?
|
||||
*/
|
||||
- (BOOL)userListVisible;
|
||||
|
||||
/*!
|
||||
* @brief Swap the side the user list is on for a group chat.
|
||||
* Does nothing if not in a group chat.
|
||||
*/
|
||||
- (void)toggleUserListSide;
|
||||
@end
|
||||
|
||||
/*!
|
||||
* @protocol AIChatContainer
|
||||
* @brief This protocol is for an object which displays a single chat (e.g. a tab in a chat window)
|
||||
*/
|
||||
@protocol AIChatContainer <AIInterfaceContainer>
|
||||
/*
|
||||
* @brief Get the window controller which holds this AIChatContainer
|
||||
*/
|
||||
@property (readonly, nonatomic, retain) AIMessageWindowController *windowController;
|
||||
|
||||
/*
|
||||
* @brief Get the view controller for this AIChatContainer
|
||||
*/
|
||||
@property (readonly, nonatomic) id <AIChatViewController> chatViewController;
|
||||
|
||||
/*!
|
||||
* @brief Get the message view controller for this AIChatContainer
|
||||
*/
|
||||
@property (readonly, nonatomic) AIMessageViewController *messageViewController;
|
||||
@end
|
||||
|
||||
@protocol AIContactListComponent <NSObject>
|
||||
/*!
|
||||
* @brief Show the contact list window and bring Adium to the front
|
||||
*/
|
||||
- (void)showContactListAndBringToFront:(BOOL)bringToFront;
|
||||
- (BOOL)contactListIsVisibleAndMain;
|
||||
- (BOOL)contactListIsVisible;
|
||||
- (void)closeContactList;
|
||||
@end
|
||||
|
||||
@protocol AIMultiContactListComponent <AIContactListComponent>
|
||||
- (id)detachContactList:(AIContactList *)contactList;
|
||||
- (void)nextDetachedContactList;
|
||||
- (void)previousDetachedContactList;
|
||||
@end
|
||||
|
||||
//Custom printing informal protocol
|
||||
@interface NSObject (AdiumPrinting)
|
||||
- (void)adiumPrint:(id)sender;
|
||||
- (BOOL)validatePrintMenuItem:(NSMenuItem *)menuItem;
|
||||
@end
|
||||
|
||||
@interface NSWindowController (AdiumBorderlessWindowClosing)
|
||||
- (BOOL)windowPermitsClose;
|
||||
@end
|
|
@ -1,43 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import "AIListContact.h"
|
||||
|
||||
#import <Adium/AIChatControllerProtocol.h>
|
||||
|
||||
#define KEY_AUTO_JOIN @"Automatically Join"
|
||||
#define KEY_UNREAD_STATUS @"Unread Status"
|
||||
|
||||
#define GROUP_LIST_BOOKMARK @"List Bookmark Settings"
|
||||
|
||||
@class AIChat;
|
||||
|
||||
@interface AIListBookmark : AIListContact <AIChatObserver, NSCoding> {
|
||||
NSDictionary *chatCreationDictionary;
|
||||
|
||||
NSString *password;
|
||||
NSString *name;
|
||||
}
|
||||
|
||||
- (id)initWithChat:(AIChat *)inChat;
|
||||
|
||||
@property (nonatomic) NSString *password;
|
||||
@property (readonly, nonatomic) NSString *name;
|
||||
@property (readonly, nonatomic) NSDictionary *chatCreationDictionary;
|
||||
|
||||
- (AIChat *)openChat;
|
||||
|
||||
@end
|
|
@ -1,98 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import "AIProxyListObject.h"
|
||||
|
||||
@class AIListObject, AIListOutlineView, AIAdium;
|
||||
|
||||
#define DROP_HIGHLIGHT_WIDTH_MARGIN 5.0f
|
||||
#define DROP_HIGHLIGHT_HEIGHT_MARGIN 1.0f
|
||||
|
||||
@interface AIListCell : NSCell {
|
||||
AIListOutlineView *__weak controlView;
|
||||
AIProxyListObject *proxyObject;
|
||||
BOOL isGroup;
|
||||
|
||||
NSTextAlignment textAlignment;
|
||||
CGFloat labelFontHeight;
|
||||
|
||||
CGFloat topSpacing;
|
||||
CGFloat bottomSpacing;
|
||||
CGFloat topPadding;
|
||||
CGFloat bottomPadding;
|
||||
|
||||
CGFloat leftPadding;
|
||||
CGFloat rightPadding;
|
||||
CGFloat leftSpacing;
|
||||
CGFloat rightSpacing;
|
||||
|
||||
CGFloat indentation;
|
||||
|
||||
NSColor *textColor;
|
||||
NSColor *invertedTextColor;
|
||||
|
||||
NSFont *font;
|
||||
|
||||
BOOL useAliasesAsRequested;
|
||||
NSMutableDictionary *labelAttributes;
|
||||
}
|
||||
|
||||
- (void)setProxyListObject:(AIProxyListObject *)inObject;
|
||||
@property (readonly, nonatomic) BOOL isGroup;
|
||||
@property (readwrite, weak, nonatomic) AIListOutlineView *controlView;
|
||||
|
||||
//Display options
|
||||
@property (readwrite, nonatomic) NSFont *font;
|
||||
@property (readwrite, nonatomic) NSTextAlignment textAlignment;
|
||||
@property (readwrite, nonatomic) NSColor *textColor;
|
||||
@property (readwrite, nonatomic) NSColor *invertedTextColor;
|
||||
|
||||
//Cell sizing and padding
|
||||
- (void) setSplitVerticalSpacing:(int) inSpacing;
|
||||
- (void) setSplitVerticalPadding:(int) inPadding;
|
||||
@property (readonly, nonatomic) NSSize cellSize;
|
||||
@property (readonly, nonatomic) CGFloat cellWidth;
|
||||
@property (readwrite, nonatomic) CGFloat rightSpacing;
|
||||
@property (readwrite, nonatomic) CGFloat leftSpacing;
|
||||
@property (readwrite, nonatomic) CGFloat topSpacing;
|
||||
@property (readwrite, nonatomic) CGFloat bottomSpacing;
|
||||
@property (readwrite, nonatomic) CGFloat rightPadding;
|
||||
@property (readwrite, nonatomic) CGFloat leftPadding;
|
||||
@property (readwrite, nonatomic) CGFloat topPadding;
|
||||
@property (readwrite, nonatomic) CGFloat bottomPadding;
|
||||
@property (readwrite, nonatomic) CGFloat indentation;
|
||||
|
||||
//Drawing
|
||||
- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView;
|
||||
- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView;
|
||||
- (void)_drawHighlightWithFrame:(NSRect)cellFrame inView:(NSView *)controlView;
|
||||
- (void)drawSelectionWithFrame:(NSRect)rect;
|
||||
- (void)drawBackgroundWithFrame:(NSRect)rect;
|
||||
- (void)drawContentWithFrame:(NSRect)rect;
|
||||
- (void)drawDropHighlightWithFrame:(NSRect)rect;
|
||||
@property (weak, readonly, nonatomic) NSAttributedString *displayName;
|
||||
@property (readonly, nonatomic) NSSize displayNameSize;
|
||||
- (NSRect)drawDisplayNameWithFrame:(NSRect)inRect;
|
||||
@property (weak, readonly, nonatomic) NSString *labelString;
|
||||
@property (weak, readonly, nonatomic) NSMutableDictionary *labelAttributes;
|
||||
@property (weak, readonly, nonatomic) NSDictionary *additionalLabelAttributes;
|
||||
@property (readonly, nonatomic) BOOL cellIsSelected;
|
||||
@property (readonly, nonatomic) BOOL drawGridBehindCell;
|
||||
@property (weak, readonly, nonatomic) NSColor *backgroundColor;
|
||||
|
||||
@property (readwrite, nonatomic) BOOL shouldShowAlias;
|
||||
|
||||
@end
|
|
@ -1,98 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIListObject.h>
|
||||
#import <Adium/AIAccount.h>
|
||||
#import <Adium/AIChat.h>
|
||||
|
||||
#define KEY_AB_UNIQUE_ID @"ABUniqueID"
|
||||
|
||||
@class ABPerson, AIListGroup, AIMetaContact;
|
||||
|
||||
@interface AIListContact : AIListObject {
|
||||
AIAccount *account;
|
||||
AIMetaContact *metaContact;
|
||||
NSMutableSet *m_remoteGroupNames;
|
||||
NSString *internalUniqueObjectID;
|
||||
|
||||
// Former properties
|
||||
NSColor *textColor;
|
||||
NSInteger idle;
|
||||
|
||||
NSString *formattedUID;
|
||||
}
|
||||
|
||||
- (id)initWithUID:(NSString *)inUID account:(AIAccount *)inAccount service:(AIService *)inService;
|
||||
- (id)initWithUID:(NSString *)inUID service:(AIService *)inService;
|
||||
@property (unsafe_unretained, readonly, nonatomic) id<AIContainingObject>containingObject __attribute__((deprecated));
|
||||
@property (readwrite, copy, nonatomic) NSSet *remoteGroupNames;
|
||||
@property (readonly, nonatomic) NSUInteger countOfRemoteGroupNames;
|
||||
@property (weak, readonly, nonatomic) NSSet *remoteGroups;
|
||||
- (void) addRemoteGroupName:(NSString *)name;
|
||||
- (void) removeRemoteGroupName:(NSString *)name;
|
||||
|
||||
- (void)setUID:(NSString *)inUID;
|
||||
@property (readonly, nonatomic) AIAccount *account;
|
||||
- (NSString *)internalUniqueObjectID;
|
||||
+ (NSString *)internalUniqueObjectIDForService:(AIService *)inService account:(AIAccount *)inAccount UID:(NSString *)inUID;
|
||||
- (void)restoreGrouping;
|
||||
|
||||
@property (weak, readonly, nonatomic) AIListContact *parentContact; //This needs renaming. It's the 'topmost' contact, either self or meta
|
||||
@property (readonly, nonatomic, weak) AIMetaContact *metaContact;
|
||||
|
||||
@property (weak, readonly, nonatomic) NSString *ownDisplayName;
|
||||
@property (weak, readonly, nonatomic) NSString *ownPhoneticName;
|
||||
@property (weak, readonly, nonatomic) NSString *serversideDisplayName;
|
||||
|
||||
@property (readonly, nonatomic) BOOL canJoinMetaContacts;
|
||||
|
||||
@property (readonly, nonatomic) BOOL existsServerside; //Metas and Bookmarks (among others?) have no serverside representation
|
||||
|
||||
@property (readonly, nonatomic) BOOL isIntentionallyNotAStranger;
|
||||
|
||||
@property (readonly, nonatomic) AIEncryptedChatPreference encryptedChatPreferences;
|
||||
|
||||
- (void)setIsMobile:(BOOL)isMobile notify:(NotifyTiming)notify;
|
||||
- (void)setOnline:(BOOL)online notify:(NotifyTiming)notify silently:(BOOL)silent;
|
||||
- (void)setSignonDate:(NSDate *)signonDate notify:(NotifyTiming)notify;
|
||||
- (NSDate *)signonDate;
|
||||
- (void)setIsBlocked:(BOOL)yesOrNo updateList:(BOOL)addToPrivacyLists;
|
||||
- (void)setIsAllowed:(BOOL)yesOrNo updateList:(BOOL)addToPrivacyLists;
|
||||
- (void)setIsOnPrivacyList:(BOOL)yesOrNo updateList:(BOOL)addToPrivacyLists privacyType:(AIPrivacyType)privType;
|
||||
|
||||
- (void)setIdle:(BOOL)isIdle sinceDate:(NSDate *)idleSinceDate notify:(NotifyTiming)notify;
|
||||
- (void)setServersideIconData:(NSData *)iconData notify:(NotifyTiming)notify;
|
||||
|
||||
- (void)setWarningLevel:(NSInteger)warningLevel notify:(NotifyTiming)notify;
|
||||
- (NSInteger)warningLevel;
|
||||
|
||||
- (void)setProfileArray:(NSArray *)array notify:(NotifyTiming)notify;
|
||||
- (void)setProfile:(NSAttributedString *)profile notify:(NotifyTiming)notify;
|
||||
- (NSArray *)profileArray;
|
||||
- (NSAttributedString *)profile;
|
||||
|
||||
- (void)setServersideAlias:(NSString *)alias
|
||||
silently:(BOOL)silent;
|
||||
|
||||
- (NSAttributedString *)contactListStatusMessage;
|
||||
|
||||
- (NSWritingDirection)baseWritingDirection;
|
||||
- (void)setBaseWritingDirection:(NSWritingDirection)direction;
|
||||
|
||||
- (ABPerson *)addressBookPerson;
|
||||
- (void)setAddressBookPerson:(ABPerson *)inPerson;
|
||||
|
||||
@end
|
|
@ -1,33 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIListContactCell.h>
|
||||
|
||||
@interface AIListContactBubbleCell : AIListContactCell {
|
||||
NSBezierPath *lastBackgroundBezierPath;
|
||||
BOOL outlineBubble;
|
||||
BOOL drawWithGradient;
|
||||
float outlineBubbleLineWidth;
|
||||
}
|
||||
|
||||
- (NSRect)bubbleRectForFrame:(NSRect)rect;
|
||||
|
||||
- (void)setOutlineBubble:(BOOL)flag;
|
||||
- (void)setOutlineBubbleLineWidth:(float)inWidth;
|
||||
|
||||
- (void)setDrawWithGradient:(BOOL)flag;
|
||||
|
||||
@end
|
|
@ -1,23 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIListContactBubbleCell.h>
|
||||
|
||||
@interface AIListContactBubbleToFitCell : AIListContactBubbleCell {
|
||||
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,127 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIAbstractListController.h>
|
||||
#import <Adium/AIListCell.h>
|
||||
#import <AIUtilities/AIImageDrawingAdditions.h>
|
||||
|
||||
//User Icon
|
||||
#define USER_ICON_LEFT_PAD 2
|
||||
#define USER_ICON_RIGHT_PAD 2
|
||||
|
||||
//Status icon
|
||||
#define STATUS_ICON_LEFT_PAD 2
|
||||
#define STATUS_ICON_RIGHT_PAD 2
|
||||
|
||||
//Service icon
|
||||
#define SERVICE_ICON_LEFT_PAD 2
|
||||
#define SERVICE_ICON_RIGHT_PAD 2
|
||||
|
||||
#define TEXT_WITH_IMAGES_LEFT_PAD 2
|
||||
#define TEXT_WITH_IMAGES_RIGHT_PAD 2
|
||||
|
||||
@interface AIListContactCell : AIListCell {
|
||||
BOOL userIconVisible;
|
||||
BOOL extendedStatusVisible;
|
||||
BOOL statusIconsVisible;
|
||||
BOOL serviceIconsVisible;
|
||||
|
||||
BOOL statusMessageVisible;
|
||||
BOOL idleTimeVisible;
|
||||
|
||||
NSSize userIconSize;
|
||||
NSInteger userIconRoundingRadius;
|
||||
CGFloat statusFontHeight;
|
||||
|
||||
BOOL backgroundColorIsStatus;
|
||||
BOOL backgroundColorIsEvents;
|
||||
BOOL shouldUseContactTextColors;
|
||||
|
||||
LIST_POSITION userIconPosition;
|
||||
LIST_POSITION statusIconPosition;
|
||||
LIST_POSITION serviceIconPosition;
|
||||
BOOL idleTimeIsBelow;
|
||||
BOOL statusMessageIsBelow;
|
||||
BOOL useStatusMessageAsExtendedStatus;
|
||||
BOOL useAliasesOnNonParentContacts;
|
||||
|
||||
CGFloat backgroundOpacity;
|
||||
|
||||
NSFont *statusFont;
|
||||
NSColor *statusColor;
|
||||
|
||||
NSDictionary *_statusAttributes;
|
||||
NSMutableDictionary *_statusAttributesInverted;
|
||||
}
|
||||
|
||||
//Status Text
|
||||
- (void)setStatusFont:(NSFont *)inFont;
|
||||
- (NSFont *)statusFont;
|
||||
- (NSDictionary *)statusAttributes;
|
||||
- (NSDictionary *)statusAttributesInverted;
|
||||
- (void)setTextAlignment:(NSTextAlignment)inAlignment;
|
||||
- (void)setStatusColor:(NSColor *)inColor;
|
||||
- (NSColor *)statusColor;
|
||||
|
||||
//Display options
|
||||
- (void)setUserIconVisible:(BOOL)inShowIcon;
|
||||
- (BOOL)userIconVisible;
|
||||
- (void)setUserIconSize:(NSInteger)inSize;
|
||||
- (CGFloat)userIconSize;
|
||||
|
||||
- (void)setExtendedStatusVisible:(BOOL)inShowStatus;
|
||||
- (BOOL)extendedStatusVisible;
|
||||
|
||||
- (void)setStatusIconsVisible:(BOOL)inShowStatus;
|
||||
- (BOOL)statusIconsVisible;
|
||||
|
||||
- (void)setServiceIconsVisible:(BOOL)inShowService;
|
||||
- (BOOL)serviceIconsVisible;
|
||||
|
||||
- (void)setIdleTimeIsBelowName:(BOOL)isBelow;
|
||||
- (void)setIdleTimeIsVisible:(BOOL)isVisible;
|
||||
- (void)setStatusMessageIsBelowName:(BOOL)isBelow;
|
||||
- (void)setStatusMessageIsVisible:(BOOL)isVisible;
|
||||
|
||||
- (void)setUserIconPosition:(LIST_POSITION)inPosition;
|
||||
- (void)setStatusIconPosition:(LIST_POSITION)inPosition;
|
||||
- (void)setServiceIconPosition:(LIST_POSITION)inPosition;
|
||||
- (void)setBackgroundOpacity:(CGFloat)inOpacity;
|
||||
- (CGFloat)backgroundOpacity;
|
||||
- (void)setBackgroundColorIsStatus:(BOOL)isStatus;
|
||||
- (void)setBackgroundColorIsEvents:(BOOL)isEvents;
|
||||
- (void)setShouldUseContactTextColors:(BOOL)flag;
|
||||
- (void)setUseStatusMessageAsExtendedStatus:(BOOL)flag;
|
||||
|
||||
//Drawing
|
||||
- (void)drawContentWithFrame:(NSRect)rect;
|
||||
- (void)drawBackgroundWithFrame:(NSRect)rect;
|
||||
- (NSRect)drawUserIconInRect:(NSRect)inRect position:(IMAGE_POSITION)position;
|
||||
- (NSRect)drawStatusIconInRect:(NSRect)rect position:(IMAGE_POSITION)position;
|
||||
- (NSRect)drawServiceIconInRect:(NSRect)rect position:(IMAGE_POSITION)position;
|
||||
- (NSRect)drawUserExtendedStatusInRect:(NSRect)rect withMessage:(NSString *)string drawUnder:(BOOL)drawUnder;
|
||||
- (NSColor *)labelColor;
|
||||
- (NSColor *)textColor;
|
||||
- (NSImage *)userIconImage;
|
||||
- (NSImage *)statusImage;
|
||||
- (NSImage *)serviceImage;
|
||||
//- (BOOL)drawStatusBelowLabelInRect:(NSRect)rect;
|
||||
- (float)imageOpacityForDrawing;
|
||||
|
||||
// Should not parent contacts have their aliases shown?
|
||||
- (void)setUseAliasesOnNonParentContacts:(BOOL)inFlag;
|
||||
|
||||
@end
|
|
@ -1,26 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#import <Adium/AIListContactCell.h>
|
||||
|
||||
@class AIGroupChat;
|
||||
|
||||
@interface AIListContactGroupChatCell : AIListContactCell {
|
||||
AIGroupChat *chat;
|
||||
}
|
||||
|
||||
@property (readwrite, nonatomic) AIGroupChat *chat;
|
||||
|
||||
@end
|
|
@ -1,23 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIListContactCell.h>
|
||||
|
||||
@interface AIListContactMockieCell : AIListContactCell {
|
||||
NSBezierPath *lastBackgroundBezierPath;
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,43 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIListObject.h>
|
||||
#import <Adium/AIContactObserverManager.h>
|
||||
|
||||
@class AISortController, AIContactList;
|
||||
|
||||
@interface AIListGroup : AIListObject <AIContainingObject, AIListObjectObserver> {
|
||||
NSMutableArray *_visibleObjects;
|
||||
NSMutableArray *_containedObjects; //Manually ordered array of contents
|
||||
BOOL expanded; //Exanded/Collapsed state of this object
|
||||
BOOL loadedExpanded;
|
||||
}
|
||||
|
||||
- (id)initWithUID:(NSString *)inUID;
|
||||
|
||||
//Object Storage
|
||||
- (AIListObject *)objectWithService:(AIService *)inService UID:(NSString *)inUID;
|
||||
|
||||
//Sorting (PRIVATE: For contact controller only)
|
||||
- (void)sortListObject:(AIListObject *)inObject;
|
||||
- (void)sort;
|
||||
|
||||
//Visibility
|
||||
@property (readonly, nonatomic) NSUInteger visibleCount;
|
||||
|
||||
@property (weak, readonly, nonatomic) AIContactList *contactList;
|
||||
|
||||
@end
|
|
@ -1,33 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIListGroupCell.h>
|
||||
|
||||
@interface AIListGroupBubbleCell : AIListGroupCell {
|
||||
BOOL outlineBubble;
|
||||
BOOL drawBubble;
|
||||
|
||||
float outlineBubbleLineWidth;
|
||||
}
|
||||
|
||||
- (NSRect)bubbleRectForFrame:(NSRect)rect;
|
||||
- (void)setOutlineBubble:(BOOL)flag;
|
||||
- (void)setOutlineBubbleLineWidth:(float)inWidth;
|
||||
|
||||
//This is the inverse of drawBubble so a default of NO will draw the bubble
|
||||
- (void)setHideBubble:(BOOL)flag;
|
||||
|
||||
@end
|
|
@ -1,23 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIListGroupBubbleCell.h>
|
||||
|
||||
@interface AIListGroupBubbleToFitCell : AIListGroupBubbleCell {
|
||||
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,46 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIListCell.h>
|
||||
|
||||
@class AIGradient;
|
||||
|
||||
@interface AIListGroupCell : AIListCell {
|
||||
NSColor *shadowColor;
|
||||
NSColor *backgroundColor;
|
||||
NSColor *gradientColor;
|
||||
BOOL drawsBackground;
|
||||
BOOL drawsGradientEdges;
|
||||
NSLayoutManager *layoutManager;
|
||||
|
||||
NSImage *_gradient;
|
||||
NSSize _gradientSize;
|
||||
}
|
||||
|
||||
- (CGFloat)flippyIndent;
|
||||
- (void)setShadowColor:(NSColor *)inColor;
|
||||
- (NSColor *)shadowColor;
|
||||
- (NSRect)drawGroupCountWithFrame:(NSRect)inRect;
|
||||
- (void)setBackgroundColor:(NSColor *)inBackgroundColor gradientColor:(NSColor *)inGradientColor;
|
||||
- (void)setDrawsBackground:(BOOL)inValue;
|
||||
- (void)setDrawsGradientEdges:(BOOL)inValue;
|
||||
- (NSImage *)cachedGradient:(NSSize)inSize;
|
||||
- (void)drawBackgroundGradientInRect:(NSRect)inRect;
|
||||
- (NSGradient *)backgroundGradient;
|
||||
- (void)flushGradientCache;
|
||||
- (NSColor *)flippyColor;
|
||||
|
||||
@end
|
|
@ -1,34 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIListGroupCell.h>
|
||||
|
||||
#define MOCKIE_RADIUS 6 //Radius of the rounded mockie corners
|
||||
|
||||
typedef enum {
|
||||
AIGroupCollapsed = 0,
|
||||
AIGroupExpanded
|
||||
} AIGroupState;
|
||||
#define NUMBER_OF_GROUP_STATES 2
|
||||
|
||||
@interface AIListGroupMockieCell : AIListGroupCell {
|
||||
NSImage *_mockieGradient[NUMBER_OF_GROUP_STATES];
|
||||
NSSize _mockieGradientSize[NUMBER_OF_GROUP_STATES];
|
||||
}
|
||||
|
||||
- (id)copyWithZone:(NSZone *)zone;
|
||||
|
||||
@end
|
|
@ -1,192 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/ESObjectWithProperties.h>
|
||||
#import <Adium/AIStatusDefines.h>
|
||||
|
||||
@class AIListObject, AIStatus, AIService, AIMutableOwnerArray, AIListGroup;
|
||||
|
||||
#define KEY_ORDER_INDEX @"Order Index"
|
||||
#define KEY_IS_BLOCKED @"isBlocked"
|
||||
|
||||
#define KEY_FORMATTED_UID @"FormattedUID"
|
||||
|
||||
typedef enum {
|
||||
AIAvailableStatus = 'avaL',
|
||||
AIAwayStatus = 'awaY',
|
||||
AIIdleStatus = 'idlE',
|
||||
AIAwayAndIdleStatus = 'aYiE',
|
||||
AIOfflineStatus = 'offL',
|
||||
AIUnknownStatus = 'unkN'
|
||||
} AIStatusSummary;
|
||||
|
||||
typedef enum {
|
||||
AIGroupChatNone = 0x0000, /**< No flags */
|
||||
AIGroupChatVoice = 0x0001, /**< Voiced user or "Participant" */
|
||||
AIGroupChatHalfOp = 0x0002, /**< Half-op */
|
||||
AIGroupChatOp = 0x0004, /**< Channel Op or Moderator */
|
||||
AIGroupChatFounder = 0x0008, /**< Channel Founder */
|
||||
AIGroupChatTyping = 0x0010, /**< Currently typing */
|
||||
AIGroupChatAway = 0x0020 /**< Currently away */
|
||||
} AIGroupChatFlags;
|
||||
|
||||
@protocol AIContainingObject <NSObject, NSFastEnumeration>
|
||||
|
||||
@property (readonly, copy, nonatomic) NSArray *visibleContainedObjects;
|
||||
@property (readonly, copy, nonatomic) NSArray *containedObjects;
|
||||
- (NSUInteger) countOfContainedObjects;
|
||||
@property (readonly, nonatomic) NSArray *uniqueContainedObjects;
|
||||
|
||||
@property (readonly, nonatomic) NSString *contentsBasedIdentifier;
|
||||
|
||||
- (BOOL)containsObject:(AIListObject *)inObject;
|
||||
|
||||
/*!
|
||||
* As NSArray's -objectAtIndex:, except that it only looks at visible objects contained in this object
|
||||
*/
|
||||
- (AIListObject *)visibleObjectAtIndex:(NSUInteger)index;
|
||||
|
||||
/*!
|
||||
* As NSArray's -indexOfObject:, except that it looks at visible objects contained in this object
|
||||
*/
|
||||
- (NSUInteger)visibleIndexOfObject:(AIListObject *)object;
|
||||
|
||||
|
||||
- (AIListObject *)objectWithService:(AIService *)inService UID:(NSString *)inUID;
|
||||
|
||||
@property (readonly, nonatomic) float smallestOrder;
|
||||
@property (readonly, nonatomic) float largestOrder;
|
||||
- (void)listObject:(AIListObject *)listObject didSetOrderIndex:(float)inOrderIndex;
|
||||
- (float)orderIndexForObject:(AIListObject *)listObject;
|
||||
|
||||
- (void)removeObjectAfterAccountStopsTracking:(AIListObject *)inObject;
|
||||
|
||||
@property (readwrite, nonatomic, getter=isExpanded) BOOL expanded;
|
||||
@property (readonly, nonatomic, getter=isExpandable) BOOL expandable;
|
||||
@property (readonly, nonatomic) NSUInteger visibleCount;
|
||||
- (BOOL)canContainObject:(id)obj;
|
||||
|
||||
- (BOOL)addObject:(AIListObject *)inObject;
|
||||
- (void)removeObject:(AIListObject *)inObject;
|
||||
|
||||
@end
|
||||
|
||||
@interface AIListObject : ESObjectWithProperties {
|
||||
AIService *__weak service;
|
||||
|
||||
NSString *UID;
|
||||
NSString *internalObjectID;
|
||||
|
||||
//Grouping, Manual ordering
|
||||
NSMutableSet *m_groups; //The AIContainingObjects that this object is in
|
||||
|
||||
float cachedSmallestOrder;
|
||||
float cachedLargestOrder;
|
||||
|
||||
BOOL isOnline;
|
||||
|
||||
// Former properties
|
||||
NSAttributedString *listObjectStatusMessage;
|
||||
|
||||
NSString *webKitUserIconPath;
|
||||
}
|
||||
|
||||
- (id)initWithUID:(NSString *)inUID service:(AIService *)inService;
|
||||
|
||||
- (void)object:(id)inObject didChangeValueForProperty:(NSString *)key notify:(NotifyTiming)notify;
|
||||
- (void)notifyOfChangedPropertiesSilently:(BOOL)silent;
|
||||
|
||||
//Identifying information
|
||||
@property (readonly, nonatomic) NSString *UID;
|
||||
@property (readonly, weak, nonatomic) AIService *service;
|
||||
@property (weak, readonly, nonatomic) NSString *internalObjectID;
|
||||
+ (NSString *)internalObjectIDForServiceID:(NSString *)inServiceID UID:(NSString *)inUID;
|
||||
|
||||
//Visibility
|
||||
@property (readwrite, nonatomic) BOOL alwaysVisible;
|
||||
|
||||
//Grouping
|
||||
//Not recommended for most uses. Use -groups and -metaContact instead unless you really need both
|
||||
@property (weak, readonly, nonatomic) NSSet *containingObjects;
|
||||
@property (readonly, copy, nonatomic) NSSet *groups;
|
||||
- (void)removeContainingGroup:(AIListGroup *)group;
|
||||
- (void)addContainingGroup:(AIListGroup *)group;
|
||||
- (void)removeFromGroup:(AIListObject <AIContainingObject> *)group;
|
||||
|
||||
//Display
|
||||
@property (weak, readonly, nonatomic) NSString *formattedUID;
|
||||
- (void)setFormattedUID:(NSString *)inFormattedUID notify:(NotifyTiming)notify;
|
||||
@property (weak, readonly, nonatomic) NSString *longDisplayName;
|
||||
|
||||
//Prefs
|
||||
- (void)setPreference:(id)value forKey:(NSString *)inKey group:(NSString *)groupName;
|
||||
- (void)setPreferences:(NSDictionary *)prefs inGroup:(NSString *)group;
|
||||
- (id)preferenceForKey:(NSString *)inKey group:(NSString *)groupName;
|
||||
@property (weak, readonly, nonatomic) NSString *pathToPreferences;
|
||||
|
||||
//Key-Value pairing
|
||||
@property (readonly, nonatomic) BOOL online;
|
||||
|
||||
@property (weak, readonly, nonatomic) NSString *statusName;
|
||||
@property (readonly, nonatomic) AIStatusType statusType;
|
||||
- (void)setStatusWithName:(NSString *)statusName statusType:(AIStatusType)statusType notify:(NotifyTiming)notify;
|
||||
@property (weak, readonly, nonatomic) NSAttributedString *statusMessage;
|
||||
@property (weak, readonly, nonatomic) NSString *statusMessageString;
|
||||
- (void)setStatusMessage:(NSAttributedString *)statusMessage notify:(NotifyTiming)notify;
|
||||
- (void)setBaseAvailableStatusAndNotify:(NotifyTiming)notify;
|
||||
@property (readonly, nonatomic) AIStatusSummary statusSummary;
|
||||
|
||||
@property (readonly, nonatomic) BOOL soundsAreMuted;
|
||||
|
||||
@property (readonly, nonatomic) BOOL isStranger;
|
||||
@property (readonly, nonatomic) BOOL isMobile;
|
||||
@property (readonly, nonatomic) BOOL isBlocked;
|
||||
|
||||
@property (readwrite, nonatomic, strong) NSString *displayName;
|
||||
|
||||
@property (weak, readonly, nonatomic) NSString *phoneticName;
|
||||
|
||||
@property (readwrite, nonatomic, strong) NSString *notes;
|
||||
|
||||
@property (readonly, nonatomic) NSInteger idleTime;
|
||||
|
||||
@property (unsafe_unretained, readonly, nonatomic) NSImage *userIcon;
|
||||
@property (unsafe_unretained, readonly, nonatomic) NSImage *menuIcon;
|
||||
@property (unsafe_unretained, readonly, nonatomic) NSImage *statusIcon;
|
||||
@property (weak, readwrite, nonatomic) NSData *userIconData;
|
||||
- (void)setUserIconData:(NSData *)inData;
|
||||
|
||||
//For use only by subclasses
|
||||
@property (unsafe_unretained, readonly, nonatomic) NSImage *internalUserIcon;
|
||||
|
||||
//mutableOwnerArray delegate and methods
|
||||
- (void)listObject:(AIListObject *)listObject mutableOwnerArray:(AIMutableOwnerArray *)inArray didSetObject:(id)anObject withOwner:(AIListObject *)inOwner priorityLevel:(float)priority;
|
||||
|
||||
//Comparison
|
||||
- (NSComparisonResult)compare:(AIListObject *)other;
|
||||
|
||||
/*!
|
||||
* These methods are part of the AIContainingObject protocol
|
||||
* but are implemented by AIListObject (which does not conform to the protocol) for the convenience
|
||||
* of subclasses.
|
||||
*/
|
||||
@property (readonly, nonatomic) float smallestOrder;
|
||||
@property (readonly, nonatomic) float largestOrder;
|
||||
- (void)listObject:(AIListObject *)listObject didSetOrderIndex:(float)inOrderIndex;
|
||||
- (float)orderIndexForObject:(AIListObject *)listObject;
|
||||
- (void) moveContainedObject:(AIListObject *)object toIndex:(NSInteger)index;
|
||||
|
||||
@end
|
|
@ -1,91 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <AIUtilities/AIMultiCellOutlineView.h>
|
||||
#import <Adium/AIAbstractListController.h>
|
||||
#import <Adium/AIContactControllerProtocol.h>
|
||||
#import <Adium/AIListOutlineView+Drawing.h>
|
||||
|
||||
@class AIListObject;
|
||||
|
||||
typedef enum {
|
||||
AINormalBackground = 0,
|
||||
AITileBackground,
|
||||
AIFillProportionatelyBackground,
|
||||
AIFillStretchBackground
|
||||
} AIBackgroundStyle;
|
||||
|
||||
@interface AIListOutlineView : AIMultiCellOutlineView <ContactListOutlineView> {
|
||||
BOOL groupsHaveBackground;
|
||||
BOOL updateShadowsWhileDrawing;
|
||||
|
||||
NSImage *backgroundImage;
|
||||
CGFloat backgroundFade;
|
||||
AIBackgroundStyle backgroundStyle;
|
||||
AIContactListWindowStyle windowStyle;
|
||||
|
||||
NSColor *backgroundColor;
|
||||
NSColor *_backgroundColorWithOpacity;
|
||||
CGFloat backgroundOpacity;
|
||||
|
||||
NSColor *highlightColor;
|
||||
|
||||
NSColor *rowColor;
|
||||
NSColor *_rowColorWithOpacity;
|
||||
|
||||
CGFloat minimumDesiredWidth;
|
||||
BOOL desiredHeightPadding;
|
||||
}
|
||||
|
||||
@property (readonly, nonatomic) NSInteger desiredHeight;
|
||||
@property (readonly, nonatomic) NSInteger desiredWidth;
|
||||
|
||||
// Contact menu
|
||||
@property (weak, readonly, nonatomic) AIListObject *listObject;
|
||||
@property (weak, readonly, nonatomic) NSArray *arrayOfListObjects;
|
||||
@property (weak, readonly, nonatomic) NSArray *arrayOfListObjectsWithGroups;
|
||||
@property (weak, readonly, nonatomic) AIListContact *firstVisibleListContact;
|
||||
|
||||
// Contacts
|
||||
|
||||
/*!
|
||||
* @brief Index of the first visible list contact
|
||||
*
|
||||
* @result The index, or -1 if no list contact is visible
|
||||
*/
|
||||
@property (readonly, nonatomic) int indexOfFirstVisibleListContact;
|
||||
|
||||
- (void)setMinimumDesiredWidth:(CGFloat)inMinimumDesiredWidth;
|
||||
- (void)setDesiredHeightPadding:(int)inPadding;
|
||||
|
||||
@end
|
||||
|
||||
@interface AIListOutlineView (AIListOutlineView_Drawing)
|
||||
|
||||
@property (readwrite, nonatomic, retain) NSColor *backgroundColor;
|
||||
@property (readwrite, nonatomic, retain) NSColor *highlightColor;
|
||||
@property (readwrite, nonatomic, retain) NSColor *alternatingRowColor;
|
||||
|
||||
// Shadows
|
||||
- (void)setUpdateShadowsWhileDrawing:(BOOL)update;
|
||||
|
||||
// Backgrounds
|
||||
- (void)setBackgroundImage:(NSImage *)inImage;
|
||||
- (void)setBackgroundStyle:(AIBackgroundStyle)inBackgroundStyle;
|
||||
- (void)setBackgroundOpacity:(CGFloat)opacity forWindowStyle:(AIContactListWindowStyle)windowStyle;
|
||||
- (void)setBackgroundFade:(CGFloat)fade;
|
||||
|
||||
@end
|
|
@ -1,57 +0,0 @@
|
|||
/*
|
||||
Note: This file is dual-licensed under the BSD "3-Clause" license and the GPL license.
|
||||
|
||||
Copyright (c) 2009, Evan Schoenberg
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
|
||||
following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice, this list of conditions and the following
|
||||
disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
Neither the name of the Adium nor the names of its contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
AILOCALIZATION_MOVE_SELF = 0,
|
||||
AILOCALIZATION_MOVE_ANCHOR
|
||||
} AILocalizationAnchorMovementType;
|
||||
|
||||
@interface NSObject (PRIVATE_AILocalizationControls)
|
||||
- (void)_resizeWindow:(NSWindow *)inWindow leftBy:(CGFloat)difference;
|
||||
- (void)_resizeWindow:(NSWindow *)inWindow rightBy:(CGFloat)difference;
|
||||
- (void)setRightAnchorMovementType:(AILocalizationAnchorMovementType)inType;
|
||||
- (void)_handleSizingWithOldFrame:(NSRect)oldFrame stringValue:(NSString *)inStringValue;
|
||||
- (NSControl *)viewForSizing;
|
||||
@end
|
||||
|
||||
#import <Adium/AILocalizationButton.h>
|
||||
#import <Adium/AILocalizationButtonCell.h>
|
||||
#import <Adium/AILocalizationTextField.h>
|
|
@ -1,62 +0,0 @@
|
|||
/*
|
||||
Note: This file is dual-licensed under the BSD "3-Clause" license and the GPL license.
|
||||
|
||||
Copyright (c) 2009, Evan Schoenberg
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
|
||||
following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice, this list of conditions and the following
|
||||
disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
Neither the name of the Adium nor the names of its contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
@interface AILocalizationButton : NSButton {
|
||||
NSRect originalFrame;
|
||||
|
||||
IBOutlet NSWindow *window_anchorOnLeftSide;
|
||||
IBOutlet NSWindow *window_anchorOnRightSide;
|
||||
|
||||
IBOutlet NSView *view_anchorToLeftSide;
|
||||
IBOutlet NSView *view_anchorToRightSide;
|
||||
|
||||
AILocalizationAnchorMovementType rightAnchorMovementType;
|
||||
BOOL alwaysMoveRightAnchoredWindow;
|
||||
}
|
||||
|
||||
- (void)setRightAnchorMovementType:(AILocalizationAnchorMovementType)inType;
|
||||
- (void)setAlwaysMoveRightAnchoredWindow:(BOOL)inAlwaysMove;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSButton (AILocalizationAssistance)
|
||||
- (void)setLocalizedString:(NSString *)inString;
|
||||
@end
|
|
@ -1,59 +0,0 @@
|
|||
/*
|
||||
Note: This file is dual-licensed under the BSD "3-Clause" license and the GPL license.
|
||||
|
||||
Copyright (c) 2009, Evan Schoenberg
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
|
||||
following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice, this list of conditions and the following
|
||||
disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
Neither the name of the Adium nor the names of its contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
@interface AILocalizationButtonCell : NSButtonCell {
|
||||
NSRect originalFrame;
|
||||
|
||||
IBOutlet NSWindow *window_anchorOnLeftSide;
|
||||
IBOutlet NSWindow *window_anchorOnRightSide;
|
||||
|
||||
IBOutlet NSView *view_anchorToLeftSide;
|
||||
IBOutlet NSView *view_anchorToRightSide;
|
||||
|
||||
AILocalizationAnchorMovementType rightAnchorMovementType;
|
||||
BOOL alwaysMoveRightAnchoredWindow;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface NSButtonCell (AILocalizationAssistance)
|
||||
- (void)setLocalizedString:(NSString *)inString;
|
||||
@end
|
|
@ -1,61 +0,0 @@
|
|||
/*
|
||||
Note: This file is dual-licensed under the BSD "3-Clause" license and the GPL license.
|
||||
|
||||
Copyright (c) 2009, Evan Schoenberg
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
|
||||
following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice, this list of conditions and the following
|
||||
disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
Neither the name of the Adium nor the names of its contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
@interface AILocalizationTextField : NSTextField {
|
||||
NSRect originalFrame;
|
||||
|
||||
IBOutlet NSWindow *window_anchorOnLeftSide;
|
||||
IBOutlet NSWindow *window_anchorOnRightSide;
|
||||
|
||||
IBOutlet NSView *view_anchorToLeftSide;
|
||||
IBOutlet NSView *view_anchorToRightSide;
|
||||
|
||||
AILocalizationAnchorMovementType rightAnchorMovementType;
|
||||
BOOL alwaysMoveRightAnchoredWindow;
|
||||
}
|
||||
|
||||
- (void)setAlwaysMoveRightAnchoredWindow:(BOOL)inAlwaysMove;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSTextField (AILocalizationAssistance)
|
||||
- (void)setLocalizedString:(NSString *)inString;
|
||||
@end
|
|
@ -1,38 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIControllerProtocol.h>
|
||||
|
||||
#define LOGIN_PREFERENCES_FILE_NAME @"Login Preferences" //Login preferences file name
|
||||
#define LOGIN_SHOW_WINDOW @"Show Login Window" //Should hide the login window
|
||||
|
||||
#define LOGIN_LAST_USER @"Last Login Name" //Last logged in user
|
||||
#if defined (DEBUG_BUILD) && ! defined (RELEASE_BUILD)
|
||||
# define LOGIN_LAST_USER_DEBUG @"Last Login Name-Debug"//Last logged in user - debug
|
||||
#endif
|
||||
|
||||
@protocol AILoginController <AIController>
|
||||
@property (nonatomic, readonly) NSString *userDirectory;
|
||||
@property (nonatomic, readonly) NSString *currentUser;
|
||||
@property (nonatomic, readonly) NSArray *userArray;
|
||||
|
||||
- (void)addUser:(NSString *)inUserName;
|
||||
- (void)deleteUser:(NSString *)inUserName;
|
||||
- (void)renameUser:(NSString *)oldName to:(NSString *)newName;
|
||||
- (void)loginAsUser:(NSString *)userName;
|
||||
- (void)requestUserNotifyingTarget:(id)inTarget selector:(SEL)inSelector;
|
||||
@end
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIControllerProtocol.h>
|
||||
|
||||
typedef enum {
|
||||
AIMediaTypeAudio,
|
||||
AIMediaTypeVideo
|
||||
} AIMediaType;
|
||||
|
||||
typedef enum {
|
||||
AIMediaStateWaiting = 1, /* Waiting for response */
|
||||
AIMediaStateRequested, /* Got request */
|
||||
AIMediaStateAccepted, /* Accepted call */
|
||||
AIMediaStateRejected, /* Rejected call */
|
||||
} AIMediaState;
|
||||
|
||||
@class AIMedia, AIListContact, AIAccount;
|
||||
|
||||
@protocol AIMediaWindowController
|
||||
@property (readwrite, retain, nonatomic) AIMedia *media;
|
||||
@property (readwrite, retain, nonatomic) NSView *outgoingVideo;
|
||||
@property (readwrite, retain, nonatomic) NSView *incomingVideo;
|
||||
@end
|
||||
|
||||
@protocol AIMediaController <AIController>
|
||||
- (AIMedia *)mediaWithContact:(AIListContact *)contact
|
||||
onAccount:(AIAccount *)account;
|
||||
|
||||
- (AIMedia *)existingMediaWithContact:(AIListContact *)contact
|
||||
onAccount:(AIAccount *)account;
|
||||
|
||||
- (NSWindowController <AIMediaWindowController> *)windowControllerForMedia:(AIMedia *)media;
|
||||
- (void)closeMediaWindowController:(NSWindowController <AIMediaWindowController> *)mediaWindowController;
|
||||
|
||||
- (void)media:(AIMedia *)media didSetState:(AIMediaState)state;
|
||||
|
||||
@end
|
|
@ -1,78 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIControllerProtocol.h>
|
||||
|
||||
#define AIMenuDidChange @"AIMenuDidChange"
|
||||
|
||||
/* Each of the items in this enum must correspond to an NSMenuItem which is:
|
||||
* 1. Declared in the AIMenuController.h interface
|
||||
* 2. Connected to AIMenuController in MainMenu.nib
|
||||
* 3. Be included in the locationArray in -[AIMenuController awakeFromNib]
|
||||
*
|
||||
* If the menu item isn't the first in its menu, it can be connected to the Quit Adium menu item; AIMenuController will move it
|
||||
* to the appropriate place.
|
||||
*/
|
||||
typedef enum {
|
||||
LOC_Adium_About = 0, LOC_Adium_Preferences, LOC_Adium_Other,
|
||||
LOC_File_New, LOC_File_Close, LOC_File_Save, LOC_File_Accounts, LOC_File_Additions,
|
||||
LOC_Edit_Bottom, LOC_Edit_Links, LOC_Edit_Additions,
|
||||
LOC_View_General, LOC_View_Sorting, LOC_View_Toggles, LOC_View_Counting_Toggles, LOC_View_Appearance_Toggles, LOC_View_Additions,
|
||||
LOC_Display_General, LOC_Display_Jump, LOC_Display_MessageControl,
|
||||
LOC_Contact_Manage, LOC_Contact_Info, LOC_Contact_Action, LOC_Contact_NegativeAction, LOC_Contact_Additions,
|
||||
LOC_Status_State, LOC_Status_SocialNetworking, LOC_Status_Accounts, LOC_Status_Additions,
|
||||
LOC_Format_Styles, LOC_Format_Palettes, LOC_Format_Additions,
|
||||
LOC_Window_Top, LOC_Window_Commands, LOC_Window_Auxiliary, LOC_Window_Fixed,
|
||||
LOC_Help_Local, LOC_Help_Web, LOC_Help_Additions,
|
||||
LOC_Dock_Status
|
||||
} AIMenuLocation;
|
||||
|
||||
typedef enum {
|
||||
Context_Group_AttachDetach,Context_Contact_AttachDetach,Context_Group_Manage,Context_Contact_Manage,Context_Contact_Action, Context_Contact_NegativeAction,
|
||||
Context_Contact_Message, Context_Contact_Additions, Context_Contact_ChatAction, Context_Contact_Stranger_ChatAction, Context_Contact_ListAction,
|
||||
Context_Contact_GroupChat_ParticipantAction, Context_GroupChat_Manage, Context_GroupChat_Action,
|
||||
Context_Tab_Action,
|
||||
Context_TextView_LinkEditing, Context_TextView_Edit
|
||||
} AIContextMenuLocation;
|
||||
|
||||
@class AIListObject, AIChat;
|
||||
|
||||
@protocol AIMenuController <AIController>
|
||||
//Custom menu items
|
||||
- (void)addMenuItem:(NSMenuItem *)newItem toLocation:(AIMenuLocation)location;
|
||||
- (void)removeMenuItem:(NSMenuItem *)targetItem;
|
||||
|
||||
- (void)delayMenuItemPostProcessing;
|
||||
- (void)endDelayMenuItemPostProcessing;
|
||||
|
||||
//Contextual menu items
|
||||
- (void)addContextualMenuItem:(NSMenuItem *)newItem toLocation:(AIContextMenuLocation)location;
|
||||
- (NSMenu *)contextualMenuWithLocations:(NSArray *)inLocationArray forListObject:(AIListObject *)inObject;
|
||||
- (NSMenu *)contextualMenuWithLocations:(NSArray *)inLocationArray forChat:(AIChat *)inObject;
|
||||
- (NSMenu *)contextualMenuWithLocations:(NSArray *)inLocationArray forListObject:(AIListObject *)inObject inChat:(AIChat *)inChat;
|
||||
@property (nonatomic, readonly) AIListObject *currentContextMenuObject;
|
||||
@property (nonatomic, readonly) AIChat *currentContextMenuChat;
|
||||
- (NSMenu *)contextualMenuWithLocations:(NSArray *)inLocationArray;
|
||||
|
||||
//Control over the italics menu item
|
||||
- (void)removeItalicsKeyEquivalent;
|
||||
- (void)restoreItalicsKeyEquivalent;
|
||||
@end
|
||||
|
||||
@interface NSObject (MenuItemUpdating)
|
||||
- (void)menu:(NSMenu *)menu needsUpdateForMenuItem:(NSMenuItem *)menuItem;
|
||||
@end
|
||||
|
|
@ -1,118 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <AIUtilities/AISendingTextView.h>
|
||||
#import <Adium/AIInterfaceControllerProtocol.h>
|
||||
#import <Adium/AIContactObserverManager.h>
|
||||
|
||||
@class AIListContact, AIAccount, AIChat, AIButtonWithCursor;
|
||||
|
||||
@protocol AIMessageEntryTextViewDelegate <NSTextViewDelegate,NSObject>
|
||||
|
||||
@optional
|
||||
/*!
|
||||
* @brief Should the tab key trigger an autocomplete?
|
||||
*/
|
||||
- (BOOL)textViewShouldTabComplete:(NSTextView *)inTextView;
|
||||
- (NSRange)textView:(NSTextView *)inTextView rangeForCompletion:(NSRange)completionRange;
|
||||
- (void)textViewDidCancel:(NSTextView *)inTextView;
|
||||
@end
|
||||
|
||||
@interface AISimpleTextView : NSView {
|
||||
NSAttributedString *string;
|
||||
}
|
||||
|
||||
@property (readwrite, nonatomic) NSAttributedString *string;
|
||||
|
||||
@end
|
||||
|
||||
@interface AIMessageEntryTextView : AISendingTextView <AITextEntryView, AIListObjectObserver> {
|
||||
AIChat *chat;
|
||||
|
||||
BOOL clearOnEscape;
|
||||
BOOL historyEnabled;
|
||||
BOOL pushPopEnabled;
|
||||
BOOL homeToStartOfLine;
|
||||
BOOL enableTypingNotifications;
|
||||
|
||||
NSMutableArray *historyArray;
|
||||
int currentHistoryLocation;
|
||||
|
||||
NSMutableArray *pushArray;
|
||||
BOOL pushIndicatorVisible;
|
||||
AIButtonWithCursor *pushIndicator;
|
||||
|
||||
NSSize lastPostedSize;
|
||||
NSSize _desiredSizeCached;
|
||||
BOOL resizing;
|
||||
|
||||
NSView *associatedView;
|
||||
|
||||
AISimpleTextView *characterCounter;
|
||||
NSString *characterCounterPrefix;
|
||||
NSInteger maxCharacters;
|
||||
NSColor *savedTextColor;
|
||||
|
||||
@protected
|
||||
// Emoticons
|
||||
BOOL hasEmoticonsMenu;
|
||||
AIButtonWithCursor *emoticonsMenuButton;
|
||||
}
|
||||
|
||||
@property (readwrite, unsafe_unretained, nonatomic) id<AIMessageEntryTextViewDelegate> delegate;
|
||||
|
||||
// Configure
|
||||
@property (readwrite, nonatomic) BOOL clearOnEscape;
|
||||
@property (readwrite, nonatomic) BOOL homeToStartOfLine;
|
||||
@property (readwrite, nonatomic) NSView *associatedView;
|
||||
|
||||
// Context
|
||||
@property (readwrite, retain, nonatomic) AIChat *chat;
|
||||
@property (readonly, nonatomic) AIListContact *listObject;
|
||||
|
||||
// History
|
||||
@property (readwrite, nonatomic) BOOL historyEnabled;
|
||||
|
||||
// Emoticons
|
||||
@property (assign) BOOL hasEmoticonsMenu;
|
||||
@property (retain) NSButton *emoticonsMenuButton;
|
||||
|
||||
// Adium Text Entry
|
||||
- (void)setAttributedString:(NSAttributedString *)inAttributedString;
|
||||
- (void)setString:(NSString *)string;
|
||||
- (void)setTypingAttributes:(NSDictionary *)attrs;
|
||||
- (void)pasteAsPlainTextWithTraits:(id)sender;
|
||||
- (void)pasteAsRichText:(id)sender;
|
||||
- (NSSize)desiredSize;
|
||||
|
||||
// Paging
|
||||
- (void)scrollPageUp:(id)sender;
|
||||
- (void)scrollPageDown:(id)sender;
|
||||
|
||||
// History
|
||||
- (void)historyUp;
|
||||
- (void)historyDown;
|
||||
|
||||
// Push and Pop
|
||||
- (void)setPushPopEnabled:(BOOL)inBool;
|
||||
- (void)pushContent;
|
||||
- (void)popContent;
|
||||
- (void)swapContent;
|
||||
|
||||
// Emoticons
|
||||
- (void)popUpEmoticonsMenu;
|
||||
|
||||
@end
|
|
@ -1,57 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
#import <AIUtilities/AIImageCollectionView.h>
|
||||
|
||||
|
||||
@class AIImageCollectionView, AIImageCollectionViewDelegate, AIMessageEntryTextView;
|
||||
|
||||
/*!
|
||||
* @class AIMessageViewEmoticonsController
|
||||
* @brief Handles message view emoticons menu
|
||||
*
|
||||
* Opens a contextual (pop-up) menu, allowing to insert emoticons.
|
||||
*/
|
||||
@interface AIMessageViewEmoticonsController : NSObject <AIImageCollectionViewDelegate, NSMenuDelegate> {
|
||||
AIMessageEntryTextView *textView;
|
||||
NSArray *emoticons;
|
||||
|
||||
@private
|
||||
NSArray *emoticonTitles;
|
||||
NSArray *emoticonSymbols;
|
||||
}
|
||||
|
||||
@property (weak) IBOutlet NSMenu *menu;
|
||||
@property (weak) IBOutlet AIImageCollectionView *emoticonsCollectionView;
|
||||
@property (weak) IBOutlet NSTextField *emoticonTitleLabel;
|
||||
@property (weak) IBOutlet NSTextField *emoticonSymbolLabel;
|
||||
@property (weak) IBOutlet NSView *alignmentView;
|
||||
|
||||
@property (strong) AIMessageEntryTextView *textView;
|
||||
|
||||
@property (copy) NSArray *emoticons;
|
||||
@property (copy) NSArray *emoticonTitles;
|
||||
@property (copy) NSArray *emoticonSymbols;
|
||||
|
||||
/*!
|
||||
* @brief Open the menu
|
||||
*
|
||||
* @param textView AIMessageEntryTextView
|
||||
*/
|
||||
+ (void)popUpMenuForTextView:(AIMessageEntryTextView *)textView atPoint:(NSPoint)aPoint;
|
||||
|
||||
@end
|
|
@ -1,64 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIListContact.h>
|
||||
|
||||
#define KEY_PREFERRED_DESTINATION_CONTACT @"Preferred Destination Contact"
|
||||
|
||||
@interface AIMetaContact : AIListContact <AIContainingObject> {
|
||||
NSNumber *objectID;
|
||||
|
||||
AIListContact *_preferredContact;
|
||||
NSArray *_listContacts;
|
||||
NSArray *_listContactsIncludingOfflineAccounts;
|
||||
|
||||
BOOL containsOnlyOneUniqueContact;
|
||||
|
||||
NSMutableArray *_containedObjects; //Manually ordered array of contents
|
||||
BOOL containedObjectsNeedsSort;
|
||||
BOOL saveGroupingChanges;
|
||||
|
||||
BOOL expanded; //Exanded/Collapsed state of this object
|
||||
}
|
||||
|
||||
//The objectID is unique to a meta contact and is used as the UID for purposes of AIListContact inheritance
|
||||
- (id)initWithObjectID:(NSNumber *)objectID;
|
||||
@property (readonly, nonatomic) NSNumber *objectID;
|
||||
+ (NSString *)internalObjectIDFromObjectID:(NSNumber *)inObjectID;
|
||||
|
||||
@property (weak, readonly, nonatomic) AIListContact *preferredContact;
|
||||
- (AIListContact *)preferredContactWithCompatibleService:(AIService *)inService;
|
||||
|
||||
- (void)updateRemoteGroupingOfContact:(AIListContact *)inListContact;
|
||||
|
||||
@property (readonly, nonatomic) BOOL containsOnlyOneService;
|
||||
@property (readonly, nonatomic) NSUInteger uniqueContainedObjectsCount;
|
||||
- (AIListObject *)uniqueObjectAtIndex:(int)inIndex;
|
||||
|
||||
@property (weak, readonly, nonatomic) NSDictionary *dictionaryOfServiceClassesAndListContacts;
|
||||
@property (weak, readonly, nonatomic) NSArray *servicesOfContainedObjects;
|
||||
|
||||
/*
|
||||
* @brief A flat array of AIListContacts each with a different internalObjectID
|
||||
*
|
||||
* If multiple AIListContacts with the same UID/Service are within this metacontact (i.e. from multiple accounts),
|
||||
* only one will be included in this array, and that one will be the most available of them.
|
||||
* Contacts from all accounts, including offline ones, will be included.
|
||||
*/
|
||||
- (NSArray *)listContactsIncludingOfflineAccounts;
|
||||
- (BOOL)removeObject:(AIListObject *)inObject;
|
||||
|
||||
@end
|
|
@ -1,44 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
@interface AIModularPane : NSObject {
|
||||
IBOutlet NSView *view;
|
||||
id plugin;
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
+ (AIModularPane *)modularPane;
|
||||
+ (AIModularPane *)modularPaneForPlugin:(id)inPlugin;
|
||||
- (id)initForPlugin:(id)inPlugin;
|
||||
- (id)init;
|
||||
- (NSComparisonResult)compare:(AIModularPane *)inPane;
|
||||
- (NSView *)view;
|
||||
- (void)closeView;
|
||||
|
||||
//For subclasses
|
||||
- (NSString *)label;
|
||||
- (NSString *)nibName;
|
||||
- (void)viewDidLoad;
|
||||
- (void)localizePane;
|
||||
- (void)viewWillClose;
|
||||
- (IBAction)changePreference:(id)sender;
|
||||
- (void)configureControlDimming;
|
||||
- (BOOL)resizable;
|
||||
- (BOOL)resizableHorizontally;
|
||||
|
||||
@end
|
|
@ -1,28 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
@interface AIModularPaneCategoryView : NSView {
|
||||
CGFloat desiredHeight;
|
||||
BOOL containsPanes;
|
||||
}
|
||||
|
||||
- (void)setDesiredHeight:(CGFloat)inHeight;
|
||||
- (CGFloat)desiredHeight;
|
||||
- (void)setPanes:(NSArray *)paneArray;
|
||||
+ (CGFloat)heightForTabView:(NSTabView *)tabView;
|
||||
- (BOOL)isEmpty;
|
||||
|
||||
@end
|
|
@ -1,66 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import "AIWindowController.h"
|
||||
|
||||
typedef enum {
|
||||
AIPasswordPromptOKReturn = 0,
|
||||
AIPasswordPromptCancelReturn
|
||||
} AIPasswordPromptReturn;
|
||||
|
||||
/*!
|
||||
* @class AIPasswordPromptController
|
||||
*
|
||||
* This abstract superclass simplifies displaying a password prompt and notifying a target when the
|
||||
* password is entered.
|
||||
*/
|
||||
@interface AIPasswordPromptController : AIWindowController {
|
||||
IBOutlet NSTextField *textField_password;
|
||||
IBOutlet NSButton *checkBox_savePassword;
|
||||
IBOutlet NSButton *button_OK;
|
||||
|
||||
NSString *password;
|
||||
|
||||
SEL selector;
|
||||
id target;
|
||||
|
||||
id context;
|
||||
}
|
||||
|
||||
/*!
|
||||
* @brief Designated initializer for AIPasswordPromptController
|
||||
*
|
||||
* @param windowNibName Nib name.
|
||||
* @param password Iniital password to put in the password field. If nil, the field will be empty.
|
||||
* @param inTarget Target to notify when the prompt window is closed
|
||||
* @param inSelector Selector on target. Signature is - (void)passwordReturnedForConnect:(NSString *)inPassword returnCode:(AIPasswordPromptReturn)returnCode context:(id)inContext
|
||||
* @param inContext Context to pass back when notifying the target.
|
||||
*
|
||||
* @result An AIPasswordPromptController
|
||||
*/
|
||||
- (id)initWithWindowNibName:(NSString *)windowNibName password:(NSString *)password notifyingTarget:(id)inTarget selector:(SEL)inSelector context:(id)inContext;
|
||||
- (IBAction)cancel:(id)sender;
|
||||
- (IBAction)okay:(id)sender;
|
||||
- (IBAction)togglePasswordSaved:(id)sender;
|
||||
|
||||
@end
|
||||
|
||||
@interface AIPasswordPromptController (PRIVATE_and_Subclasses)
|
||||
- (NSString *)savedPasswordKey;
|
||||
- (void)windowDidLoad;
|
||||
- (void)savePassword:(NSString *)password;
|
||||
- (void)setTarget:(id)inTarget selector:(SEL)inSelector context:(id)inContext;
|
||||
@end
|
|
@ -1,37 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
enum {
|
||||
AICachesDirectory = 400,
|
||||
AIPluginsDirectory = 405,
|
||||
AIContactListDirectory = 410,
|
||||
AIDockIconsDirectory = 411,
|
||||
AIEmoticonsDirectory = 412,
|
||||
AIMessageStylesDirectory = 413,
|
||||
AIScriptsDirectory = 414,
|
||||
AIServiceIconsDirectory = 415,
|
||||
AISoundsDirectory = 416,
|
||||
AIStatusIconsDirectory = 417,
|
||||
AIMenuBarIconsDirectory = 418,
|
||||
};
|
||||
|
||||
enum {
|
||||
AIInternalDomainMask = 0x10000,
|
||||
AIAllDomainsMask = NSAllDomainsMask | AIInternalDomainMask,
|
||||
};
|
||||
|
||||
NSArray *AISearchPathForDirectories(NSUInteger directory);
|
||||
NSArray *AISearchPathForDirectoriesInDomainsExpanding(NSUInteger directory, NSUInteger domainMask, BOOL expandTilde);
|
|
@ -1,35 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AISharedAdium.h>
|
||||
|
||||
@protocol AIPlugin <NSObject>
|
||||
- (void)installPlugin;
|
||||
- (void)uninstallPlugin;
|
||||
@end
|
||||
|
||||
@protocol AIPluginInfo
|
||||
@property (readonly, nonatomic) NSString *pluginAuthor;
|
||||
@property (readonly, nonatomic) NSString *pluginVersion;
|
||||
@property (readonly, nonatomic) NSString *pluginDescription;
|
||||
@property (readonly, nonatomic) NSString *pluginURL;
|
||||
@end
|
||||
|
||||
@interface AIPlugin : NSObject <AIPlugin> {
|
||||
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,77 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIControllerProtocol.h>
|
||||
#import <Adium/AIPreferencePane.h>
|
||||
|
||||
//Preference groups
|
||||
#define PREF_GROUP_GENERAL @"General"
|
||||
#define PREF_GROUP_ACCOUNTS @"Accounts"
|
||||
#define PREF_GROUP_TOOLBARS @"Toolbars"
|
||||
#define PREF_GROUP_WINDOW_POSITIONS @"Window Positions"
|
||||
#define PREF_GROUP_SPELLING @"Spelling"
|
||||
#define OBJECT_PREFS_PATH @"ByObject" //Path to object specific preference folder
|
||||
#define ACCOUNT_PREFS_PATH @"Accounts" //Path to account specific preference folder
|
||||
|
||||
@class AIAdium, AIListObject;
|
||||
@class AIPreferencePane, AIAdvancedPreferencePane;
|
||||
|
||||
@protocol AIPreferenceController <AIController>
|
||||
//Preference Window
|
||||
- (IBAction)showPreferenceWindow:(id)sender;
|
||||
- (IBAction)closePreferenceWindow:(id)sender;
|
||||
- (void)openPreferencesToCategoryWithIdentifier:(NSString *)identifier;
|
||||
- (void)addPreferencePane:(AIPreferencePane *)inPane;
|
||||
- (void)removePreferencePane:(AIPreferencePane *)inPane;
|
||||
- (NSArray *)paneArray;
|
||||
- (NSArray *)paneArrayForCategory:(AIPreferenceCategory)paneCategory;
|
||||
|
||||
//Observing
|
||||
- (void)registerPreferenceObserver:(id)observer forGroup:(NSString *)group;
|
||||
- (void)unregisterPreferenceObserver:(id)observer;
|
||||
|
||||
- (void)addObserver:(NSObject *)anObserver forKeyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options context:(void *)context;
|
||||
- (void)addObserver:(NSObject *)anObserver forKeyPath:(NSString *)keyPath ofObject:(AIListObject *)listObject options:(NSKeyValueObservingOptions)options context:(void *)context;
|
||||
|
||||
- (void)informObserversOfChangedKey:(NSString *)key inGroup:(NSString *)group object:(AIListObject *)object;
|
||||
- (void)delayPreferenceChangedNotifications:(BOOL)inDelay;
|
||||
|
||||
//Setting Preferences
|
||||
- (void)setPreference:(id)value forKey:(NSString *)key group:(NSString *)group;
|
||||
- (void)setPreference:(id)value forKey:(NSString *)inKey group:(NSString *)group object:(AIListObject *)object;
|
||||
- (void)setPreferences:(NSDictionary *)inPrefDict inGroup:(NSString *)group;
|
||||
- (void)setPreferences:(NSDictionary *)inPrefDict inGroup:(NSString *)group object:(AIListObject *)object;
|
||||
|
||||
//Retrieving Preferences
|
||||
- (id)preferenceForKey:(NSString *)key group:(NSString *)group;
|
||||
- (id)preferenceForKey:(NSString *)key group:(NSString *)group object:(AIListObject *)object;
|
||||
- (id)preferenceForKey:(NSString *)key group:(NSString *)group objectIgnoringInheritance:(AIListObject *)object;
|
||||
- (NSDictionary *)preferencesForGroup:(NSString *)group;
|
||||
- (id)defaultPreferenceForKey:(NSString *)key group:(NSString *)group object:(AIListObject *)object;
|
||||
|
||||
//Defaults
|
||||
- (void)registerDefaults:(NSDictionary *)defaultDict forGroup:(NSString *)group;
|
||||
- (void)registerDefaults:(NSDictionary *)defaultDict forGroup:(NSString *)group object:(AIListObject *)object;
|
||||
|
||||
//Default download location
|
||||
- (NSString *)userPreferredDownloadFolder;
|
||||
- (void)setUserPreferredDownloadFolder:(NSString *)path;
|
||||
@end
|
||||
|
||||
@interface NSObject (AIPreferenceObserver)
|
||||
- (void)preferencesChangedForGroup:(NSString *)group key:(NSString *)key
|
||||
object:(AIListObject *)object preferenceDict:(NSDictionary *)prefDict firstTime:(BOOL)firstTime;
|
||||
@end
|
|
@ -1,36 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIModularPane.h>
|
||||
#import <Adium/SS_PreferencePaneProtocol.h>
|
||||
|
||||
//Preference Categories
|
||||
typedef enum {
|
||||
AIPref_General = 0,
|
||||
AIPref_Appearance,
|
||||
AIPref_Events,
|
||||
AIPref_Advanced
|
||||
} AIPreferenceCategory;
|
||||
|
||||
@interface AIPreferencePane : AIModularPane <SS_PreferencePaneProtocol> {
|
||||
|
||||
}
|
||||
|
||||
+ (AIPreferencePane *)preferencePane;
|
||||
+ (AIPreferencePane *)preferencePaneForPlugin:(id)inPlugin;
|
||||
- (AIPreferenceCategory)category;
|
||||
|
||||
@end
|
|
@ -1,61 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
@class ESObjectWithProperties, MAZeroingWeakRef;
|
||||
@protocol AIContainingObject;
|
||||
|
||||
@interface AIProxyListObject : NSObject {
|
||||
AIListObject *__weak listObject;
|
||||
ESObjectWithProperties <AIContainingObject> *__weak containingObject;
|
||||
NSString *key;
|
||||
NSString *cachedDisplayNameString;
|
||||
NSAttributedString *cachedDisplayName;
|
||||
NSDictionary *cachedLabelAttributes;
|
||||
NSSize cachedDisplayNameSize;
|
||||
NSString *nick;
|
||||
}
|
||||
@property (nonatomic, copy) NSDictionary *cachedLabelAttributes;
|
||||
@property (nonatomic, strong) NSString *cachedDisplayNameString;
|
||||
@property (nonatomic, strong) NSAttributedString *cachedDisplayName;
|
||||
@property (nonatomic) NSSize cachedDisplayNameSize;
|
||||
|
||||
@property (nonatomic, strong) NSString *key;
|
||||
@property (nonatomic, strong) NSString *nick;
|
||||
|
||||
@property (nonatomic, weak) AIListObject *listObject;
|
||||
@property (nonatomic, weak) ESObjectWithProperties <AIContainingObject> * containingObject;
|
||||
|
||||
+ (AIProxyListObject *)proxyListObjectForListObject:(ESObjectWithProperties *)inListObject
|
||||
inListObject:(ESObjectWithProperties<AIContainingObject> *)containingObject;
|
||||
|
||||
+ (AIProxyListObject *)existingProxyListObjectForListObject:(ESObjectWithProperties *)inListObject
|
||||
inListObject:(ESObjectWithProperties <AIContainingObject>*)inContainingObject;
|
||||
|
||||
+ (AIProxyListObject *)proxyListObjectForListObject:(AIListObject *)inListObject
|
||||
inListObject:(ESObjectWithProperties <AIContainingObject>*)inContainingObject
|
||||
withNick:(NSString *)inNick;
|
||||
|
||||
/*!
|
||||
* @brief Called when an AIListObject is done with an AIProxyListObject to remove it from the global dictionary
|
||||
*/
|
||||
+ (void)releaseProxyObject:(AIProxyListObject *)proxyObject;
|
||||
|
||||
/*!
|
||||
* @brief Clear out cached display information; should be called when the AIProxyListObject may be used later
|
||||
*/
|
||||
- (void)flushCache;
|
||||
|
||||
@end
|
|
@ -1,84 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIServiceIcons.h>
|
||||
|
||||
@class AIAccountViewController, DCJoinChatViewController;
|
||||
|
||||
//Service importance, used to group and order services
|
||||
typedef enum {
|
||||
AIServicePrimary,
|
||||
AIServiceSecondary,
|
||||
AIServiceUnsupported
|
||||
} AIServiceImportance;
|
||||
|
||||
@interface AIService : NSObject {
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
* @brief Called one time to register this service with Adium
|
||||
*
|
||||
* This is typically called by the principal class of a service plugin
|
||||
*/
|
||||
+ (void)registerService;
|
||||
|
||||
//Account Creation
|
||||
- (id)accountWithUID:(NSString *)inUID internalObjectID:(NSString *)inInternalObjectID;
|
||||
@property (unsafe_unretained, readonly, nonatomic) Class accountClass;
|
||||
@property (weak, readonly, nonatomic) AIAccountViewController *accountViewController;
|
||||
@property (unsafe_unretained, readonly, nonatomic) DCJoinChatViewController *joinChatView;
|
||||
|
||||
//Service Description
|
||||
@property (weak, readonly, nonatomic) NSString *serviceCodeUniqueID;
|
||||
@property (weak, readonly, nonatomic) NSString *serviceID;
|
||||
@property (weak, readonly, nonatomic) NSString *serviceClass;
|
||||
@property (weak, readonly, nonatomic) NSString *shortDescription;
|
||||
@property (weak, readonly, nonatomic) NSString *longDescription;
|
||||
@property (weak, readonly, nonatomic) NSString *userNameLabel;
|
||||
@property (weak, readonly, nonatomic) NSString *contactUserNameLabel;
|
||||
@property (weak, readonly, nonatomic) NSString *UIDPlaceholder;
|
||||
@property (weak, readonly, nonatomic) NSURL *serviceAccountSetupURL;
|
||||
@property (weak, readonly, nonatomic) NSString *accountSetupLabel;
|
||||
@property (readonly, nonatomic) AIServiceImportance serviceImportance;
|
||||
- (NSImage *)defaultServiceIconOfType:(AIServiceIconType)iconType;
|
||||
- (NSString *)pathForDefaultServiceIconOfType:(AIServiceIconType)iconType;
|
||||
|
||||
//Service Properties
|
||||
@property (weak, readonly, nonatomic) NSCharacterSet *allowedCharacters;
|
||||
@property (weak, readonly, nonatomic) NSCharacterSet *allowedCharactersForUIDs;
|
||||
@property (weak, readonly, nonatomic) NSCharacterSet *allowedCharactersForAccountName;
|
||||
@property (weak, readonly, nonatomic) NSCharacterSet *ignoredCharacters;
|
||||
@property (readonly, nonatomic) NSUInteger allowedLength;
|
||||
@property (readonly, nonatomic) NSUInteger allowedLengthForUIDs;
|
||||
@property (readonly, nonatomic) NSUInteger allowedLengthForAccountName;
|
||||
@property (readonly, nonatomic) BOOL caseSensitive;
|
||||
@property (readonly, nonatomic) BOOL canCreateGroupChats;
|
||||
@property (readonly, nonatomic) BOOL canRegisterNewAccounts;
|
||||
@property (readonly, nonatomic) BOOL supportsProxySettings;
|
||||
@property (readonly, nonatomic) BOOL supportsPassword;
|
||||
@property (readonly, nonatomic) BOOL requiresPassword;
|
||||
@property (readonly, nonatomic) BOOL isSocialNetworkingService;
|
||||
@property (weak, readonly, nonatomic) NSString *defaultUserName;
|
||||
@property (readonly, nonatomic) BOOL isHidden;
|
||||
|
||||
//Utilities
|
||||
- (NSString *)normalizeUID:(NSString *)inUID removeIgnoredCharacters:(BOOL)removeIgnored;
|
||||
- (NSString *)normalizeChatName:(NSString *)inChatName;
|
||||
|
||||
-(void) registerStatuses;
|
||||
|
||||
@end
|
|
@ -1,47 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
//Notifications
|
||||
#define AIServiceIconSetDidChangeNotification @"AIServiceIconSetDidChangeNotification"
|
||||
|
||||
typedef enum {
|
||||
AIServiceIconSmall = 0, //Interface small
|
||||
AIServiceIconLarge, //Interface large
|
||||
AIServiceIconList //Contact List
|
||||
} AIServiceIconType;
|
||||
#define NUMBER_OF_SERVICE_ICON_TYPES 3
|
||||
|
||||
typedef enum {
|
||||
AIIconNormal = 0,
|
||||
AIIconFlipped
|
||||
} AIIconDirection;
|
||||
#define NUMBER_OF_ICON_DIRECTIONS 2
|
||||
|
||||
@class AIService, AIListObject;
|
||||
|
||||
@interface AIServiceIcons : NSObject {
|
||||
|
||||
}
|
||||
|
||||
+ (NSImage *)serviceIconForObject:(AIListObject *)inObject type:(AIServiceIconType)iconType direction:(AIIconDirection)iconDirection;
|
||||
+ (NSImage *)serviceIconForService:(AIService *)service type:(AIServiceIconType)iconType direction:(AIIconDirection)iconDirection;
|
||||
+ (NSImage *)serviceIconForServiceID:(NSString *)serviceID type:(AIServiceIconType)iconType direction:(AIIconDirection)iconDirection;
|
||||
+ (NSString *)pathForServiceIconForServiceID:(NSString *)serviceID type:(AIServiceIconType)iconType;
|
||||
+ (BOOL)setActiveServiceIconsFromPath:(NSString *)inPath;
|
||||
|
||||
+ (NSImage *)previewMenuImageForIconPackAtPath:(NSString *)inPath;
|
||||
|
||||
@end
|
|
@ -1,32 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
@class AIService;
|
||||
|
||||
@interface AIServiceMenu : NSObject {
|
||||
|
||||
}
|
||||
|
||||
+ (NSMenu *)menuOfServicesWithTarget:(id)target activeServicesOnly:(BOOL)activeServicesOnly
|
||||
longDescription:(BOOL)longDescription format:(NSString *)format;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSObject (AIServiceMenuTarget)
|
||||
- (BOOL)serviceMenuShouldIncludeService:(AIService *)service;
|
||||
- (IBAction)selectServiceType:(id)sender;
|
||||
@end
|
|
@ -1,21 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIAdiumProtocol.h>
|
||||
|
||||
extern id<AIAdium> adium;
|
||||
|
||||
void setSharedAdium(id<AIAdium> shared);
|
|
@ -1,27 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
@class AIAccount;
|
||||
|
||||
@interface AISocialNetworkingStatusMenu : NSObject {
|
||||
|
||||
}
|
||||
|
||||
+ (NSMenuItem *)socialNetworkingSubmenuItem;
|
||||
+ (NSMenu *)socialNetworkingSubmenuForAccount:(AIAccount *)inAccount;
|
||||
|
||||
@end
|
|
@ -1,75 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
@class AIListObject, AIAdium;
|
||||
@protocol AIContainingObject;
|
||||
|
||||
typedef NSComparisonResult(*sortfunc)(id, id, BOOL, id<AIContainingObject>);
|
||||
typedef struct {
|
||||
sortfunc function;
|
||||
__unsafe_unretained id<AIContainingObject> container;
|
||||
} SortContext;
|
||||
|
||||
#define PREF_GROUP_CONTACT_SORTING @"Sorting"
|
||||
|
||||
@interface AISortController : NSSortDescriptor {
|
||||
NSSet *statusKeysRequiringResort;
|
||||
NSSet *attributeKeysRequiringResort;
|
||||
BOOL alwaysSortGroupsToTop;
|
||||
|
||||
sortfunc sortFunction;
|
||||
|
||||
IBOutlet NSView *configureView;
|
||||
|
||||
BOOL becameActiveFirstTime;
|
||||
}
|
||||
|
||||
+ (void) setActiveSortController:(AISortController *)newSortController;
|
||||
+ (AISortController *)activeSortController;
|
||||
+ (void) registerSortController:(AISortController *)newSortController;
|
||||
+ (NSArray *)availableSortControllers;
|
||||
|
||||
- (BOOL)shouldSortForModifiedStatusKeys:(NSSet *)inModifiedKeys;
|
||||
- (BOOL)shouldSortForModifiedAttributeKeys:(NSSet *)inModifiedKeys;
|
||||
@property (readonly, nonatomic) BOOL alwaysSortGroupsToTopByDefault;
|
||||
- (int)indexForInserting:(AIListObject *)inObject intoObjects:(NSArray *)inObjects inContainer:(id<AIContainingObject>)container;
|
||||
@property (weak, readonly, nonatomic) NSView *configureView;
|
||||
- (void)forceIgnoringOfGroups:(BOOL)shouldForce;
|
||||
@property (readonly, nonatomic) BOOL canSortManually;
|
||||
|
||||
//For subclasses to override
|
||||
@property (weak, readonly, nonatomic) NSString *identifier;
|
||||
@property (weak, readonly, nonatomic) NSString *displayName;
|
||||
@property (weak, readonly, nonatomic) NSSet *statusKeysRequiringResort;
|
||||
@property (weak, readonly, nonatomic) NSSet *attributeKeysRequiringResort;
|
||||
@property (readonly, nonatomic) sortfunc sortFunction;
|
||||
@property (weak, readonly, nonatomic) NSString *configureSortMenuItemTitle;
|
||||
@property (weak, readonly, nonatomic) NSString *configureSortWindowTitle;
|
||||
@property (weak, readonly, nonatomic) NSString *configureNibName;
|
||||
- (void)viewDidLoad;
|
||||
- (IBAction)changePreference:(id)sender;
|
||||
- (void)didBecomeActive;
|
||||
- (void)didBecomeActiveFirstTime;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSArray (AdiumSorting)
|
||||
- (NSArray *) sortedArrayUsingActiveSortControllerInContainer:(id<AIContainingObject>)container;
|
||||
@end
|
||||
|
||||
@interface NSMutableArray (AdiumSorting)
|
||||
- (void) sortUsingActiveSortControllerInContainer:(id<AIContainingObject>)container;
|
||||
@end
|
|
@ -1,38 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIControllerProtocol.h>
|
||||
|
||||
#define PREF_GROUP_SOUNDS @"Sounds"
|
||||
#define KEY_SOUND_CUSTOM_VOLUME_LEVEL @"Custom Volume Level"
|
||||
|
||||
@protocol AISoundController <AIController>
|
||||
//Sound
|
||||
- (void)playSoundAtPath:(NSString *)inPath;
|
||||
- (void)stopPlayingSoundAtPath:(NSString *)inPath;
|
||||
|
||||
//Speech
|
||||
- (void)speakDemoTextForVoice:(NSString *)voiceString withPitch:(float)pitch andRate:(float)rate;
|
||||
@property (nonatomic, readonly) float defaultRate;
|
||||
@property (nonatomic, readonly) float defaultPitch;
|
||||
- (void)speakText:(NSString *)text;
|
||||
- (void)speakText:(NSString *)text withVoice:(NSString *)voiceString pitch:(float)pitch rate:(float)rate;
|
||||
|
||||
//Soundsets
|
||||
@property (nonatomic, readonly) NSArray *soundSets;
|
||||
|
||||
- (void)setSoundsAreMuted:(BOOL)muted;
|
||||
@end
|
|
@ -1,30 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
@interface AISoundSet : NSObject {
|
||||
NSString *name;
|
||||
NSString *info;
|
||||
NSDictionary *sounds;
|
||||
|
||||
NSString *sourcePath;
|
||||
}
|
||||
|
||||
+ (id)soundSetWithContentsOfFile:(NSString *)inPath;
|
||||
@property (readonly, nonatomic) NSString *name;
|
||||
@property (readonly, nonatomic) NSString *info;
|
||||
@property (readonly, nonatomic) NSDictionary *sounds;
|
||||
|
||||
@end
|
|
@ -1,71 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIStatusItem.h>
|
||||
|
||||
//Keys used for storage and retrieval
|
||||
#define STATUS_STATUS_MESSAGE @"Status Message NSAttributedString"
|
||||
#define STATUS_HAS_AUTO_REPLY @"Has AutoReply"
|
||||
#define STATUS_AUTO_REPLY_IS_STATUS_MESSAGE @"AutoReply is Status Message"
|
||||
#define STATUS_AUTO_REPLY_MESSAGE @"AutoReply Message NSAttributedString"
|
||||
#define STATUS_STATUS_NAME @"Status Name"
|
||||
#define STATUS_SHOULD_FORCE_INITIAL_IDLE_TIME @"Should Force Initial Idle Time"
|
||||
#define STATUS_FORCED_INITIAL_IDLE_TIME @"Forced Initial Idle Time"
|
||||
#define STATUS_INVISIBLE @"Invisible"
|
||||
#define STATUS_MUTABILITY_TYPE @"Mutability Type"
|
||||
#define STATUS_MUTE_SOUNDS @"Mute Sounds"
|
||||
#define STATUS_SILENCE_GROWL @"Silence Growl"
|
||||
#define STATUS_SPECIAL_TYPE @"Special Type"
|
||||
|
||||
typedef enum {
|
||||
AINoSpecialStatusType = 0,
|
||||
AINowPlayingSpecialStatusType
|
||||
} AISpecialStatusType;
|
||||
|
||||
@interface AIStatus : AIStatusItem {
|
||||
NSString *filteredStatusMessage;
|
||||
}
|
||||
|
||||
+ (AIStatus *)status;
|
||||
+ (AIStatus *)statusWithDictionary:(NSDictionary *)inDictionary;
|
||||
+ (AIStatus *)statusOfType:(AIStatusType)inStatusType;
|
||||
|
||||
@property (readwrite, nonatomic) NSAttributedString *statusMessage;
|
||||
|
||||
@property (readwrite, nonatomic, copy) NSString *statusMessageString;
|
||||
|
||||
- (void)setFilteredStatusMessage:(NSString *)inFilteredStatusMessage;
|
||||
|
||||
- (NSString *)statusMessageTooltipString;
|
||||
|
||||
@property (readwrite, nonatomic) NSAttributedString *autoReply;
|
||||
- (void)setAutoReplyString:(NSString *)autoReplyString;
|
||||
|
||||
@property (readwrite, nonatomic) BOOL hasAutoReply;
|
||||
@property (readwrite, nonatomic) BOOL autoReplyIsStatusMessage;
|
||||
|
||||
@property (readwrite, nonatomic) NSString *statusName;
|
||||
|
||||
@property (readwrite, nonatomic) BOOL shouldForceInitialIdleTime;
|
||||
@property (readwrite, nonatomic) double forcedInitialIdleTime;
|
||||
|
||||
- (void)setMutabilityType:(AIStatusMutabilityType)mutabilityType;
|
||||
|
||||
@property (readwrite, nonatomic) BOOL mutesSound;
|
||||
@property (readwrite, nonatomic) BOOL silencesGrowl;
|
||||
@property (readwrite, nonatomic) AISpecialStatusType specialStatusType;
|
||||
|
||||
@end
|
|
@ -1,148 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIControllerProtocol.h>
|
||||
#import <Adium/AIStatusDefines.h>
|
||||
|
||||
@class AIStatus, AIAccount, AIStatusGroup, AIService;
|
||||
|
||||
//Status State Notifications
|
||||
#define AIStatusStateArrayChangedNotification @"AIStatusStateArrayChangedNotification"
|
||||
#define AIStatusActiveStateChangedNotification @"AIStatusActiveStateChangedNotification"
|
||||
|
||||
//Idle Notifications
|
||||
#define AIMachineIsIdleNotification @"AIMachineIsIdleNotification"
|
||||
#define AIMachineIsActiveNotification @"AIMachineIsActiveNotification"
|
||||
#define AIMachineIdleUpdateNotification @"AIMachineIdleUpdateNotification"
|
||||
|
||||
//Preferences
|
||||
#define PREF_GROUP_SAVED_STATUS @"Saved Status"
|
||||
#define KEY_SAVED_STATUS @"Saved Status Array"
|
||||
|
||||
#define KEY_STATUS_NAME @"Status Name"
|
||||
#define KEY_STATUS_DESCRIPTION @"Status Description"
|
||||
#define KEY_STATUS_TYPE @"Status Type"
|
||||
|
||||
#define PREF_GROUP_STATUS_PREFERENCES @"Status Preferences"
|
||||
#define KEY_STATUS_CONVERSATION_COUNT @"Unread Conversations"
|
||||
#define KEY_STATUS_MENTION_COUNT @"Unread Mentions"
|
||||
#define KEY_STATUS_REPORT_IDLE @"Report Idle"
|
||||
#define KEY_STATUS_REPORT_IDLE_INTERVAL @"Report Idle Interval"
|
||||
#define KEY_STATUS_AUTO_AWAY @"Auto Away"
|
||||
#define KEY_STATUS_AUTO_AWAY_STATUS_STATE_ID @"Auto Away Status State ID"
|
||||
#define KEY_STATUS_FUS @"Fast User Switching Auto Away"
|
||||
#define KEY_STATUS_FUS_STATUS_STATE_ID @"Fast User Switching Status State ID"
|
||||
#define KEY_STATUS_SS @"ScreenSaver Auto Away"
|
||||
#define KEY_STATUS_SS_STATUS_STATE_ID @"ScreenSaver Status State ID"
|
||||
#define KEY_STATUS_AUTO_AWAY_INTERVAL @"Auto Away Interval"
|
||||
|
||||
#define KEY_STATUS_SHOW_STATUS_WINDOW @"Show Status Window"
|
||||
#define KEY_STATUS_STATUS_WINDOW_ON_TOP @"Status Window Always On Top"
|
||||
#define KEY_STATUS_STATUS_WINDOW_HIDE_IN_BACKGROUND @"Status Window Hide in Background"
|
||||
|
||||
//Built-in names and descriptions, which services should use when they support identical or approximately identical states
|
||||
#define STATUS_NAME_AVAILABLE @"Generic Available"
|
||||
#define STATUS_NAME_FREE_FOR_CHAT @"Free for Chat"
|
||||
#define STATUS_NAME_AVAILABLE_FRIENDS_ONLY @"Available for Friends Only"
|
||||
|
||||
#define STATUS_NAME_AWAY @"Generic Away"
|
||||
#define STATUS_NAME_EXTENDED_AWAY @"Extended Away"
|
||||
#define STATUS_NAME_AWAY_FRIENDS_ONLY @"Away for Friends Only"
|
||||
#define STATUS_NAME_DND @"DND"
|
||||
#define STATUS_NAME_NOT_AVAILABLE @"Not Available"
|
||||
#define STATUS_NAME_OCCUPIED @"Occupied"
|
||||
#define STATUS_NAME_BRB @"BRB"
|
||||
#define STATUS_NAME_BUSY @"Busy"
|
||||
#define STATUS_NAME_PHONE @"Phone"
|
||||
#define STATUS_NAME_LUNCH @"Lunch"
|
||||
#define STATUS_NAME_NOT_AT_HOME @"Not At Home"
|
||||
#define STATUS_NAME_NOT_AT_DESK @"Not At Desk"
|
||||
#define STATUS_NAME_NOT_IN_OFFICE @"Not In Office"
|
||||
#define STATUS_NAME_VACATION @"Vacation"
|
||||
#define STATUS_NAME_STEPPED_OUT @"Stepped Out"
|
||||
|
||||
#define STATUS_NAME_INVISIBLE @"Invisible"
|
||||
|
||||
#define STATUS_NAME_OFFLINE @"Offline"
|
||||
|
||||
//Current version state ID string
|
||||
#define STATE_SAVED_STATE @"State"
|
||||
|
||||
@protocol AIStatusController <AIController>
|
||||
/*!
|
||||
* @brief Register a status for a service
|
||||
*
|
||||
* Implementation note: Each AIStatusType has its own NSMutableDictionary, statusDictsByServiceCodeUniqueID.
|
||||
* statusDictsByServiceCodeUniqueID is keyed by serviceCodeUniqueID; each object is an NSMutableSet of NSDictionaries.
|
||||
* Each of these dictionaries has KEY_STATUS_NAME, KEY_STATUS_DESCRIPTION, and KEY_STATUS_TYPE.
|
||||
*
|
||||
* @param statusName A name which will be passed back to accounts of this service. Internal use only. Use the AIStatusController.h \#defines where appropriate.
|
||||
* @param description A human-readable localized description which will be shown to the user. Use the AIStatusController.h \#defines where appropriate.
|
||||
* @param type An AIStatusType, the general type of this status.
|
||||
* @param service The AIService for which to register the status
|
||||
*/
|
||||
- (void)registerStatus:(NSString *)statusName
|
||||
withDescription:(NSString *)description
|
||||
ofType:(AIStatusType)type
|
||||
forService:(AIService *)service;
|
||||
/*!
|
||||
* @brief Generate and return a menu of status types (Away, Be right back, etc.)
|
||||
*
|
||||
* @param service The service for which to return a specific list of types, or nil to return all available types
|
||||
* @param target The target for the menu items, which will have an action of \@selector(selectStatus:)
|
||||
*
|
||||
* @result The menu of statuses, separated by available and away status types
|
||||
*/
|
||||
- (NSMenu *)menuOfStatusesForService:(AIService *)service withTarget:(id)target;
|
||||
|
||||
@property (readonly, nonatomic) NSSet *flatStatusSet;
|
||||
@property (readonly, nonatomic) NSArray *sortedFullStateArray;
|
||||
@property (readonly, nonatomic) AIStatus *offlineStatusState;
|
||||
@property (readonly, nonatomic) AIStatus *availableStatus;
|
||||
@property (readonly, nonatomic) AIStatus *awayStatus;
|
||||
@property (readonly, nonatomic) AIStatus *invisibleStatus;
|
||||
@property (readonly, nonatomic) AIStatus *offlineStatus;
|
||||
- (AIStatus *)statusStateWithUniqueStatusID:(NSNumber *)uniqueStatusID;
|
||||
|
||||
- (void)setActiveStatusState:(AIStatus *)state;
|
||||
- (void)setActiveStatusState:(AIStatus *)state forAccount:(AIAccount *)account;
|
||||
- (void)setDelayStatusMenuRebuilding:(BOOL)shouldDelay;
|
||||
- (void)applyState:(AIStatus *)statusState toAccounts:(NSArray *)accountArray;
|
||||
@property (readonly, nonatomic) AIStatus *activeStatusState;
|
||||
- (NSSet *)allActiveStatusStates;
|
||||
- (AIStatusType)activeStatusTypeTreatingInvisibleAsAway:(BOOL)invisibleIsAway;
|
||||
- (NSSet *)activeUnavailableStatusesAndType:(AIStatusType *)activeUnvailableStatusType
|
||||
withName:(NSString **)activeUnvailableStatusName
|
||||
allOnlineAccountsAreUnvailable:(BOOL *)allOnlineAccountsAreUnvailable;
|
||||
- (AIStatus *)defaultInitialStatusState;
|
||||
|
||||
- (NSString *)descriptionForStateOfStatus:(AIStatus *)statusState;
|
||||
- (NSString *)localizedDescriptionForCoreStatusName:(NSString *)statusName;
|
||||
- (NSString *)localizedDescriptionForStatusName:(NSString *)statusName statusType:(AIStatusType)statusType;
|
||||
- (NSString *)defaultStatusNameForType:(AIStatusType)statusType;
|
||||
|
||||
//State Editing
|
||||
- (void)addStatusState:(AIStatus *)state;
|
||||
- (void)removeStatusState:(AIStatus *)state;
|
||||
- (void)statusStateDidSetUniqueStatusID;
|
||||
|
||||
//State menu support
|
||||
- (void)setDelayActiveStatusUpdates:(BOOL)shouldDelay;
|
||||
- (BOOL)removeIfNecessaryTemporaryStatusState:(AIStatus *)originalState;
|
||||
- (AIStatusGroup *)rootStateGroup;
|
||||
|
||||
- (void)savedStatusesChanged;
|
||||
@end
|
|
@ -1,41 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
typedef enum {
|
||||
AIAvailableStatusType = 0, /* Must be first in the enum */
|
||||
AIAwayStatusType,
|
||||
AIInvisibleStatusType,
|
||||
AIOfflineStatusType
|
||||
} AIStatusType;
|
||||
#define STATUS_TYPES_COUNT 4
|
||||
|
||||
//Mutability types
|
||||
typedef enum {
|
||||
AIEditableStatusState = 0, /* A user created state which can be modified -- the default, should be 0 */
|
||||
AILockedStatusState, /* A state which is built into Adium and can not be modified */
|
||||
AITemporaryEditableStatusState, /* A user created state which is not part of the permanent stored state array */
|
||||
AISecondaryLockedStatusState /* A state which is managed by Adium and grouped separately from other states of the same type */
|
||||
} AIStatusMutabilityType;
|
||||
|
||||
typedef enum {
|
||||
AIAvailableStatusTypeAS = 'Sonl',
|
||||
AIAwayStatusTypeAS = 'Sawy',
|
||||
AIInvisibleStatusTypeAS = 'Sinv',
|
||||
AIOfflineStatusTypeAS = 'Soff'
|
||||
} AIStatusTypeApplescript;
|
||||
|
||||
#define STATUS_UNIQUE_ID @"Unique ID"
|
||||
#define STATUS_TITLE @"Title"
|
||||
#define STATUS_STATUS_TYPE @"Status Type"
|
|
@ -1,50 +0,0 @@
|
|||
/*
|
||||
* Adium is the legal property of its developers, whose names are listed in the copyright file included
|
||||
* with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program; if not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Adium/AIStatusItem.h>
|
||||
|
||||
@class AIStatus;
|
||||
|
||||
@interface AIStatusGroup : AIStatusItem {
|
||||
NSMutableArray *containedStatusItems;
|
||||
NSMutableSet *_flatStatusSet;
|
||||
NSArray *_sortedContainedStatusItems;
|
||||
|
||||
int delaySavingAndNotification;
|
||||
}
|
||||
|
||||
+ (id)statusGroup;
|
||||
+ (id)statusGroupWithContainedStatusItems:(NSArray *)inContainedObjects;
|
||||
|
||||
- (void)setContainedStatusItems:(NSArray *)inContainedStatusItems;
|
||||
|
||||
- (void)addStatusItem:(AIStatusItem *)inStatusItem atIndex:(NSUInteger)index;
|
||||
- (void)removeStatusItem:(AIStatusItem *)inStatusItem;
|
||||
- (NSUInteger)moveStatusItem:(AIStatusItem *)statusState toIndex:(NSUInteger)destIndex;
|
||||
- (void)replaceExistingStatusState:(AIStatus *)oldStatusState withStatusState:(AIStatus *)newStatusState;
|
||||
|
||||
- (NSArray *)containedStatusItems;
|
||||
- (AIStatus *)anyContainedStatus;
|
||||
- (NSSet *)flatStatusSet;
|
||||
- (NSMenu *)statusSubmenuNotifyingTarget:(id)target action:(SEL)selector;
|
||||
|
||||
- (void)setDelaySavingAndNotification:(BOOL)inShouldDelay;
|
||||
- (BOOL)enclosesStatusState:(AIStatus *)inStatusState;
|
||||
- (BOOL)enclosesStatusStateInSet:(NSSet *)inSet;
|
||||
|
||||
+ (void)sortArrayOfStatusItems:(NSMutableArray *)inArray context:(void *)context;
|
||||
|
||||
@end
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue