88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
* @brief The access token used by the client.
*/
@property (readonly, nonatomic) OFString *accessToken;
/**
* @brief The homeserver used by the client.
*/
@property (readonly, nonatomic) OFURL *homeserver;
/**
* @brief The storage used by the client.
*/
@property (readonly, nonatomic) id <MTXStorage> storage;
/**
|
|
|
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
* @brief The access token used by the client.
*/
@property (readonly, nonatomic) OFString *accessToken;
/**
* @brief The homeserver used by the client.
*/
@property (readonly, nonatomic) OFIRI *homeserver;
/**
* @brief The storage used by the client.
*/
@property (readonly, nonatomic) id <MTXStorage> storage;
/**
|
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
|
/**
* @brief Creates a new client with the specified access token on the specified
* homeserver.
*
* @param userID The user ID for the client
* @param deviceID The device ID for the client
* @param accessToken The access token for the client
* @param homeserver The URL of the homeserver
* @param storage The storage the client should use
* @return An autoreleased MTXClient
*/
+ (instancetype)clientWithUserID: (OFString *)userID
deviceID: (OFString *)deviceID
accessToken: (OFString *)accessToken
homeserver: (OFURL *)homeserver
storage: (id <MTXStorage>)storage;
/**
* @brief Logs into the homeserver and creates a new client.
*
* @param user The user to log into
* @param password The password to log in with
* @param homeserver The homeserver to log into
* @param storage The storage the client should use
* @param block A block to call once login succeeded or failed
*/
+ (void)logInWithUser: (OFString *)user
password: (OFString *)password
homeserver: (OFURL *)homeserver
storage: (id <MTXStorage>)storage
block: (MTXClientLoginBlock)block;
/**
* @brief Initializes an already allocated client with the specified access
* token on the specified homeserver.
*
* @param userID The user ID for the client
* @param deviceID The device ID for the client
* @param accessToken The access token for the client
* @param homeserver The URL of the homeserver
* @param storage The storage the client should use
* @return An initialized MTXClient
*/
- (instancetype)initWithUserID: (OFString *)userID
deviceID: (OFString *)deviceID
accessToken: (OFString *)accessToken
homeserver: (OFURL *)homeserver
storage: (id <MTXStorage>)storage
OF_DESIGNATED_INITIALIZER;
/**
* @brief Starts the sync loop.
*/
- (void)startSyncLoop;
|
|
|
|
|
|
|
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
|
/**
* @brief Creates a new client with the specified access token on the specified
* homeserver.
*
* @param userID The user ID for the client
* @param deviceID The device ID for the client
* @param accessToken The access token for the client
* @param homeserver The IRI of the homeserver
* @param storage The storage the client should use
* @return An autoreleased MTXClient
*/
+ (instancetype)clientWithUserID: (OFString *)userID
deviceID: (OFString *)deviceID
accessToken: (OFString *)accessToken
homeserver: (OFIRI *)homeserver
storage: (id <MTXStorage>)storage;
/**
* @brief Logs into the homeserver and creates a new client.
*
* @param user The user to log into
* @param password The password to log in with
* @param homeserver The homeserver to log into
* @param storage The storage the client should use
* @param block A block to call once login succeeded or failed
*/
+ (void)logInWithUser: (OFString *)user
password: (OFString *)password
homeserver: (OFIRI *)homeserver
storage: (id <MTXStorage>)storage
block: (MTXClientLoginBlock)block;
/**
* @brief Initializes an already allocated client with the specified access
* token on the specified homeserver.
*
* @param userID The user ID for the client
* @param deviceID The device ID for the client
* @param accessToken The access token for the client
* @param homeserver The IRI of the homeserver
* @param storage The storage the client should use
* @return An initialized MTXClient
*/
- (instancetype)initWithUserID: (OFString *)userID
deviceID: (OFString *)deviceID
accessToken: (OFString *)accessToken
homeserver: (OFIRI *)homeserver
storage: (id <MTXStorage>)storage
OF_DESIGNATED_INITIALIZER;
/**
* @brief Starts the sync loop.
*/
- (void)startSyncLoop;
|