iChatBridge.h
author Jens Alfke <jens@mooseyard.com>
Fri May 02 12:49:43 2008 -0700 (2008-05-02)
changeset 7 59addced5e2a
permissions -rw-r--r--
Added URLUtils. Rewrote Target.
jens@0
     1
/*
jens@0
     2
 * iChat.h
jens@0
     3
 */
jens@0
     4
jens@0
     5
#import <AppKit/AppKit.h>
jens@0
     6
#import <ScriptingBridge/ScriptingBridge.h>
jens@0
     7
jens@0
     8
jens@0
     9
@class iChatItem, iChatApplication, iChatColor, iChatDocument, iChatWindow, iChatRichText, iChatCharacter, iChatParagraph, iChatWord, iChatAttributeRun, iChatAttachment, iChatApplication, iChatBuddy, iChatService, iChatChat, iChatTextChat, iChatAudioChat, iChatVideoChat, iChatFileTransfer;
jens@0
    10
jens@0
    11
typedef enum {
jens@0
    12
	iChatSaveOptionsYes = 'yes ' /* Save the file. */,
jens@0
    13
	iChatSaveOptionsNo = 'no  ' /* Do not save the file. */,
jens@0
    14
	iChatSaveOptionsAsk = 'ask ' /* Ask the user whether or not to save the file. */
jens@0
    15
} iChatSaveOptions;
jens@0
    16
jens@0
    17
typedef enum {
jens@0
    18
	iChatInviteTypeAudioInvitation = 'acon',
jens@0
    19
	iChatInviteTypeTextChatInvitation = 'tcon',
jens@0
    20
	iChatInviteTypeVideoInvitation = 'vcon'
jens@0
    21
} iChatInviteType;
jens@0
    22
jens@0
    23
typedef enum {
jens@0
    24
	iChatAccountStatusAvailable = 'aval',
jens@0
    25
	iChatAccountStatusAway = 'away',
jens@0
    26
	iChatAccountStatusOffline = 'offl',
jens@0
    27
	iChatAccountStatusInvisible = 'invs',
jens@0
    28
	iChatAccountStatusIdle = 'idle',
jens@0
    29
	iChatAccountStatusUnknown = 'unkn'
jens@0
    30
} iChatAccountStatus;
jens@0
    31
jens@0
    32
typedef enum {
jens@0
    33
	iChatMyStatusAway = 'away',
jens@0
    34
	iChatMyStatusAvailable = 'aval',
jens@0
    35
	iChatMyStatusOffline = 'offl',
jens@0
    36
	iChatMyStatusInvisible = 'invs'
jens@0
    37
} iChatMyStatus;
jens@0
    38
jens@0
    39
typedef enum {
jens@0
    40
	iChatConnectionStatusDisconnecting = 'dcng',
jens@0
    41
	iChatConnectionStatusConnected = 'conn',
jens@0
    42
	iChatConnectionStatusConnecting = 'cong',
jens@0
    43
	iChatConnectionStatusDisconnected = 'dcon'
jens@0
    44
} iChatConnectionStatus;
jens@0
    45
jens@0
    46
typedef enum {
jens@0
    47
	iChatCapabilitiesVideoChat = 'vcon',
jens@0
    48
	iChatCapabilitiesAudioChat = 'acon',
jens@0
    49
	iChatCapabilitiesMultipersonVideo = 'mwvc',
jens@0
    50
	iChatCapabilitiesMultipersonAudio = 'mwac'
jens@0
    51
} iChatCapabilities;
jens@0
    52
jens@0
    53
typedef enum {
jens@0
    54
	iChatScreenSharingNone = 'ssns',
jens@0
    55
	iChatScreenSharingLocalScreen = 'ssls',
jens@0
    56
	iChatScreenSharingRemoteScreen = 'ssrs'
jens@0
    57
} iChatScreenSharing;
jens@0
    58
jens@0
    59
typedef enum {
jens@0
    60
	iChatServiceTypeAIM = 'saim',
jens@0
    61
	iChatServiceTypeBonjour = 'ssub',
jens@0
    62
	iChatServiceTypeJabber = 'sjab'
jens@0
    63
} iChatServiceType;
jens@0
    64
jens@0
    65
typedef enum {
jens@0
    66
	iChatDirectionIncoming = 'FTic',
jens@0
    67
	iChatDirectionOutgoing = 'FTog'
jens@0
    68
} iChatDirection;
jens@0
    69
jens@0
    70
typedef enum {
jens@0
    71
	iChatTransferStatusPreparing = 'FTsp',
jens@0
    72
	iChatTransferStatusWaiting = 'FTsw',
jens@0
    73
	iChatTransferStatusTransferring = 'FTsg',
jens@0
    74
	iChatTransferStatusFinalizing = 'FTsz',
jens@0
    75
	iChatTransferStatusFinished = 'FTsf',
jens@0
    76
	iChatTransferStatusFailed = 'FTse'
jens@0
    77
} iChatTransferStatus;
jens@0
    78
jens@0
    79
typedef enum {
jens@0
    80
	iChatAvTypeAudio = 'ICAa',
jens@0
    81
	iChatAvTypeVideo = 'ICAv'
jens@0
    82
} iChatAvType;
jens@0
    83
jens@0
    84
typedef enum {
jens@0
    85
	iChatChatTypeInstantMessage = 'ICim',
jens@0
    86
	iChatChatTypeDirectInstantMessage = 'ICdi',
jens@0
    87
	iChatChatTypeChatRoom = 'ICcr'
jens@0
    88
} iChatChatType;
jens@0
    89
jens@0
    90
typedef enum {
jens@0
    91
	iChatJoinStateNotJoined = 'ICJc',
jens@0
    92
	iChatJoinStateJoining = 'ICJg',
jens@0
    93
	iChatJoinStateJoined = 'ICJj'
jens@0
    94
} iChatJoinState;
jens@0
    95
jens@0
    96
typedef enum {
jens@0
    97
	iChatAvConnectionStatusInvited = 'ICAi',
jens@0
    98
	iChatAvConnectionStatusWaiting = 'ICAw',
jens@0
    99
	iChatAvConnectionStatusConnecting = 'ICAx',
jens@0
   100
	iChatAvConnectionStatusConnected = 'ICAc',
jens@0
   101
	iChatAvConnectionStatusEnded = 'ICAn'
jens@0
   102
} iChatAvConnectionStatus;
jens@0
   103
jens@0
   104
jens@0
   105
jens@0
   106
/*
jens@0
   107
 * Standard Suite
jens@0
   108
 */
jens@0
   109
jens@0
   110
// A scriptable object.
jens@0
   111
@interface iChatItem : SBObject
jens@0
   112
jens@0
   113
@property (copy) NSDictionary *properties;  // All of the object's properties.
jens@0
   114
jens@0
   115
- (void) closeSaving:(iChatSaveOptions)saving savingIn:(NSURL *)savingIn;  // Close a document.
jens@0
   116
- (void) saveIn:(NSURL *)in_ as:(NSString *)as;  // Save a document.
jens@0
   117
- (void) delete;  // Delete an object.
jens@0
   118
- (SBObject *) duplicateTo:(SBObject *)to withProperties:(NSDictionary *)withProperties;  // Copy object(s) and put the copies at a new location.
jens@0
   119
- (BOOL) exists;  // Verify if an object exists.
jens@0
   120
- (SBObject *) moveTo:(SBObject *)to;  // Move object(s) to a new location.
jens@0
   121
jens@0
   122
@end
jens@0
   123
jens@0
   124
// The application's top-level scripting object.
jens@0
   125
@interface iChatApplication : SBApplication
jens@0
   126
jens@0
   127
- (SBElementArray *) documents;
jens@0
   128
- (SBElementArray *) windows;
jens@0
   129
jens@0
   130
@property (copy, readonly) NSString *name;  // The name of the application.
jens@0
   131
@property (readonly) BOOL frontmost;  // Is this the frontmost (active) application?
jens@0
   132
@property (copy, readonly) NSString *version;  // The version of the application.
jens@0
   133
jens@0
   134
- (void) open:(NSArray *)x;  // Open a document.
jens@0
   135
- (void) print:(NSURL *)x;  // Print an object.
jens@0
   136
- (void) quitSaving:(iChatSaveOptions)saving;  // Quit the application.
jens@0
   137
- (void) invite:(NSArray *)x to:(id)to withMessage:(NSString *)withMessage;  // Invites a buddy to join an existing chat.
jens@0
   138
- (void) logIn;  // Log in to the specified service, or all services if none is specified. If the account password is not in the keychain the user will be prompted to enter one.
jens@0
   139
- (void) logOut;  // Logs out of a service, or all services if none is specified.
jens@0
   140
- (void) send:(id)x to:(id)to;  // Sends a message or file to a buddy or to a chat.
jens@0
   141
- (void) storeRecentPicture;  // Stores the currently set buddy picture into your recent pictures.
jens@0
   142
- (void) showChatChooserFor:(iChatBuddy *)for_;  // displays a dialog in iChat to start a new chat with the specified buddy
jens@0
   143
jens@0
   144
@end
jens@0
   145
jens@0
   146
// A color.
jens@0
   147
@interface iChatColor : SBObject
jens@0
   148
jens@0
   149
- (void) closeSaving:(iChatSaveOptions)saving savingIn:(NSURL *)savingIn;  // Close a document.
jens@0
   150
- (void) saveIn:(NSURL *)in_ as:(NSString *)as;  // Save a document.
jens@0
   151
- (void) delete;  // Delete an object.
jens@0
   152
- (SBObject *) duplicateTo:(SBObject *)to withProperties:(NSDictionary *)withProperties;  // Copy object(s) and put the copies at a new location.
jens@0
   153
- (BOOL) exists;  // Verify if an object exists.
jens@0
   154
- (SBObject *) moveTo:(SBObject *)to;  // Move object(s) to a new location.
jens@0
   155
jens@0
   156
@end
jens@0
   157
jens@0
   158
// An iChat document.
jens@0
   159
@interface iChatDocument : SBObject
jens@0
   160
jens@0
   161
@property (copy, readonly) NSString *name;  // The document's name.
jens@0
   162
@property (readonly) BOOL modified;  // Has the document been modified since the last save?
jens@0
   163
@property (copy, readonly) NSURL *file;  // The document's location on disk.
jens@0
   164
jens@0
   165
- (void) closeSaving:(iChatSaveOptions)saving savingIn:(NSURL *)savingIn;  // Close a document.
jens@0
   166
- (void) saveIn:(NSURL *)in_ as:(NSString *)as;  // Save a document.
jens@0
   167
- (void) delete;  // Delete an object.
jens@0
   168
- (SBObject *) duplicateTo:(SBObject *)to withProperties:(NSDictionary *)withProperties;  // Copy object(s) and put the copies at a new location.
jens@0
   169
- (BOOL) exists;  // Verify if an object exists.
jens@0
   170
- (SBObject *) moveTo:(SBObject *)to;  // Move object(s) to a new location.
jens@0
   171
jens@0
   172
@end
jens@0
   173
jens@0
   174
// A window.
jens@0
   175
@interface iChatWindow : SBObject
jens@0
   176
jens@0
   177
@property (copy, readonly) NSString *name;  // The full title of the window.
jens@0
   178
- (NSInteger) id;  // The unique identifier of the window.
jens@0
   179
@property NSInteger index;  // The index of the window, ordered front to back.
jens@0
   180
@property NSRect bounds;  // The bounding rectangle of the window.
jens@0
   181
@property (readonly) BOOL closeable;  // Whether the window has a close box.
jens@0
   182
@property (readonly) BOOL minimizable;  // Whether the window can be minimized.
jens@0
   183
@property BOOL minimized;  // Whether the window is currently minimized.
jens@0
   184
@property (readonly) BOOL resizable;  // Whether the window can be resized.
jens@0
   185
@property BOOL visible;  // Whether the window is currently visible.
jens@0
   186
@property (readonly) BOOL zoomable;  // Whether the window can be zoomed.
jens@0
   187
@property BOOL zoomed;  // Whether the window is currently zoomed.
jens@0
   188
@property (copy, readonly) iChatDocument *document;  // The document whose contents are being displayed in the window.
jens@0
   189
jens@0
   190
- (void) closeSaving:(iChatSaveOptions)saving savingIn:(NSURL *)savingIn;  // Close a document.
jens@0
   191
- (void) saveIn:(NSURL *)in_ as:(NSString *)as;  // Save a document.
jens@0
   192
- (void) delete;  // Delete an object.
jens@0
   193
- (SBObject *) duplicateTo:(SBObject *)to withProperties:(NSDictionary *)withProperties;  // Copy object(s) and put the copies at a new location.
jens@0
   194
- (BOOL) exists;  // Verify if an object exists.
jens@0
   195
- (SBObject *) moveTo:(SBObject *)to;  // Move object(s) to a new location.
jens@0
   196
jens@0
   197
@end
jens@0
   198
jens@0
   199
jens@0
   200
jens@0
   201
/*
jens@0
   202
 * Text Suite
jens@0
   203
 */
jens@0
   204
jens@0
   205
// Rich (styled) text
jens@0
   206
@interface iChatRichText : SBObject
jens@0
   207
jens@0
   208
- (SBElementArray *) characters;
jens@0
   209
- (SBElementArray *) paragraphs;
jens@0
   210
- (SBElementArray *) words;
jens@0
   211
- (SBElementArray *) attributeRuns;
jens@0
   212
- (SBElementArray *) attachments;
jens@0
   213
jens@0
   214
@property (copy) NSColor *color;  // The color of the first character.
jens@0
   215
@property (copy) NSString *font;  // The name of the font of the first character.
jens@0
   216
@property double size;  // The size in points of the first character.
jens@0
   217
jens@0
   218
- (void) closeSaving:(iChatSaveOptions)saving savingIn:(NSURL *)savingIn;  // Close a document.
jens@0
   219
- (void) saveIn:(NSURL *)in_ as:(NSString *)as;  // Save a document.
jens@0
   220
- (void) delete;  // Delete an object.
jens@0
   221
- (SBObject *) duplicateTo:(SBObject *)to withProperties:(NSDictionary *)withProperties;  // Copy object(s) and put the copies at a new location.
jens@0
   222
- (BOOL) exists;  // Verify if an object exists.
jens@0
   223
- (SBObject *) moveTo:(SBObject *)to;  // Move object(s) to a new location.
jens@0
   224
jens@0
   225
@end
jens@0
   226
jens@0
   227
// This subdivides the text into characters.
jens@0
   228
@interface iChatCharacter : SBObject
jens@0
   229
jens@0
   230
- (SBElementArray *) characters;
jens@0
   231
- (SBElementArray *) paragraphs;
jens@0
   232
- (SBElementArray *) words;
jens@0
   233
- (SBElementArray *) attributeRuns;
jens@0
   234
- (SBElementArray *) attachments;
jens@0
   235
jens@0
   236
@property (copy) NSColor *color;  // The color of the first character.
jens@0
   237
@property (copy) NSString *font;  // The name of the font of the first character.
jens@0
   238
@property NSInteger size;  // The size in points of the first character.
jens@0
   239
jens@0
   240
- (void) closeSaving:(iChatSaveOptions)saving savingIn:(NSURL *)savingIn;  // Close a document.
jens@0
   241
- (void) saveIn:(NSURL *)in_ as:(NSString *)as;  // Save a document.
jens@0
   242
- (void) delete;  // Delete an object.
jens@0
   243
- (SBObject *) duplicateTo:(SBObject *)to withProperties:(NSDictionary *)withProperties;  // Copy object(s) and put the copies at a new location.
jens@0
   244
- (BOOL) exists;  // Verify if an object exists.
jens@0
   245
- (SBObject *) moveTo:(SBObject *)to;  // Move object(s) to a new location.
jens@0
   246
jens@0
   247
@end
jens@0
   248
jens@0
   249
// This subdivides the text into paragraphs.
jens@0
   250
@interface iChatParagraph : SBObject
jens@0
   251
jens@0
   252
- (SBElementArray *) characters;
jens@0
   253
- (SBElementArray *) paragraphs;
jens@0
   254
- (SBElementArray *) words;
jens@0
   255
- (SBElementArray *) attributeRuns;
jens@0
   256
- (SBElementArray *) attachments;
jens@0
   257
jens@0
   258
@property (copy) NSColor *color;  // The color of the first character.
jens@0
   259
@property (copy) NSString *font;  // The name of the font of the first character.
jens@0
   260
@property NSInteger size;  // The size in points of the first character.
jens@0
   261
jens@0
   262
- (void) closeSaving:(iChatSaveOptions)saving savingIn:(NSURL *)savingIn;  // Close a document.
jens@0
   263
- (void) saveIn:(NSURL *)in_ as:(NSString *)as;  // Save a document.
jens@0
   264
- (void) delete;  // Delete an object.
jens@0
   265
- (SBObject *) duplicateTo:(SBObject *)to withProperties:(NSDictionary *)withProperties;  // Copy object(s) and put the copies at a new location.
jens@0
   266
- (BOOL) exists;  // Verify if an object exists.
jens@0
   267
- (SBObject *) moveTo:(SBObject *)to;  // Move object(s) to a new location.
jens@0
   268
jens@0
   269
@end
jens@0
   270
jens@0
   271
// This subdivides the text into words.
jens@0
   272
@interface iChatWord : SBObject
jens@0
   273
jens@0
   274
- (SBElementArray *) characters;
jens@0
   275
- (SBElementArray *) paragraphs;
jens@0
   276
- (SBElementArray *) words;
jens@0
   277
- (SBElementArray *) attributeRuns;
jens@0
   278
- (SBElementArray *) attachments;
jens@0
   279
jens@0
   280
@property (copy) NSColor *color;  // The color of the first character.
jens@0
   281
@property (copy) NSString *font;  // The name of the font of the first character.
jens@0
   282
@property NSInteger size;  // The size in points of the first character.
jens@0
   283
jens@0
   284
- (void) closeSaving:(iChatSaveOptions)saving savingIn:(NSURL *)savingIn;  // Close a document.
jens@0
   285
- (void) saveIn:(NSURL *)in_ as:(NSString *)as;  // Save a document.
jens@0
   286
- (void) delete;  // Delete an object.
jens@0
   287
- (SBObject *) duplicateTo:(SBObject *)to withProperties:(NSDictionary *)withProperties;  // Copy object(s) and put the copies at a new location.
jens@0
   288
- (BOOL) exists;  // Verify if an object exists.
jens@0
   289
- (SBObject *) moveTo:(SBObject *)to;  // Move object(s) to a new location.
jens@0
   290
jens@0
   291
@end
jens@0
   292
jens@0
   293
// This subdivides the text into chunks that all have the same attributes.
jens@0
   294
@interface iChatAttributeRun : SBObject
jens@0
   295
jens@0
   296
- (SBElementArray *) characters;
jens@0
   297
- (SBElementArray *) paragraphs;
jens@0
   298
- (SBElementArray *) words;
jens@0
   299
- (SBElementArray *) attributeRuns;
jens@0
   300
- (SBElementArray *) attachments;
jens@0
   301
jens@0
   302
@property (copy) NSColor *color;  // The color of the first character.
jens@0
   303
@property (copy) NSString *font;  // The name of the font of the first character.
jens@0
   304
@property NSInteger size;  // The size in points of the first character.
jens@0
   305
jens@0
   306
- (void) closeSaving:(iChatSaveOptions)saving savingIn:(NSURL *)savingIn;  // Close a document.
jens@0
   307
- (void) saveIn:(NSURL *)in_ as:(NSString *)as;  // Save a document.
jens@0
   308
- (void) delete;  // Delete an object.
jens@0
   309
- (SBObject *) duplicateTo:(SBObject *)to withProperties:(NSDictionary *)withProperties;  // Copy object(s) and put the copies at a new location.
jens@0
   310
- (BOOL) exists;  // Verify if an object exists.
jens@0
   311
- (SBObject *) moveTo:(SBObject *)to;  // Move object(s) to a new location.
jens@0
   312
jens@0
   313
@end
jens@0
   314
jens@0
   315
// Represents an inline text attachment. This class is used mainly for make commands.
jens@0
   316
@interface iChatAttachment : iChatRichText
jens@0
   317
jens@0
   318
@property (copy, readonly) NSURL *file;  // The path to the file for the attachment
jens@0
   319
jens@0
   320
jens@0
   321
@end
jens@0
   322
jens@0
   323
jens@0
   324
jens@0
   325
/*
jens@0
   326
 * iChat Suite
jens@0
   327
 */
jens@0
   328
jens@0
   329
// iChat application.
jens@0
   330
@interface iChatApplication (IChatSuite)
jens@0
   331
jens@0
   332
- (SBElementArray *) buddies;
jens@0
   333
- (SBElementArray *) services;
jens@0
   334
- (SBElementArray *) fileTransfers;
jens@0
   335
- (SBElementArray *) chats;
jens@0
   336
- (SBElementArray *) textChats;
jens@0
   337
- (SBElementArray *) audioChats;
jens@0
   338
- (SBElementArray *) videoChats;
jens@0
   339
jens@0
   340
@property (readonly) NSInteger idleTime;  // Time in seconds that I have been idle.
jens@0
   341
@property (copy) NSImage *image;  // My image as it appears in all services.
jens@0
   342
@property (copy) NSString *statusMessage;  // My status message, visible to other people while I am online.
jens@0
   343
@property iChatMyStatus status;  // My status on all services.
jens@0
   344
@property (copy) iChatAudioChat *activeAvChat;  // The currently active audio or video chat.
jens@0
   345
jens@0
   346
@end
jens@0
   347
jens@0
   348
// A buddy on a service.
jens@0
   349
@interface iChatBuddy : iChatItem
jens@0
   350
jens@0
   351
- (NSString *) id;  // The buddy's service and handle. For example: AIM:JohnDoe007
jens@0
   352
@property (copy, readonly) iChatService *service;  // The service on which this buddy exists.
jens@0
   353
@property (copy, readonly) NSString *name;  // The buddy's name as it appears in the buddy list.
jens@0
   354
@property (copy, readonly) NSString *handle;  // The buddy's online account name.
jens@0
   355
@property (readonly) iChatAccountStatus status;  // The buddy's current status.
jens@0
   356
@property (copy, readonly) NSString *statusMessage;  // The buddy's current status message.
jens@0
   357
@property (readonly) NSInteger idleTime;  // The time in seconds the buddy has been idle.
jens@0
   358
@property (copy, readonly) NSArray *capabilities;  // The buddy's messaging capabilities.
jens@0
   359
@property (copy, readonly) NSImage *image;  // The buddy's custom image.
jens@0
   360
@property (copy, readonly) NSString *firstName;  // The first name from this buddy's Address Book card, if available
jens@0
   361
@property (copy, readonly) NSString *lastName;  // The last name from this buddy's Address Book card, if available
jens@0
   362
@property (copy, readonly) NSString *fullName;  // The full name from this buddy's Address Book card, if available
jens@0
   363
jens@0
   364
jens@0
   365
@end
jens@0
   366
jens@0
   367
// A service that can be logged in from this system
jens@0
   368
@interface iChatService : iChatItem
jens@0
   369
jens@0
   370
- (SBElementArray *) buddies;
jens@0
   371
- (SBElementArray *) chats;
jens@0
   372
jens@0
   373
- (NSString *) id;  // A guid identifier for this service.
jens@0
   374
@property (copy) NSString *name;  // The name of this service as defined in Account preferences description field
jens@0
   375
@property BOOL enabled;  // Is the service enabled?
jens@0
   376
@property (readonly) iChatConnectionStatus status;  // The connection status for this account.
jens@0
   377
@property (readonly) iChatServiceType serviceType;  // The type of protocol for this service
jens@0
   378
jens@0
   379
- (void) logIn;  // Log in to the specified service, or all services if none is specified. If the account password is not in the keychain the user will be prompted to enter one.
jens@0
   380
- (void) logOut;  // Logs out of a service, or all services if none is specified.
jens@0
   381
jens@0
   382
@end
jens@0
   383
jens@0
   384
// An audio, video, or text chat.
jens@0
   385
@interface iChatChat : SBObject
jens@0
   386
jens@0
   387
- (NSString *) id;  // A guid identifier for this chat.
jens@0
   388
@property (copy, readonly) iChatService *service;  // The service which is participating in this chat.
jens@0
   389
@property (copy, readonly) NSArray *participants;  // Other participants of this chat. This property may be specified at time of creation.
jens@0
   390
@property (readonly) BOOL secure;  // Is this chat secure?
jens@0
   391
@property (readonly) BOOL invitation;  // Is this an invitation to a chat?
jens@0
   392
@property (readonly) BOOL active;  // Is this chat currently active?
jens@0
   393
@property (copy, readonly) NSDate *started;  // The date on which this chat started.
jens@0
   394
@property (copy, readonly) NSDate *updated;  // The date when this chat was last updated.
jens@0
   395
jens@0
   396
- (void) closeSaving:(iChatSaveOptions)saving savingIn:(NSURL *)savingIn;  // Close a document.
jens@0
   397
- (void) saveIn:(NSURL *)in_ as:(NSString *)as;  // Save a document.
jens@0
   398
- (void) delete;  // Delete an object.
jens@0
   399
- (SBObject *) duplicateTo:(SBObject *)to withProperties:(NSDictionary *)withProperties;  // Copy object(s) and put the copies at a new location.
jens@0
   400
- (BOOL) exists;  // Verify if an object exists.
jens@0
   401
- (SBObject *) moveTo:(SBObject *)to;  // Move object(s) to a new location.
jens@0
   402
- (void) accept;  // Accepts an incoming text, audio, or video chat invitation, or file transfer
jens@0
   403
- (void) decline;  // Declines an incoming text, audio, or video chat invitation, or file transfer
jens@0
   404
jens@0
   405
@end
jens@0
   406
jens@0
   407
// A text chat.
jens@0
   408
@interface iChatTextChat : iChatChat
jens@0
   409
jens@0
   410
@property (copy, readonly) NSString *subject;  // The subject of this chat, if available.
jens@0
   411
@property (copy, readonly) NSString *invitationMessage;  // An invitation message. This may only be specified at the time of creation. This message will be sent to chat participants when the chat is created.
jens@0
   412
@property (readonly) iChatJoinState joinState;  // How you are joined to this chat
jens@0
   413
@property (copy, readonly) NSString *name;  // The address or room name of this chat. This property may be specified at time of creation.
jens@0
   414
@property (readonly) iChatChatType chatType;  // The type of this chat.
jens@0
   415
jens@0
   416
jens@0
   417
@end
jens@0
   418
jens@0
   419
// An audio or video chat.
jens@0
   420
@interface iChatAudioChat : iChatChat
jens@0
   421
jens@0
   422
@property (readonly) iChatScreenSharing screenSharing;  // Type of screen sharing session taking place within this chat.
jens@0
   423
@property BOOL muted;  // Is the chat muted?
jens@0
   424
@property (readonly) iChatAvConnectionStatus avConnectionStatus;  // The connection state for this av chat.
jens@0
   425
jens@0
   426
- (void) requestRecording;  // Sends a recording request to all participants of an audio or video chat. Recording will not start until all participants have agreed to allow recording.
jens@0
   427
- (void) stopRecording;  // Ends recording of an audio or video chat.
jens@0
   428
jens@0
   429
@end
jens@0
   430
jens@0
   431
@interface iChatVideoChat : iChatAudioChat
jens@0
   432
jens@0
   433
@property BOOL paused;  // Is the chat paused?
jens@0
   434
@property BOOL showingFullScreen;  // Is the chat being displayed in full screen mode?
jens@0
   435
@property BOOL showingLocalVideo;  // Is the local video preview being displayed?
jens@0
   436
jens@0
   437
- (void) takeSnapshot;  // Takes a snapshot of a video chat and saves it to a desktop.
jens@0
   438
jens@0
   439
@end
jens@0
   440
jens@0
   441
// A file being sent or received
jens@0
   442
@interface iChatFileTransfer : iChatItem
jens@0
   443
jens@0
   444
- (NSString *) id;  // The guid for this file transfer
jens@0
   445
@property (copy, readonly) NSString *name;  // The name of this file
jens@0
   446
@property (copy, readonly) NSURL *file;  // The local path to this file transfer
jens@0
   447
@property (readonly) iChatDirection direction;  // The direction in which this file is being sent
jens@0
   448
@property (copy, readonly) iChatService *service;  // The service on which this file transfer is taking place
jens@0
   449
@property (copy, readonly) iChatBuddy *buddy;  // The account participating in this file transfer
jens@0
   450
@property (readonly) BOOL secure;  // Is this file transfer secure?
jens@0
   451
@property (readonly) NSInteger fileSize;  // The total size in bytes of the completed file transfer
jens@0
   452
@property (readonly) NSInteger fileProgress;  // The number of bytes that have been transferred
jens@0
   453
@property (readonly) iChatTransferStatus transferStatus;  // The current status of this file transfer
jens@0
   454
@property (copy, readonly) NSDate *started;  // The date that this file transfer started
jens@0
   455
jens@0
   456
- (void) accept;  // Accepts an incoming text, audio, or video chat invitation, or file transfer
jens@0
   457
- (void) decline;  // Declines an incoming text, audio, or video chat invitation, or file transfer
jens@0
   458
jens@0
   459
@end
jens@0
   460