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

    json

    a 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

    key

    a key.

    value

    a VivochaCapabilitiesValue object

  • - (void)addKey:(NSString *)key andValue:(BOOL)value;

    Adds a boolean for the given key

    Parameters

    key

    a key.

    value

    a BOOL value

  • - (void)addValue:(VivochaCapabilitiesValue *)value;

    Adds a VivochaCapabilitiesValue object. The key will be the one set in the value object.

    Parameters

    value

    a VivochaCapabilitiesValue object

  • - (BOOL)hasValue:(NSString *)key;

    Returns YES if it contains a value for the given key

    Parameters

    key

    the key.

  • - (BOOL)getBooleanValue:(NSString *)key;

    Returns the value set for the given key

    Parameters

    key

    the key.

  • - (NSString *)getStringValue:(NSString *)key;

    Returns the value set for the given key

    Parameters

    key

    the key.