VivochaCapabilities
@interface VivochaCapabilities : NSObject
This class defines what features the current device supports, defined by the current Vivocha configuration and built-in sensors. It is a container of VivochaCapabilitiesValue objects.
-
+ (VivochaCapabilities *)capsFromJSON:(NSDictionary *)json;Factory method to create a VivochaCapabilities object from JSON
Parameters
jsona dictionary containing the capabilities.
-
- (NSDictionary *)toJSON;Converts the capabilities to JSON.
-
- (void)addKey:(NSString *)key andCapsValue:(VivochaCapabilitiesValue *)value;Adds a VivochaCapabilitiesValue object for the given key
Parameters
keya key.
valuea VivochaCapabilitiesValue object
-
- (void)addKey:(NSString *)key andValue:(BOOL)value;Adds a boolean for the given key
Parameters
keya key.
valuea BOOL value
-
- (void)addValue:(VivochaCapabilitiesValue *)value;Adds a VivochaCapabilitiesValue object. The key will be the one set in the value object.
Parameters
valuea VivochaCapabilitiesValue object
-
- (BOOL)hasValue:(NSString *)key;Returns YES if it contains a value for the given key
Parameters
keythe key.
-
- (BOOL)getBooleanValue:(NSString *)key;Returns the value set for the given key
Parameters
keythe key.
-
- (NSString *)getStringValue:(NSString *)key;Returns the value set for the given key
Parameters
keythe key.