KaaClientState Protocol Reference

Declared in KaaClientState.h

Overview

Protocol provides basic methods used store and retrieve Kaa client state.

  privateKey required method

Returns existing or generates new private key.

@property (nonatomic, readonly) SecKeyRef privateKey

Discussion

Returns existing or generates new private key.

Declared In

KaaClientState.h

  publicKey required method

Returns existing or generates new public key.

@property (nonatomic, readonly) SecKeyRef publicKey

Discussion

Returns existing or generates new public key.

Declared In

KaaClientState.h

  isRegistred required method

Defines whether server knows about current endpoint profile.

@property (nonatomic) BOOL isRegistred

Discussion

Defines whether server knows about current endpoint profile.

Declared In

KaaClientState.h

  endpointKeyHash required method

Unique endpoint identifier.

@property (nonatomic, strong, readonly) EndpointKeyHash *endpointKeyHash

Discussion

Unique endpoint identifier.

Declared In

KaaClientState.h

  appStateSequenceNumber required method

Holds application state sequence number.

@property (nonatomic) int32_t appStateSequenceNumber

Discussion

Holds application state sequence number.

Declared In

KaaClientState.h

  profileHash required method

Holds endpoint profile hash.

@property (nonatomic, strong) EndpointObjectHash *profileHash

Discussion

Holds endpoint profile hash.

Declared In

KaaClientState.h

  attachedEndpoints required method

<EndpointAccessToken, EndpointKeyHash> as key-value.

@property (nonatomic, strong) NSMutableDictionary *attachedEndpoints

Return Value

<EndpointAccessToken, EndpointKeyHash> as key-value.

Declared In

KaaClientState.h

  endpointAccessToken required method

Holds current endpoint access token.

@property (nonatomic, strong) NSString *endpointAccessToken

Discussion

Holds current endpoint access token.

Declared In

KaaClientState.h

  eventSequenceNumber required method

Holds current event sequence number.

@property (atomic) int32_t eventSequenceNumber

Discussion

Holds current event sequence number.

Declared In

KaaClientState.h

  isAttachedToUser required method

Defines whether endpoint is attached to its user.

@property (nonatomic) BOOL isAttachedToUser

Discussion

Defines whether endpoint is attached to its user.

Declared In

KaaClientState.h

  topicListHash required method

Holds hash calculated from list of available topics. See TopicListHashCalculator for more info.

@property (nonatomic) int32_t topicListHash

Discussion

Holds hash calculated from list of available topics. See TopicListHashCalculator for more info.

Declared In

KaaClientState.h

  needProfileResync required method

Defines whether server need profile resync.

@property (nonatomic) BOOL needProfileResync

Discussion

Defines whether server need profile resync.

Declared In

KaaClientState.h

– publicKeyAsBytes required method

Returns existing or generates new public key as bytes.

- (NSData *)publicKeyAsBytes

Discussion

Returns existing or generates new public key as bytes.

Declared In

KaaClientState.h

– addTopic: required method

Adds topic with all its information.

- (void)addTopic:(Topic *)topic

Discussion

Adds topic with all its information.

Declared In

KaaClientState.h

– removeTopicId: required method

Remove topic with all its information by topic id.

- (void)removeTopicId:(int64_t)topicId

Discussion

Remove topic with all its information by topic id.

Declared In

KaaClientState.h

– addSubscriptionForTopicWithId: required method

Add subscription for topic by ID.

- (void)addSubscriptionForTopicWithId:(int64_t)topicId

Discussion

Add subscription for topic by ID.

Declared In

KaaClientState.h

– removeSubscriptionForTopicWithId: required method

Remove subscription for topic by ID.

- (void)removeSubscriptionForTopicWithId:(int64_t)topicId

Discussion

Remove subscription for topic by ID.

Declared In

KaaClientState.h

– updateSubscriptionInfoForTopicId:sequence: required method

Used to update subscription info.

- (BOOL)updateSubscriptionInfoForTopicId:(int64_t)topicId sequence:(int32_t)sequenceNumber

Discussion

Used to update subscription info.

Declared In

KaaClientState.h

– getNotificationSubscriptions required method

Return dictionary with notification subscriptions information with Topic id as key and sequence number of TopicSubscriptionInfo as value.

- (NSDictionary *)getNotificationSubscriptions

Return Value

Dictionary of <@(int64_t), @(int32_t)> as key-value.

Discussion

Return dictionary with notification subscriptions information with Topic id as key and sequence number of TopicSubscriptionInfo as value.

Declared In

KaaClientState.h

– getTopics required method

Topic

- (NSArray *)getTopics

Return Value

Array of topics

See Also

Declared In

KaaClientState.h

– getAndIncrementEventSequenceNumber required method

Next event sequence number that could be used by the system.

- (int32_t)getAndIncrementEventSequenceNumber

Return Value

Next event sequence number that could be used by the system.

Declared In

KaaClientState.h

– isConfigurationVersionUpdated required method

- (BOOL)isConfigurationVersionUpdated

Return Value

YES - if configuration version was updated, NO - if it wasn’t.

Discussion

Declared In

KaaClientState.h

– persist required method

Persists current client state.

- (void)persist

Discussion

Persists current client state.

Declared In

KaaClientState.h

– refreshEndpointAccessToken required method

Generates and stores new endpoint access token.

- (NSString *)refreshEndpointAccessToken

Return Value

New access token

Discussion

Generates and stores new endpoint access token.

Declared In

KaaClientState.h

– clean required method

Cleans up persisted client state.

- (void)clean

Discussion

Cleans up persisted client state.

Declared In

KaaClientState.h