Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Unified Diff: base/mac/sdk_forward_declarations.h

Issue 530193004: Fix wifi_component build with 10.9+ SDK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix remaining issues Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/wifi/wifi_service_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/mac/sdk_forward_declarations.h
diff --git a/base/mac/sdk_forward_declarations.h b/base/mac/sdk_forward_declarations.h
index e8682caf6fa7ab0d51d801483d485c5bd8369757..72009148cce2ea1bfec03afb9c04a1474695bba0 100644
--- a/base/mac/sdk_forward_declarations.h
+++ b/base/mac/sdk_forward_declarations.h
@@ -257,6 +257,51 @@ typedef NSUInteger NSWindowOcclusionState;
- (NSWindowOcclusionState)occlusionState;
@end
+// 10.6 SDK don't have CWSecurity while 10.9 SDK don't have CWSecurityMode, to
+// build with SDKs from 10.6 to 10.9 both need to be forward declared and use
+// runtime checks to ensure correct methods are used on different OS X versions.
+enum {
+ kCWSecurityNone = 0,
+ kCWSecurityWEP = 1,
+ kCWSecurityWPAPersonal = 2,
+ kCWSecurityWPAPersonalMixed = 3,
+ kCWSecurityWPA2Personal = 4,
+ kCWSecurityPersonal = 5,
+ kCWSecurityDynamicWEP = 6,
+ kCWSecurityWPAEnterprise = 7,
+ kCWSecurityWPAEnterpriseMixed = 8,
+ kCWSecurityWPA2Enterprise = 9,
+ kCWSecurityEnterprise = 10,
+ kCWSecurityUnknown = NSIntegerMax,
+};
+
+typedef NSInteger CWSecurity;
+
+@interface CWNetwork (MavericksSDK)
+@property(readonly) NSInteger rssiValue;
+- (BOOL)supportsSecurity:(CWSecurity)security;
+@end
+
+#else // !MAC_OS_X_VERSION_10_9
+
+typedef enum {
+ kCWSecurityModeOpen = 0,
+ kCWSecurityModeWEP,
+ kCWSecurityModeWPA_PSK,
+ kCWSecurityModeWPA2_PSK,
+ kCWSecurityModeWPA_Enterprise,
+ kCWSecurityModeWPA2_Enterprise,
+ kCWSecurityModeWPS,
+ kCWSecurityModeDynamicWEP
+} CWSecurityMode;
+
+@interface CWNetwork (SnowLeopardSDK)
+@property(readonly) NSNumber* rssi;
+@property(readonly) NSNumber* securityMode;
+@end
+
+BASE_EXPORT extern "C" NSString* const kCWSSIDDidChangeNotification;
+
#endif // MAC_OS_X_VERSION_10_9
#if !defined(MAC_OS_X_VERSION_10_10) || \
« no previous file with comments | « no previous file | components/wifi/wifi_service_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698