summaryrefslogtreecommitdiff
path: root/SmartDeviceLink-iOS/SmartDeviceLink/SDLTTSChunk.m
diff options
context:
space:
mode:
Diffstat (limited to 'SmartDeviceLink-iOS/SmartDeviceLink/SDLTTSChunk.m')
-rw-r--r--SmartDeviceLink-iOS/SmartDeviceLink/SDLTTSChunk.m50
1 files changed, 50 insertions, 0 deletions
diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTTSChunk.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTTSChunk.m
new file mode 100644
index 000000000..5fbb2dbcc
--- /dev/null
+++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTTSChunk.m
@@ -0,0 +1,50 @@
+// SDLTTSChunk.m
+//
+// Copyright (c) 2014 Ford Motor Company. All rights reserved.
+
+#import "SDLTTSChunk.h"
+
+#import "SDLNames.h"
+
+@implementation SDLTTSChunk
+
+-(id) init {
+ if (self = [super init]) {}
+ return self;
+}
+
+-(id) initWithDictionary:(NSMutableDictionary*) dict {
+ if (self = [super initWithDictionary:dict]) {}
+ return self;
+}
+
+-(void) setText:(NSString*) text {
+ if (text != nil) {
+ [store setObject:text forKey:NAMES_text];
+ } else {
+ [store removeObjectForKey:NAMES_text];
+ }
+}
+
+-(NSString*) text {
+ return [store objectForKey:NAMES_text];
+}
+
+-(void) setType:(SDLSpeechCapabilities*) type {
+ if (type != nil) {
+ [store setObject:type forKey:NAMES_type];
+ } else {
+ [store removeObjectForKey:NAMES_type];
+ }
+}
+
+-(SDLSpeechCapabilities*) type {
+ NSObject* obj = [store objectForKey:NAMES_type];
+ if ([obj isKindOfClass:SDLSpeechCapabilities.class]) {
+ return (SDLSpeechCapabilities*)obj;
+ } else {
+ return [SDLSpeechCapabilities valueOf:(NSString*)obj];
+ }
+}
+
+@end