-
Notifications
You must be signed in to change notification settings - Fork 2
/
XMPPAccount.h
61 lines (57 loc) · 1.43 KB
/
XMPPAccount.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//
// XMPPAccount.h
// Jabber
//
// Created by David Chisnall on 21/09/2004.
// Copyright 2004 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "XMPPConnection.h"
#import "JID.h"
#define XMPPNOJIDEXCEPTION @"NoJIDinAB"
#define XMPPNOPASSWORDEXCEPTION @"NoPasswordForJid"
@class XMPPRoster;
/**
* The XMPPAccount class represents a single XMPP account. The JID is retrieved
* from the address book, and the password from the keychain (OS X) or user
* defaults (GNUstep).
*/
@interface XMPPAccount : NSObject {
NSString * name;
JID * myJID;
XMPPRoster * roster;
XMPPConnection * connection;
}
/**
* Sets the default JID (stored in address book)
*/
+ (void) setDefaultJID:(JID*) aJID;
/**
* Sets the default JID along with a server to use for connection.
*/
+ (void) setDefaultJID:(JID*) aJID withServer:(NSString*) aServer;
/**
* Attempt to reconnect after disconnection.
*/
- (void) reconnect;
/**
* Initialize an Account with a given Name a Jid and a password
*/
- (id) initWithName:(NSString*)aName withJid:(JID*)aJid withPassword:(NSString*)aPassword;
/**
* Returns the JID associated with the account.
*/
- (JID*) jid;
/**
* Returns the roster associated with the account.
*/
- (XMPPRoster*) roster;
/**
* Returns the connection associated with the account.
*/
- (XMPPConnection*) connection;
/**
* Returns the name of the current account.
*/
- (NSString*) name;
@end