SlyceSession Class Reference

Inherits from NSObject
Declared in SlyceSession.h

+ sessionWithSlyce:error:

The static initializer for SlyceSession. Use this to create your own instance of a SlyceSession.

+ (nullable instancetype)sessionWithSlyce:(Slyce *)slyce error:(SlyceOutError)outError

Parameters

slyce
  • An opened instance of Slyce.
outError
  • A pointer to an error that will be assigned if a problem occurs.

Declared In

SlyceSession.h

  delegate

@property

@property (nonatomic, weak, nullable) id<SlyceSessionDelegate> delegate

Discussion

The object that acts as the delegate of the session.

Declared In

SlyceSession.h

– addListener:NS_SWIFT_NAME:

Adds the instance of SlyceSessionListener as a listener on this instance of SlyceSession.

- (void)addListener:(id<SlyceSessionListener>)listener NS_SWIFT_NAME

Parameters

listener

The instance of the listener to be added.

Declared In

SlyceSession.h

– removeListener:NS_SWIFT_NAME:

Removes the instance of SlyceSessionListener as a listener on this instance of SlyceSession.

- (void)removeListener:(id<SlyceSessionListener>)listener NS_SWIFT_NAME

Parameters

listener

The instance of the listener to be removed.

Declared In

SlyceSession.h

– invalidate

Invalidates the session, all active tasks will be canceled.

- (void)invalidate

Declared In

SlyceSession.h

  isInvalidated

@property

@property (nonatomic, readonly) BOOL isInvalidated

Discussion

A flag indicating the validity of this session instance.

Declared In

SlyceSession.h

– startSearchTaskWithRequest:workflowIdentifier:listener:NS_SWIFT_NAME:

Creates and starts a search task based on the provided request and workflow identifier.

- (nullable SlyceSearchTask *)startSearchTaskWithRequest:(SlyceSearchRequest *)searchRequest workflowIdentifier:(NSString *)workflowIdentifier listener:(nullable id<SlyceSearchTaskListener>)listener NS_SWIFT_NAME

Parameters

searchRequest
  • The search request.
workflowIdentifier
  • The identifier of the workflow to use.
listener
  • A listener to add to the task. Nullable.

Return Value

a new SlyceSearchTask for the request and workflow identifier.

Declared In

SlyceSession.h

– startSearchTaskWithRequest:workflowName:listener:error:NS_SWIFT_NAME:

Creates and starts a search task based on the provided request and workflow name.

- (nullable SlyceSearchTask *)startSearchTaskWithRequest:(SlyceSearchRequest *)searchRequest workflowName:(SlyceWorkflowName)workflowName listener:(nullable id<SlyceSearchTaskListener>)listener error:(SlyceOutError)outError NS_SWIFT_NAME

Parameters

searchRequest
  • The search request.
workflowName
  • The name of the workflow to use, for example, SlyceWorkflowName3D or SlyceWorkflowNameFindSimilar.
listener
  • A listener to add to the task. Nullable.

Return Value

a new SlyceSearchTask for the request and workflow identifier.

Declared In

SlyceSession.h

  searchTasks

  • @property *
  • @brief Gets all SlyceSearchTask objects that have been started and not yet completed. * @ @return A copy of all active SlyceSearchTask objects.
@property (nonatomic, readonly, copy) NSArray<SlyceSearchTask*> *searchTasks

Declared In

SlyceSession.h

– getSearchTaskByIdentifier:NS_SWIFT_NAME:

Gets the task with the provided task identifier.

- (nullable SlyceSearchTask *)getSearchTaskByIdentifier:(NSString *)taskIdentifier NS_SWIFT_NAME

Parameters

taskIdentifier
  • The identifier of the task to get.

Return Value

the corresponding task, or null if not found.

Declared In

SlyceSession.h

– cancelAllTasks

Cancels all tasks within this session.

- (void)cancelAllTasks

Declared In

SlyceSession.h

  defaultSearchParameters

@property

@property (nonatomic, copy, nullable) SlyceSearchParameters *defaultSearchParameters

Discussion

The SlyceSearchParameters for all requests in this session.

Declared In

SlyceSession.h