VoiceMac/Frameworks/MGMUsers.framework/Versions/A/Headers/MGMKeychainItem.h

201 lines
5.5 KiB
C
Raw Normal View History

2010-09-20 19:44:17 -05:00
//
// MGMKeychainItem.h
// MGMUsers
//
// Created by Mr. Gecko on 4/14/10.
// Copyright (c) 2011 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
2010-09-20 19:44:17 -05:00
//
#import <Foundation/Foundation.h>
#import <MGMUsers/MGMKeychain.h>
2010-09-20 19:44:17 -05:00
#import <Security/Security.h>
#if TARGET_OS_IPHONE
typedef enum {
kSecCreationDateItemAttr,
kSecModDateItemAttr,
kSecDescriptionItemAttr,
kSecCommentItemAttr,
kSecCreatorItemAttr,
kSecTypeItemAttr,
kSecLabelItemAttr,
kSecInvisibleItemAttr,
kSecNegativeItemAttr,
kSecAccountItemAttr,
kSecServiceItemAttr,
kSecGenericItemAttr,
kSecSecurityDomainItemAttr,
kSecServerItemAttr,
kSecAuthenticationTypeItemAttr,
kSecPortItemAttr,
kSecProtocolItemAttr,
kSecCertificateType,
kSecCertificateEncoding
} SecItemAttributes;
typedef enum {
kSecAuthenticationTypeNTLM,
kSecAuthenticationTypeMSN,
kSecAuthenticationTypeDPA,
kSecAuthenticationTypeRPA,
kSecAuthenticationTypeHTTPBasic,
kSecAuthenticationTypeHTTPDigest,
kSecAuthenticationTypeHTMLForm,
kSecAuthenticationTypeDefault
} SecAuthenticationType;
typedef enum {
kSecProtocolTypeFTP,
kSecProtocolTypeFTPAccount,
kSecProtocolTypeHTTP,
kSecProtocolTypeIRC,
kSecProtocolTypeNNTP,
kSecProtocolTypePOP3,
kSecProtocolTypeSMTP,
kSecProtocolTypeSOCKS,
kSecProtocolTypeIMAP,
kSecProtocolTypeLDAP,
kSecProtocolTypeAppleTalk,
kSecProtocolTypeAFP,
kSecProtocolTypeTelnet,
kSecProtocolTypeSSH,
kSecProtocolTypeFTPS,
kSecProtocolTypeHTTPS,
kSecProtocolTypeHTTPProxy,
kSecProtocolTypeHTTPSProxy,
kSecProtocolTypeFTPProxy,
kSecProtocolTypeSMB,
kSecProtocolTypeRTSP,
kSecProtocolTypeRTSPProxy,
kSecProtocolTypeDAAP,
kSecProtocolTypeEPPC,
kSecProtocolTypeIPP,
kSecProtocolTypeNNTPS,
kSecProtocolTypeLDAPS,
kSecProtocolTypeTelnetS,
kSecProtocolTypeIMAPS,
kSecProtocolTypeIRCS,
kSecProtocolTypePOP3S
} SecProtocolType;
// From OS X cssmtype.h
typedef enum {
CSSM_CERT_UNKNOWN = 0x00,
CSSM_CERT_X_509v1 = 0x01,
CSSM_CERT_X_509v2 = 0x02,
CSSM_CERT_X_509v3 = 0x03
} CSSM_CERT_TYPE;
typedef enum {
CSSM_CERT_ENCODING_UNKNOWN = 0x00,
CSSM_CERT_ENCODING_CUSTOM = 0x01,
CSSM_CERT_ENCODING_BER = 0x02,
CSSM_CERT_ENCODING_DER = 0x03
} CSSM_CERT_ENCODING;
#endif
2010-09-20 19:44:17 -05:00
@interface MGMKeychainItem : NSObject {
@private
#if TARGET_OS_IPHONE
NSMutableDictionary *keychainItem;
SecItemClass itemClass;
#else
2010-09-20 19:44:17 -05:00
SecKeychainItemRef keychainItem;
#endif
2010-09-20 19:44:17 -05:00
int error;
}
#if TARGET_OS_IPHONE
+ (id)itemWithDictionary:(NSDictionary *)theKeychainItem itemClass:(SecItemClass)theClass;
- (id)initWithDictionary:(NSDictionary *)theKeychainItem itemClass:(SecItemClass)theClass;
- (NSDictionary *)keychainItem;
#else
2010-09-20 19:44:17 -05:00
+ (id)itemWithRef:(SecKeychainItemRef)theItem;
- (id)initWithRef:(SecKeychainItemRef)theItem;
- (SecKeychainItemRef)keychainItem;
#endif
#if TARGET_OS_IPHONE
- (NSString *)attributeKey:(SecItemAttributes)theAttribute;
#endif
2010-09-20 19:44:17 -05:00
- (SecItemClass)kind;
- (NSString *)kindString;
- (BOOL)isInternetItem;
- (BOOL)isGenericItem;
#if !TARGET_OS_IPHONE
2010-09-20 19:44:17 -05:00
- (BOOL)isAppleShareItem;
#endif
2010-09-20 19:44:17 -05:00
- (BOOL)isCertificate;
- (int)error;
- (NSData *)data;
- (void)setData:(NSData *)theData;
- (NSString *)string;
- (void)setString:(NSString *)theString;
- (void)setData:(NSData *)theData forAttribute:(int)theAttribute;
- (void)setBool:(BOOL)theBool forAttribute:(int)theAttribute;
- (NSData *)attributeData:(int)theAttribute;
- (void)setString:(NSString *)theString forAttribute:(int)theAttribute;
- (NSString *)attributeString:(int)theAttribute;
- (void)setCreationDate:(NSDate *)theDate;
- (NSDate *)creationDate;
- (void)setModifiedDate:(NSDate *)theDate;
- (NSDate *)modifiedDate;
2010-09-20 19:44:17 -05:00
- (void)setDescription:(NSString *)theDescription;
- (NSString *)description;
- (void)setComment:(NSString *)theComment;
- (NSString *)comment;
- (void)setCreator:(NSString *)theCreator;
- (NSString *)creator;
- (void)setType:(NSString *)theType;
- (NSString *)type;
- (void)setName:(NSString *)theName;
- (NSString *)name;
- (void)setVisible:(BOOL)isVisible;
- (BOOL)isVisible;
- (void)setPasswordValid:(BOOL)isPasswordValid;
- (BOOL)isPasswordValid;
#if !TARGET_OS_IPHONE
2010-09-20 19:44:17 -05:00
- (void)setHasCustomIcon:(BOOL)hasCustomIcon;
- (BOOL)hasCustomIcon;
#endif
2010-09-20 19:44:17 -05:00
- (void)setAccount:(NSString *)theAccount;
- (NSString *)account;
- (void)setService:(NSString *)theService;
- (NSString *)service;
- (void)setAttribute:(NSString *)theAttribute;
- (NSString *)attribute;
- (void)setSecurityDomain:(NSString *)theSecurityDomain;
- (NSString *)securityDomain;
- (void)setServer:(NSString *)theServer;
- (NSString *)server;
- (void)setAuthenticationType:(SecAuthenticationType)theAuthenticationType;
- (SecAuthenticationType)authenticationType;
- (NSString *)authenticationTypeString;
2010-09-20 19:44:17 -05:00
- (void)setPort:(UInt16)thePort;
- (UInt16)port;
#if !TARGET_OS_IPHONE
2010-09-20 19:44:17 -05:00
- (void)setVolume:(NSString *)theVolume;
- (NSString *)volume;
- (void)setAddress:(NSString *)theAddress;
- (NSString *)address;
- (void)setSignature:(SecAFPServerSignature *)theSignature;
- (SecAFPServerSignature *)signature;
#endif
2010-09-20 19:44:17 -05:00
- (void)setProtocol:(SecProtocolType)theProtocol;
- (SecProtocolType)protocol;
- (NSString *)protocolString;
- (void)setCertificateType:(CSSM_CERT_TYPE)theCertificateType;
- (CSSM_CERT_TYPE)certificateType;
- (void)setCertificateEncoding:(CSSM_CERT_ENCODING)theCertificateEncoding;
- (CSSM_CERT_ENCODING)certificateEncoding;
#if !TARGET_OS_IPHONE
2010-09-20 19:44:17 -05:00
- (void)setCRLType:(CSSM_CRL_TYPE)theCRLType;
- (CSSM_CRL_TYPE)CRLType;
- (NSString *)CRLTypeString;
2010-09-20 19:44:17 -05:00
- (void)setCRLEncoding:(CSSM_CRL_ENCODING)theCRLEncoding;
- (CSSM_CRL_ENCODING)CRLEncoding;
- (NSString *)CRLEncodingString;
2010-09-20 19:44:17 -05:00
- (void)setAlias:(BOOL)isAlias;
- (BOOL)isAlias;
#endif
2010-09-20 19:44:17 -05:00
- (void)remove;
@end