MedM DeviceKit
DeviceSetting Class Reference

Represents setting as its kind and fixed array of possible string values. More...

#import <DeviceSetting.h>

Inheritance diagram for DeviceSetting:

Instance Methods

(BOOL) - selectValueWithIndex:error:
 Select variant from values array. More...
 
(NSString *) - getValue
 Get string representation of the currently selected value. More...
 
(BOOL) - setValue:error:
 Set setting value. More...
 

Properties

DeviceSettingKind kind
 Setting kind. More...
 
NSNumber *_Nonnull valueIndex
 Get current setting value position in values array. More...
 
NSArray< NSString * > *_Nonnull values
 Get possible device setting variants. More...
 
BOOL isReadonly
 Is this setting readonly, usually means that you can set this setting only before adding. More...
 

Detailed Description

Represents setting as its kind and fixed array of possible string values.

You can get current selected value by using getValue or valueIndex and set value by using selectValueWithIndex::}

Method Documentation

◆ getValue()

- (NSString *) getValue

Get string representation of the currently selected value.

◆ selectValueWithIndex:error:()

- (BOOL) selectValueWithIndex: (NSNumber *_Nonnull)  index
error: (NSError *_Nullable *_Nullable)  error 

Select variant from values array.

Exceptions
MedMDeviceKitExceptionpossible codes: DeviceKitUnsupportedOperation, DeviceKitIndexOutOfBounds

◆ setValue:error:()

- (BOOL) setValue: (NSString *_Nonnull)  value
error: (NSError *_Nullable *_Nullable)  error 

Set setting value.

Parameters
valuestring representation of the new value. For all settings apart from EncryptionKey should be one of values@throwsMedMDeviceKitExceptionpossiblecodes:DeviceKitUnsupportedOperation,DeviceKitInvalidArgument

Property Documentation

◆ isReadonly

- (BOOL) isReadonly
readnonatomicassign

Is this setting readonly, usually means that you can set this setting only before adding.

If true calling selectValueWithIndex:error: would result in exception.

◆ kind

- (DeviceSettingKind) kind
readnonatomicassign

Setting kind.

◆ valueIndex

- (NSNumber* _Nonnull) valueIndex
readnonatomicretain

Get current setting value position in values array.

◆ values

- (NSArray<NSString*>* _Nonnull) values
readnonatomicretain

Get possible device setting variants.

The array is fixed for the specific setting instance.


The documentation for this class was generated from the following files: