Wasabi ExpressPlay SDK for iOS
1.10
Main Page
Modules
Data Structures
Files
File List
Globals
Client
ThirdParty
Sushi
Source
Common
Core
ShiResults.h
Go to the documentation of this file.
1
/*****************************************************************
2
|
3
| Sushi - Result Codes
4
|
5
| $Id: ShiResults.h 7930 2014-06-25 11:05:10Z jebaseelir $
6
| Original author: Gilles Boccon-Gibod
7
|
8
| This software is provided to you pursuant to your agreement
9
| with Intertrust Technologies Corporation ("Intertrust").
10
| This software may be used only in accordance with the terms
11
| of the agreement.
12
|
13
| Copyright (c) 2005-2014 by Intertrust. All rights reserved.
14
|
15
****************************************************************/
21
#ifndef _SHI_RESULTS_H_
22
#define _SHI_RESULTS_H_
23
24
/*----------------------------------------------------------------------
25
| macros
26
+---------------------------------------------------------------------*/
27
#define SHI_SUCCESS 0
28
#define SHI_FAILURE (-1)
29
30
#define SHI_FAILED(_result) ((_result) != SHI_SUCCESS)
31
#define SHI_SUCCEEDED(_result) ((_result) == SHI_SUCCESS)
32
33
/*----------------------------------------------------------------------
34
| error code bases
35
+---------------------------------------------------------------------*/
36
#if !defined(SHI_ERROR_BASE)
37
#define SHI_ERROR_BASE (-50000)
38
#endif
39
40
/* error codes bases for the external API */
41
#define SHI_ERROR_BASE_GENERAL (SHI_ERROR_BASE - 0 )
42
#define SHI_ERROR_BASE_API (SHI_ERROR_BASE - 5000)
43
44
#define SHI_ERROR_BASE_API_APPLICATION (SHI_ERROR_BASE_API - 0)
45
#define SHI_ERROR_BASE_API_ENGINE (SHI_ERROR_BASE_API - 100)
46
#define SHI_ERROR_BASE_API_NETWORK (SHI_ERROR_BASE_API - 200)
47
#define SHI_ERROR_BASE_API_LICENSE (SHI_ERROR_BASE_API - 300)
48
#define SHI_ERROR_BASE_API_FINGERPRINT (SHI_ERROR_BASE_API - 400)
49
#define SHI_ERROR_BASE_API_TRANSACTION (SHI_ERROR_BASE_API - 500)
50
51
/* general error codes */
52
#define SHI_ERROR_OUT_OF_MEMORY (SHI_ERROR_BASE_GENERAL - 0)
53
#define SHI_ERROR_OUT_OF_RESOURCES (SHI_ERROR_BASE_GENERAL - 1)
54
#define SHI_ERROR_INTERNAL (SHI_ERROR_BASE_GENERAL - 2)
55
#define SHI_ERROR_INVALID_PARAMETERS (SHI_ERROR_BASE_GENERAL - 3)
56
#define SHI_ERROR_INVALID_STATE (SHI_ERROR_BASE_GENERAL - 4)
57
#define SHI_ERROR_NOT_IMPLEMENTED (SHI_ERROR_BASE_GENERAL - 5)
58
#define SHI_ERROR_OUT_OF_RANGE (SHI_ERROR_BASE_GENERAL - 6)
59
#define SHI_ERROR_ACCESS_DENIED (SHI_ERROR_BASE_GENERAL - 7)
60
#define SHI_ERROR_INVALID_SYNTAX (SHI_ERROR_BASE_GENERAL - 8)
61
#define SHI_ERROR_NOT_SUPPORTED (SHI_ERROR_BASE_GENERAL - 9)
62
#define SHI_ERROR_INVALID_FORMAT (SHI_ERROR_BASE_GENERAL - 10)
63
#define SHI_ERROR_NOT_ENOUGH_SPACE (SHI_ERROR_BASE_GENERAL - 11)
64
#define SHI_ERROR_NO_SUCH_ITEM (SHI_ERROR_BASE_GENERAL - 12)
65
#define SHI_ERROR_NO_SUCH_INTERFACE (SHI_ERROR_BASE_GENERAL - 13)
66
#define SHI_ERROR_NOT_AVAILABLE (SHI_ERROR_BASE_GENERAL - 14)
67
#define SHI_ERROR_TIMEOUT (SHI_ERROR_BASE_GENERAL - 15)
68
#define SHI_ERROR_WRONG_THREAD (SHI_ERROR_BASE_GENERAL - 16)
69
#define SHI_ERROR_THREAD_LOCAL_FAILURE (SHI_ERROR_BASE_GENERAL - 17)
70
#define SHI_ERROR_DB_CONSTRAINT (SHI_ERROR_BASE_GENERAL - 18)
71
#define SHI_ERROR_INVALID_STOP_EVENT (SHI_ERROR_BASE_GENERAL - 19)
72
#define SHI_ERROR_METERING_FAILURE (SHI_ERROR_BASE_GENERAL - 20)
73
#define SHI_ERROR_ILLEGAL_URL (SHI_ERROR_BASE_GENERAL - 21)
74
75
/* standard error codes */
76
/* these are special codes to convey an errno */
77
/* the error code is (SHI_ERROR_BASE_ERRNO - errno) */
78
/* where errno is the positive integer from errno.h */
79
#define SHI_ERROR_BASE_ERRNO (SHI_ERROR_BASE-4000)
80
#define SHI_ERROR_ERRNO(e) (SHI_ERROR_BASE_ERRNO - (e))
81
82
#endif
/* _SHI_RESULTS_H_ */