summaryrefslogtreecommitdiff
path: root/SmartDeviceLink-iOS/SmartDeviceLink/SDLHeadLampStatus.m
diff options
context:
space:
mode:
Diffstat (limited to 'SmartDeviceLink-iOS/SmartDeviceLink/SDLHeadLampStatus.m')
-rw-r--r--SmartDeviceLink-iOS/SmartDeviceLink/SDLHeadLampStatus.m62
1 files changed, 62 insertions, 0 deletions
diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLHeadLampStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLHeadLampStatus.m
new file mode 100644
index 000000000..c0c349a9c
--- /dev/null
+++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLHeadLampStatus.m
@@ -0,0 +1,62 @@
+// SDLHeadLampStatus.m
+//
+// Copyright (c) 2014 Ford Motor Company. All rights reserved.
+
+#import "SDLHeadLampStatus.h"
+
+#import "SDLNames.h"
+
+@implementation SDLHeadLampStatus
+
+-(id) init {
+ if (self = [super init]) {}
+ return self;
+}
+
+-(id) initWithDictionary:(NSMutableDictionary*) dict {
+ if (self = [super initWithDictionary:dict]) {}
+ return self;
+}
+
+-(void) setLowBeamsOn:(NSNumber*) lowBeamsOn {
+ if (lowBeamsOn != nil) {
+ [store setObject:lowBeamsOn forKey:NAMES_lowBeamsOn];
+ } else {
+ [store removeObjectForKey:NAMES_lowBeamsOn];
+ }
+}
+
+-(NSNumber*) lowBeamsOn {
+ return [store objectForKey:NAMES_lowBeamsOn];
+}
+
+-(void) setHighBeamsOn:(NSNumber*) highBeamsOn {
+ if (highBeamsOn != nil) {
+ [store setObject:highBeamsOn forKey:NAMES_highBeamsOn];
+ } else {
+ [store removeObjectForKey:NAMES_highBeamsOn];
+ }
+}
+
+-(NSNumber*) highBeamsOn {
+ return [store objectForKey:NAMES_highBeamsOn];
+}
+
+-(void) setAmbientLightSensorStatus:(SDLAmbientLightStatus*) ambientLightSensorStatus {
+ if (ambientLightSensorStatus != nil) {
+ [store setObject:ambientLightSensorStatus forKey:NAMES_ambientLightSensorStatus];
+ } else {
+ [store removeObjectForKey:NAMES_ambientLightSensorStatus];
+ }
+}
+
+-(SDLAmbientLightStatus*) ambientLightSensorStatus {
+ NSObject* obj = [store objectForKey:NAMES_ambientLightSensorStatus];
+ if ([obj isKindOfClass:SDLAmbientLightStatus.class]) {
+ return (SDLAmbientLightStatus*)obj;
+ } else {
+ return [SDLAmbientLightStatus valueOf:(NSString*)obj];
+ }
+}
+
+@end