Skip to content
This repository has been archived by the owner on Aug 24, 2019. It is now read-only.

Commit

Permalink
Merge pull request #113 from lgauthier/master
Browse files Browse the repository at this point in the history
Fixes issue #112 involving Swift 2.0 error handling compatibility.
  • Loading branch information
soffes committed Sep 17, 2015
2 parents d890362 + ab7cbf3 commit a8e9b21
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions SSKeychain/SSKeychain.h
Expand Up @@ -72,7 +72,7 @@ extern NSString *const kSSKeychainWhereKey;
have a password for the given parameters.
*/
+ (NSString *)passwordForService:(NSString *)serviceName account:(NSString *)account;
+ (NSString *)passwordForService:(NSString *)serviceName account:(NSString *)account error:(NSError **)error;
+ (NSString *)passwordForService:(NSString *)serviceName account:(NSString *)account error:(NSError **)error __attribute__((swift_error(none)));

/**
Returns a nsdata containing the password for a given account and service, or `nil` if the Keychain doesn't have a
Expand All @@ -86,7 +86,7 @@ extern NSString *const kSSKeychainWhereKey;
have a password for the given parameters.
*/
+ (NSData *)passwordDataForService:(NSString *)serviceName account:(NSString *)account;
+ (NSData *)passwordDataForService:(NSString *)serviceName account:(NSString *)account error:(NSError **)error;
+ (NSData *)passwordDataForService:(NSString *)serviceName account:(NSString *)account error:(NSError **)error __attribute__((swift_error(none)));


/**
Expand All @@ -99,7 +99,7 @@ extern NSString *const kSSKeychainWhereKey;
@return Returns `YES` on success, or `NO` on failure.
*/
+ (BOOL)deletePasswordForService:(NSString *)serviceName account:(NSString *)account;
+ (BOOL)deletePasswordForService:(NSString *)serviceName account:(NSString *)account error:(NSError **)error;
+ (BOOL)deletePasswordForService:(NSString *)serviceName account:(NSString *)account error:(NSError **)error __attribute__((swift_error(none)));


/**
Expand All @@ -114,7 +114,7 @@ extern NSString *const kSSKeychainWhereKey;
@return Returns `YES` on success, or `NO` on failure.
*/
+ (BOOL)setPassword:(NSString *)password forService:(NSString *)serviceName account:(NSString *)account;
+ (BOOL)setPassword:(NSString *)password forService:(NSString *)serviceName account:(NSString *)account error:(NSError **)error;
+ (BOOL)setPassword:(NSString *)password forService:(NSString *)serviceName account:(NSString *)account error:(NSError **)error __attribute__((swift_error(none)));

/**
Sets a password in the Keychain.
Expand All @@ -128,7 +128,7 @@ extern NSString *const kSSKeychainWhereKey;
@return Returns `YES` on success, or `NO` on failure.
*/
+ (BOOL)setPasswordData:(NSData *)password forService:(NSString *)serviceName account:(NSString *)account;
+ (BOOL)setPasswordData:(NSData *)password forService:(NSString *)serviceName account:(NSString *)account error:(NSError **)error;
+ (BOOL)setPasswordData:(NSData *)password forService:(NSString *)serviceName account:(NSString *)account error:(NSError **)error __attribute__((swift_error(none)));

/**
Returns an array containing the Keychain's accounts, or `nil` if the Keychain has no accounts.
Expand All @@ -140,7 +140,7 @@ extern NSString *const kSSKeychainWhereKey;
accounts. The order of the objects in the array isn't defined.
*/
+ (NSArray *)allAccounts;
+ (NSArray *)allAccounts:(NSError *__autoreleasing *)error;
+ (NSArray *)allAccounts:(NSError *__autoreleasing *)error __attribute__((swift_error(none)));


/**
Expand All @@ -156,7 +156,7 @@ extern NSString *const kSSKeychainWhereKey;
doesn't have any accounts for the given `serviceName`. The order of the objects in the array isn't defined.
*/
+ (NSArray *)accountsForService:(NSString *)serviceName;
+ (NSArray *)accountsForService:(NSString *)serviceName error:(NSError *__autoreleasing *)error;
+ (NSArray *)accountsForService:(NSString *)serviceName error:(NSError *__autoreleasing *)error __attribute__((swift_error(none)));


#pragma mark - Configuration
Expand Down

0 comments on commit a8e9b21

Please sign in to comment.