Frameworks/Adium Framework/Source/AIChatControllerProtocol.h
author Thijs Alkemade <thijsalkemade@gmail.com>
Sat Aug 28 22:01:12 2010 +0200 (21 months ago)
changeset 3277 21ab21e877e0
parent 2472 724bdc7a81eb
child 3679 f4294bb53b0f
permissions -rw-r--r--
Add a Reopen Closed Tab menu item to the File menu that will restore the most recently closed tab, similar to Chrome. Fixes #12537

Does not work with MSN group chats (and probably other protocols that have unnamed MUCs).

r=wix
     1 /*
     2  *  AIChatControllerProtocol.h
     3  *  Adium
     4  *
     5  *  Created by Evan Schoenberg on 7/31/06.
     6  *
     7  */
     8 
     9 #import <Adium/AIControllerProtocol.h>
    10 
    11 @protocol AIChatController_Private;
    12 @class AIChat, AIAccount, AIListContact;
    13 
    14 //Observer which receives notifications of changes in chat status
    15 @protocol AIChatObserver
    16 - (NSSet *)updateChat:(AIChat *)inChat keys:(NSSet *)inModifiedKeys silent:(BOOL)silent;
    17 @end
    18 
    19 @protocol AIChatController <AIController, AIChatController_Private>
    20 //Chats
    21 - (NSSet *)allChatsWithContact:(AIListContact *)inContact;
    22 - (NSSet *)allGroupChatsContainingContact:(AIListContact *)inContact;
    23 - (AIChat *)openChatWithContact:(AIListContact *)inContact onPreferredAccount:(BOOL)onPreferredAccount;
    24 - (AIChat *)chatWithContact:(AIListContact *)inContact;
    25 - (AIChat *)existingChatWithContact:(AIListContact *)inContact;
    26 - (AIChat *)existingChatWithUniqueChatID:(NSString *)uniqueChatID;
    27 - (AIChat *)chatWithName:(NSString *)inName 
    28 			  identifier:(id)identifier
    29 			   onAccount:(AIAccount *)account
    30 		chatCreationInfo:(NSDictionary *)chatCreationInfo;
    31 
    32 - (AIChat *)existingChatWithIdentifier:(id)identifier onAccount:(AIAccount *)account;
    33 - (AIChat *)existingChatWithName:(NSString *)name onAccount:(AIAccount *)account;
    34 
    35 - (BOOL)closeChat:(AIChat *)inChat;
    36 - (void)accountDidCloseChat:(AIChat *)inChat;
    37 - (void)restoreChat:(AIChat *)inChat;
    38 
    39 @property (nonatomic, readonly) NSSet *openChats;
    40 @property (nonatomic, readonly) AIChat *mostRecentUnviewedChat;
    41 @property (nonatomic, readonly) NSUInteger unviewedContentCount;
    42 @property (nonatomic, readonly) NSUInteger unviewedConversationCount;
    43 
    44 - (void)switchChat:(AIChat *)chat toAccount:(AIAccount *)newAccount;
    45 - (void)switchChat:(AIChat *)chat toListContact:(AIListContact *)inContact usingContactAccount:(BOOL)useContactAccount;
    46 - (BOOL)contactIsInGroupChat:(AIListContact *)listContact;
    47 
    48 	//Status
    49 - (void)registerChatObserver:(id <AIChatObserver>)inObserver;
    50 - (void)unregisterChatObserver:(id <AIChatObserver>)inObserver;
    51 - (void)updateAllChatsForObserver:(id <AIChatObserver>)observer;
    52 
    53 	//Addition/removal of contacts to group chats
    54 - (void)chat:(AIChat *)chat addedListContacts:(NSArray *)contacts notify:(BOOL)notify;
    55 - (void)chat:(AIChat *)chat removedListContact:(AIListContact *)inContact;
    56 
    57 - (NSString *)defaultInvitationMessageForRoom:(NSString *)room account:(AIAccount *)inAccount;
    58 @end
    59 
    60 @protocol AIChatController_Private
    61 - (void)chatStatusChanged:(AIChat *)inChat modifiedStatusKeys:(NSSet *)inModifiedKeys silent:(BOOL)silent;
    62 @end