| 1 |
#import "JVChatTranscript.h" |
|---|
| 2 |
#import "KAIgnoreRule.h" |
|---|
| 3 |
|
|---|
| 4 |
typedef enum _JVChatMessageType { |
|---|
| 5 |
JVChatMessageNormalType = 'noMt', |
|---|
| 6 |
JVChatMessageNoticeType = 'nTMt' |
|---|
| 7 |
} JVChatMessageType; |
|---|
| 8 |
|
|---|
| 9 |
@interface JVChatMessage : NSObject <NSMutableCopying, JVChatTranscriptElement> { |
|---|
| 10 |
@public |
|---|
| 11 |
void *_node; |
|---|
| 12 |
void *_doc; |
|---|
| 13 |
NSString *_messageIdentifier; |
|---|
| 14 |
NSScriptObjectSpecifier *_objectSpecifier; |
|---|
| 15 |
JVChatTranscript *_transcript; |
|---|
| 16 |
|
|---|
| 17 |
id _senderIdentifier; |
|---|
| 18 |
NSString *_senderName; |
|---|
| 19 |
NSString *_senderNickname; |
|---|
| 20 |
NSString *_senderHostmask; |
|---|
| 21 |
NSString *_senderClass; |
|---|
| 22 |
NSString *_senderBuddyIdentifier; |
|---|
| 23 |
|
|---|
| 24 |
NSTextStorage *_attributedMessage; |
|---|
| 25 |
NSDate *_date; |
|---|
| 26 |
NSURL *_source; |
|---|
| 27 |
JVIgnoreMatchResult _ignoreStatus; |
|---|
| 28 |
JVChatMessageType _type; |
|---|
| 29 |
unsigned _consecutiveOffset; |
|---|
| 30 |
BOOL _senderIsLocalUser; |
|---|
| 31 |
BOOL _action; |
|---|
| 32 |
BOOL _highlighted; |
|---|
| 33 |
BOOL _loaded; |
|---|
| 34 |
BOOL _bodyLoaded; |
|---|
| 35 |
BOOL _senderLoaded; |
|---|
| 36 |
NSMutableDictionary *_attributes; |
|---|
| 37 |
} |
|---|
| 38 |
- ( void *) node; |
|---|
| 39 |
|
|---|
| 40 |
- (NSDate *) date; |
|---|
| 41 |
|
|---|
| 42 |
- (unsigned) consecutiveOffset; |
|---|
| 43 |
|
|---|
| 44 |
- (NSString *) senderName; |
|---|
| 45 |
- (NSString *) senderIdentifier; |
|---|
| 46 |
- (NSString *) senderNickname; |
|---|
| 47 |
- (NSString *) senderHostmask; |
|---|
| 48 |
- (NSString *) senderClass; |
|---|
| 49 |
- (NSString *) senderBuddyIdentifier; |
|---|
| 50 |
- (BOOL) senderIsLocalUser; |
|---|
| 51 |
|
|---|
| 52 |
- (NSTextStorage *) body; |
|---|
| 53 |
- (NSString *) bodyAsPlainText; |
|---|
| 54 |
- (NSString *) bodyAsHTML; |
|---|
| 55 |
|
|---|
| 56 |
- (BOOL) isAction; |
|---|
| 57 |
- (BOOL) isHighlighted; |
|---|
| 58 |
- (JVIgnoreMatchResult) ignoreStatus; |
|---|
| 59 |
- (JVChatMessageType) type; |
|---|
| 60 |
|
|---|
| 61 |
- (NSURL *) source; |
|---|
| 62 |
- (JVChatTranscript *) transcript; |
|---|
| 63 |
- (NSString *) messageIdentifier; |
|---|
| 64 |
|
|---|
| 65 |
- (NSScriptObjectSpecifier *) objectSpecifier; |
|---|
| 66 |
- (void) setObjectSpecifier:(NSScriptObjectSpecifier *) objectSpecifier; |
|---|
| 67 |
|
|---|
| 68 |
- (NSDictionary *) attributes; |
|---|
| 69 |
- (id) attributeForKey:(id) key; |
|---|
| 70 |
@end |
|---|
| 71 |
|
|---|
| 72 |
@interface JVMutableChatMessage : JVChatMessage { |
|---|
| 73 |
@protected |
|---|
| 74 |
id _sender; |
|---|
| 75 |
} |
|---|
| 76 |
+ (id) messageWithText:(id) body sender:(id) sender; |
|---|
| 77 |
- (id) initWithText:(id) body sender:(id) sender; |
|---|
| 78 |
|
|---|
| 79 |
- (void) setDate:(NSDate *) date; |
|---|
| 80 |
|
|---|
| 81 |
- (id) sender; |
|---|
| 82 |
- (void) setSender:(id) sender; |
|---|
| 83 |
|
|---|
| 84 |
- (void) setBody:(id) message; |
|---|
| 85 |
- (void) setBodyAsPlainText:(NSString *) message; |
|---|
| 86 |
- (void) setBodyAsHTML:(NSString *) message; |
|---|
| 87 |
|
|---|
| 88 |
- (void) setAction:(BOOL) action; |
|---|
| 89 |
- (void) setHighlighted:(BOOL) highlighted; |
|---|
| 90 |
- (void) setIgnoreStatus:(JVIgnoreMatchResult) ignoreStatus; |
|---|
| 91 |
- (void) setType:(JVChatMessageType) type; |
|---|
| 92 |
|
|---|
| 93 |
- (void) setSource:(NSURL *) source; |
|---|
| 94 |
- (void) setMessageIdentifier:(NSString *) identifier; |
|---|
| 95 |
|
|---|
| 96 |
- (NSMutableDictionary *) attributes; |
|---|
| 97 |
- (void) setAttributes:(NSDictionary *) attributes; |
|---|
| 98 |
- (void) setAttribute:(id) object forKey:(id) key; |
|---|
| 99 |
@end |
|---|