[Keychain-commit] SF.net SVN: keychain: [446] trunk/Frameworks/Keychain/Keychain/ TrustedApplicatio
Status: Abandoned
Brought to you by:
wadetregaskis
|
From: <wad...@us...> - 2007-12-13 07:17:31
|
Revision: 446
http://keychain.svn.sourceforge.net/keychain/?rev=446&view=rev
Author: wadetregaskis
Date: 2007-12-12 23:17:36 -0800 (Wed, 12 Dec 2007)
Log Message:
-----------
* Added isEqual: and hash methods; it should be possible to logically compare two TrustedApplications for equality now.
Modified Paths:
--------------
trunk/Frameworks/Keychain/Keychain/TrustedApplication.m
Modified: trunk/Frameworks/Keychain/Keychain/TrustedApplication.m
===================================================================
--- trunk/Frameworks/Keychain/Keychain/TrustedApplication.m 2007-12-12 08:01:14 UTC (rev 445)
+++ trunk/Frameworks/Keychain/Keychain/TrustedApplication.m 2007-12-13 07:17:36 UTC (rev 446)
@@ -109,6 +109,18 @@
return _trustedApplication;
}
+- (BOOL)isEqual:(id)object {
+ if ([object isKindOfClass:[TrustedApplication class]]) {
+ return ((self == object) || CFEqual([self trustedApplicationRef], [(TrustedApplication*)object trustedApplicationRef]));
+ } else {
+ return NO;
+ }
+}
+
+- (unsigned int)hash {
+ return CFHash([self trustedApplicationRef]);
+}
+
- (void)dealloc {
if (_trustedApplication) {
CFRelease(_trustedApplication);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|