|
10 | 10 |
|
11 | 11 | #define _XMPP_REGISTRATION_H
|
12 | 12 |
|
13 |
| -@interface XMPPRegistration : XMPPModule |
14 |
| -{ |
| 13 | +@interface XMPPRegistration : XMPPModule { |
15 | 14 | XMPPIDTracker *xmppIDTracker;
|
16 | 15 | }
|
17 | 16 |
|
| 17 | +/** |
| 18 | +* This method will attempt to change the current user's password to the new one provided. The |
| 19 | +* user *MUST* be authenticated for this to work successfully. |
| 20 | +* |
| 21 | +* @see passwordChangeSuccessful: |
| 22 | +* @see passwordChangeFailed:withError: |
| 23 | +* |
| 24 | +* @param newPassword The new password for the user |
| 25 | +*/ |
18 | 26 | - (BOOL)changePassword:(NSString *)newPassword;
|
| 27 | + |
| 28 | +/** |
| 29 | +* This method will attempt to cancel the current user's registration. Later implementations |
| 30 | +* will provide support for handling authentication challenges by the server. For now, |
| 31 | +* simply pass a value of 'nil' in for password, or preferably, use the other cancellation |
| 32 | +* method. |
| 33 | +* |
| 34 | +* @see cancelRegistration |
| 35 | +*/ |
19 | 36 | - (BOOL)cancelRegistrationUsingPassword:(NSString *)password;
|
20 | 37 |
|
| 38 | +/** |
| 39 | +* This method will attempt to cancel the current user's registration. The user *MUST* be |
| 40 | +* already authenticated for this to work successfully. |
| 41 | +* |
| 42 | +* @see cancelRegistrationSuccessful: |
| 43 | +* @see cancelRegistrationFailed:withError: |
| 44 | +*/ |
| 45 | +- (BOOL)cancelRegistration; |
| 46 | + |
21 | 47 | @end
|
22 | 48 |
|
23 | 49 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
27 | 53 | @protocol XMPPRegistrationDelegate
|
28 | 54 | @optional
|
29 | 55 |
|
| 56 | +/** |
| 57 | +* Implement this method when calling [regInstance changePassword:]. It will be invoked |
| 58 | +* if the request for changing the user's password is successfully executed and receives a |
| 59 | +* successful response. |
| 60 | +* |
| 61 | +* @param sender XMPPRegistration object invoking this delegate method. |
| 62 | +*/ |
30 | 63 | - (void)passwordChangeSuccessful:(XMPPRegistration *)sender;
|
| 64 | + |
| 65 | +/** |
| 66 | +* Implement this method when calling [regInstance changePassword:]. It will be invoked |
| 67 | +* if the request for changing the user's password is unsuccessfully executed or receives |
| 68 | +* an unsuccessful response. |
| 69 | +* |
| 70 | +* @param sender XMPPRegistration object invoking this delegate method. |
| 71 | +* @param error NSError containing more details of the failure. |
| 72 | +*/ |
31 | 73 | - (void)passwordChangeFailed:(XMPPRegistration *)sender withError:(NSError *)error;
|
32 | 74 |
|
| 75 | +/** |
| 76 | +* Implement this method when calling [regInstance cancelRegistration] or a variation. It |
| 77 | +* is invoked if the request for canceling the user's registration is successfully |
| 78 | +* executed and receives a successful response. |
| 79 | +* |
| 80 | +* @param sender XMPPRegistration object invoking this delegate method. |
| 81 | +*/ |
33 | 82 | - (void)cancelRegistrationSuccessful:(XMPPRegistration *)sender;
|
| 83 | + |
| 84 | +/** |
| 85 | +* Implement this method when calling [regInstance cancelRegistration] or a variation. It |
| 86 | +* is invoked if the request for canceling the user's registration is unsuccessfully |
| 87 | +* executed or receives an unsuccessful response. |
| 88 | +* |
| 89 | +* @param sender XMPPRegistration object invoking this delegate method. |
| 90 | +* @param error NSError containing more details of the failure. |
| 91 | +*/ |
34 | 92 | - (void)cancelRegistrationFailed:(XMPPRegistration *)sender withError:(NSError *)error;
|
35 | 93 |
|
36 | 94 | @end
|
0 commit comments