VocSdkBase.h
IntroductionHeader file that defines the common parts that relate to all aspects of the SDK. Functions
vocsdk_diag_get_log_levelGet the current diagnostic logging level. VOCSDK_EXPORT int vocsdk_diag_get_log_level( void); Return Valueint Returns the current diagnostic logging level. vocsdk_diag_set_log_levelControls the verbosity of the diagnostic messages in the console that VOC SDK will print. VOCSDK_EXPORT void vocsdk_diag_set_log_level( int level); DiscussionLog levels are defined in LOG_LEVEL enum. Constants
VOCSDKErrorDomainDomain for errors coming out of Voc SDK. VOCSDK_EXPORT NSString * const VOCSDKErrorDomain; VocSdkVersionBuildVoc SDK release build number constant. VOCSDK_EXPORT const int VocSdkVersionBuild; VocSdkVersionMajorVoc SDK major build number constant. VOCSDK_EXPORT const int VocSdkVersionMajor; VocSdkVersionMinorVoc SDK minor build number constant. VOCSDK_EXPORT const int VocSdkVersionMinor; VocSdkVersionStringVoc SDK build number string constant. VOCSDK_EXPORT const unsigned char VocSdkVersionString[]; Typedefs
NS_ENUMVoc service states enumeration. typedef NS_ENUM(NSInteger, VOCServiceState) { VOCServiceStateNotRegistered = 0, VOCServiceStateInitializing = 1, VOCServiceStateIdle = 2, VOCServiceStateDownloading = 3 }; Constants
See NS_ENUMItem states enumeration. typedef NS_ENUM(NSInteger, VOCItemState) { VOCItemMetadataNotReceived = 9, VOCItemDiscovered = 0, VOCItemQueued = 5, VOCItemDownloading = 1, VOCItemIdle = 6, VOCItemPaused = 7, VOCItemCached = 2, VOCItemFailed = 4, VOCItemDeleted = 3, //deprecated mixed case aliases VocItemQueued = VOCItemQueued, VocItemIdle = VOCItemIdle, VocItemPaused = VOCItemPaused, VocItemFailed = VOCItemFailed, }; Constants
See NS_ENUMFile states enumeration. typedef NS_ENUM(NSInteger, VOCFileState) { VOCFileDiscovered = 0, VOCFileDownloading = 1, VOCFileCached = 2, VOCFileFailed = 4, VOCFileNotCached = 5, VOCFileSkipDownload = 6, VOCFileIdle = 7 }; Constants
NS_ENUMVocObj type enumeration. typedef NS_ENUM(NSInteger, VOCObjType) { VOCObjTypeItem = 0, VOCObjTypeItemCategory = 1, VOCObjTypeItemSource = 2, VOCObjTypeCount }; Constants
NS_ENUMContent item type enumeration. typedef NS_ENUM(NSInteger, VOCItemTypeEnum) { VOCItemTypeVideo = 0, VOCItemTypeGeneral = 8, VOCItemTypeCount }; Constants
NS_ENUMFile type enumeration. typedef NS_ENUM(int16_t, VocFileType) { VOCUnknownFile = -1, VOCMainFile = 0, // deprecated VocUnknownFile = VOCUnknownFile, VocMainFile = VOCMainFile, }; Constants
NS_ENUMItem Download Behavior enumeration. typedef NS_ENUM(NSInteger, VOCItemDownloadBehavior) { VOCItemDownloadSdkBehavior = 0, VOCItemDownloadFullAuto = 1, VOCItemDownloadThumbnailOnly = 2, // unused VOCItemDownloadNone = 3, VOCItemDownloadBehaviorCount }; Constants
DiscussionThe value set on VocItem::downloadBehavior will override VocConfig::itemDownloadBehavior. NS_ENUMCurrent SDK network connection type enumeration. typedef NS_ENUM(NSInteger, VOCConnectionType) { VOCConnectionNone, VOCConnectionIsCellular, VOCConnectionIsWiFi, }; Constants
NS_ENUMUser's preferred network selection type. typedef NS_ENUM(NSInteger, VOCNetworkSelection) { VOCNetworkSelectionInvalid = -1,//invalid selection from client end. VOCNetworkSelectionNone = 0, VOCNetworkSelectionWifiOnly = 100, VOCNetworkSelectionWifiAndCellular = 101, }; Constants
NS_ENUMType of download for a VocItem (shows how the download was initiated). typedef NS_ENUM(NSInteger, VocDownloadType) { VocDownloadTypeAuto = 0, VocDownloadTypeManual = 1, }; Constants
NS_ENUMNetwork Quality enumeration. typedef NS_ENUM(NSInteger, VocNetworkQualityStatus) { VocNetworkQualityPoor = 0, VocNetworkQualityGood = 1, VocNetworkQualityExcellent = 2, VocNetworkQualityUnknown = -1, VocNetworkQualityNotReady = -2, }; Constants
DiscussionBased on the threshold range that is given by the customer for each network type(say 2g, 3g, 4g etc), SDK calculates the network quality. NS_ENUMVoc service error codes. typedef NS_ENUM(NSInteger, VOCSDKError) { VOCErrInvalidParam = -1000, VOCErrCreateService = -1001, VOCErrAlreadyRegistered = -1002, VOCErrNotRegistered = -1003, VOCErrRegisterFailedBadCredentials = -1004, VOCErrRegisterFailedOther = -1005, VOCErrDb = -1006, VOCErrServerApiError = -1010, VOCErrServerApiErrorUnauthorized = -1011, VOCErrServerApiErrorRequestFailed = -1012, VOCErrServerApiErrorResponseParse = -1013, VOCErrServerApiErrorResponseData = -1014, VOCErrServerApiErrorNotAllowed = -1016, VocErrCancelled = -3072, VocErrUserCancelled = -1100, VocErrTimeOut = -1101, VocErrBackgroundTimeOver = -1102, VocErrDownloadOptimization = -1103, VOCErrDownloadAlreadyInProgress = -1104, VOCErrDownloadOutOfPolicy = -1105, VOCErrDownloadNetworkCongested = -1106, VOCErrDownloadDailyLimit = -1107, VOCErrDownloadCacheLimit = -1108, VocErrShuttingDown = -1109, VocErrCongestionCheckFailed = -1110, VocErrItemDeletionFailed = -1111, VocErrItemNotFound = -1112, VocErrDownloadedItemImportFailed = -1113, VocErrDownloadNetworkError = -1114, VocErrDownloadItemCorrupted = -1115, VocErrCongestionCheckFailed404 = -1117, VocErrRegistrationDelayed = -1118, VocErrDownloadHttpError = -1119, VOCErrContentIdDoesNotExistInServer = -1121, VOCErrDownloadLaterLimit = -1122, VocErrMaxConcurrentDownloadLimit = -1223, VOCErrCancelledIgnoringTask = -1124 }; Constants
NS_OPTIONSDownload Policy Status enumeration. typedef NS_OPTIONS(NSInteger, VOCPolicyStatus) { VOCPolicyStatusInPolicy = 0, VOCPolicyStatusNotRegistered = 1, VOCPolicyStatusNoDownload = 2, VOCPolicyStatusWifiDisallowedOnBattery = 4, VOCPolicyStatusWifiNotAllowed = 8, VOCPolicyStatusHostUnreachableViaWifi = 0x10, VOCPolicyStatusCellularDisallowedOnBattery = 0x20, VOCPolicyStatusCellularTimeOfDay = 0x40, VOCPolicyStatusCellularNotAllowed = 0x80, VOCPolicyStatusHostUnreachableViaCellular = 0x100, VOCPolicyStatusBatteryTooLow = 0x200, }; Constants
Enumerated Types
DownloadQuotaDownload quota enumeration. enum : int64_t { VOCDownloadQuotaUnlimited = INT64_MAX }; Constants
See Also intA list of log level customer can set. enum : int { VOCSDK_DIAG_LOG_LEVEL_NONE = 0, VOCSDK_DIAG_LOG_LEVEL_LOW = 5, VOCSDK_DIAG_LOG_LEVEL_HIGH = 10 }; Constants
See Also int64_tDownload quota enumeration. enum : int64_t { VOCDownloadQuotaUnlimited = INT64_MAX }; Constants
See Also LOG_LEVELA list of log level customer can set. enum : int { VOCSDK_DIAG_LOG_LEVEL_NONE = 0, VOCSDK_DIAG_LOG_LEVEL_LOW = 5, VOCSDK_DIAG_LOG_LEVEL_HIGH = 10 }; Constants
See Also |