summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLResetGlobalProperties.m
diff options
context:
space:
mode:
Diffstat (limited to 'SmartDeviceLink/SDLResetGlobalProperties.m')
-rw-r--r--SmartDeviceLink/SDLResetGlobalProperties.m45
1 files changed, 45 insertions, 0 deletions
diff --git a/SmartDeviceLink/SDLResetGlobalProperties.m b/SmartDeviceLink/SDLResetGlobalProperties.m
new file mode 100644
index 000000000..350f96de0
--- /dev/null
+++ b/SmartDeviceLink/SDLResetGlobalProperties.m
@@ -0,0 +1,45 @@
+// SDLResetGlobalProperties.m
+//
+
+
+#import "SDLResetGlobalProperties.h"
+
+#import "SDLGlobalProperty.h"
+#import "SDLNames.h"
+
+@implementation SDLResetGlobalProperties
+
+- (instancetype)init {
+ if (self = [super initWithName:NAMES_ResetGlobalProperties]) {
+ }
+ return self;
+}
+
+- (instancetype)initWithDictionary:(NSMutableDictionary *)dict {
+ if (self = [super initWithDictionary:dict]) {
+ }
+ return self;
+}
+
+- (void)setProperties:(NSMutableArray *)properties {
+ if (properties != nil) {
+ [parameters setObject:properties forKey:NAMES_properties];
+ } else {
+ [parameters removeObjectForKey:NAMES_properties];
+ }
+}
+
+- (NSMutableArray *)properties {
+ NSMutableArray *array = [parameters objectForKey:NAMES_properties];
+ if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLGlobalProperty.class]) {
+ return array;
+ } else {
+ NSMutableArray *newList = [NSMutableArray arrayWithCapacity:[array count]];
+ for (NSString *enumString in array) {
+ [newList addObject:[SDLGlobalProperty valueOf:enumString]];
+ }
+ return newList;
+ }
+}
+
+@end