Microsoft Information Protection (MIP) SDK for C: Reference 1.15
Doxygen-generated documentation for MIP SDK written in C
Loading...
Searching...
No Matches
error_cc.h
Go to the documentation of this file.
1/*
2 *
3 * Copyright (c) Microsoft Corporation.
4 * All rights reserved.
5 *
6 * This code is licensed under the MIT License.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files(the "Software"), to deal
10 * in the Software without restriction, including without limitation the rights
11 * to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
12 * copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions :
14 *
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 * THE SOFTWARE.
25 *
26 */
27
28/**
29 * @brief Error definition and functions
30 *
31 * @file error_cc.h
32 */
33
34#ifndef API_MIP_ERROR_CC_H_
35#define API_MIP_ERROR_CC_H_
36
37#include "mip_cc/result_cc.h"
38
39#define ERROR_STRING_BUFFER_SIZE 1024
40
41typedef enum {
42 MIP_NETWORK_ERROR_CATEGORY_UNKNOWN, /**< Unknown network failure */
43 MIP_NETWORK_ERROR_CATEGORY_FAILURE_RESPONSE_CODE, /**< HTTP response code indicates failure */
44 MIP_NETWORK_ERROR_CATEGORY_BAD_RESPONSE, /**< HTTP response could not be read */
45 MIP_NETWORK_ERROR_CATEGORY_UNEXPECTED_RESPONSE, /**< HTTP response completed but contained unexpected data */
46 MIP_NETWORK_ERROR_CATEGORY_NO_CONNECTION, /**< Failed to establish a connection */
47 MIP_NETWORK_ERROR_CATEGORY_PROXY, /**< Proxy failure */
48 MIP_NETWORK_ERROR_CATEGORY_SSL, /**< SSL failure */
49 MIP_NETWORK_ERROR_CATEGORY_TIMEOUT, /**< Connection timed out */
50 MIP_NETWORK_ERROR_CATEGORY_OFFLINE, /**< Operation requires network connectivity */
51 MIP_NETWORK_ERROR_CATEGORY_THROTTLED, /**< HTTP operation failed due to server traffic throttling */
52 MIP_NETWORK_ERROR_CATEGORY_CANCELLED, /**< HTTP operation has been cancelled by the application */
53 MIP_NETWORK_ERROR_CATEGORY_FUNCTION_NOT_IMPLEMENTED, /**< HTTP operation has been cancelled by the application */
54 MIP_NETWORK_ERROR_CATEGORY_SERVICE_UNAVAILABLE, /**< HTTP response code indicates service is unavailable */
56
57typedef enum {
58 MIP_SERVICE_DISABLED_ERROR_EXTENT_USER, /**< Service is disabled for the user. */
59 MIP_SERVICE_DISABLED_ERROR_EXTENT_DEVICE, /**< Service is disabled for the device. */
60 MIP_SERVICE_DISABLED_ERROR_EXTENT_PLATFORM, /**< Service is disabled for the platform. */
61 MIP_SERVICE_DISABLED_ERROR_EXTENT_TENANT, /**< Service is disabled for the tenant. */
63
75
76/**
77 * @brief Error information
78 */
79typedef struct {
82
83 union {
86 };
87
88 // MIP_RESULT_ERROR_NETWORK details
90
91 // MIP_RESULT_ERROR_NO_PERMISSIONS details
92 char noPermissionsError_Owner[ERROR_STRING_BUFFER_SIZE];
93 char noPermissionsError_Referrer[ERROR_STRING_BUFFER_SIZE];
94
95 // MIP_RESULT_ERROR_SERVICE_DISABLED details
98
99#endif // API_MIP_ERROR_CC_H_
#define ERROR_STRING_BUFFER_SIZE
Definition error_cc.h:39
mip_cc_network_error_category
Definition error_cc.h:41
@ MIP_NETWORK_ERROR_CATEGORY_SERVICE_UNAVAILABLE
HTTP response code indicates service is unavailable.
Definition error_cc.h:54
@ MIP_NETWORK_ERROR_CATEGORY_UNKNOWN
Unknown network failure.
Definition error_cc.h:42
@ MIP_NETWORK_ERROR_CATEGORY_NO_CONNECTION
Failed to establish a connection.
Definition error_cc.h:46
@ MIP_NETWORK_ERROR_CATEGORY_UNEXPECTED_RESPONSE
HTTP response completed but contained unexpected data.
Definition error_cc.h:45
@ MIP_NETWORK_ERROR_CATEGORY_FAILURE_RESPONSE_CODE
HTTP response code indicates failure.
Definition error_cc.h:43
@ MIP_NETWORK_ERROR_CATEGORY_PROXY
Proxy failure.
Definition error_cc.h:47
@ MIP_NETWORK_ERROR_CATEGORY_SSL
SSL failure.
Definition error_cc.h:48
@ MIP_NETWORK_ERROR_CATEGORY_CANCELLED
HTTP operation has been cancelled by the application.
Definition error_cc.h:52
@ MIP_NETWORK_ERROR_CATEGORY_FUNCTION_NOT_IMPLEMENTED
HTTP operation has been cancelled by the application.
Definition error_cc.h:53
@ MIP_NETWORK_ERROR_CATEGORY_BAD_RESPONSE
HTTP response could not be read.
Definition error_cc.h:44
@ MIP_NETWORK_ERROR_CATEGORY_TIMEOUT
Connection timed out.
Definition error_cc.h:49
@ MIP_NETWORK_ERROR_CATEGORY_THROTTLED
HTTP operation failed due to server traffic throttling.
Definition error_cc.h:51
@ MIP_NETWORK_ERROR_CATEGORY_OFFLINE
Operation requires network connectivity.
Definition error_cc.h:50
mip_cc_no_permissions_error_category
Definition error_cc.h:64
@ MIP_NO_PERMISSIONS_ERROR_CLIENT_NOT_UPDATED
The SDK used by the client application does not support the requested operation.
Definition error_cc.h:73
@ MIP_NO_PERMISSIONS_ERROR_NOT_OWNER
Definition error_cc.h:71
@ MIP_NO_PERMISSIONS_ERROR_ACCESS_EXPIRED
Definition error_cc.h:68
@ MIP_NO_PERMISSIONS_ERROR_UNKNOWN
Unknown no permissions failure.
Definition error_cc.h:65
@ MIP_NO_PERMISSIONS_ERROR_UNKNOWN_TENANT
Definition error_cc.h:70
@ MIP_NO_PERMISSIONS_ERROR_USER_NOT_FOUND
User was not found.
Definition error_cc.h:66
@ MIP_NO_PERMISSIONS_ERROR_ACCESS_DENIED
Definition error_cc.h:67
@ MIP_NO_PERMISSIONS_ERROR_NOT_PREMIUM_LICENSE_USER
Definition error_cc.h:72
@ MIP_NO_PERMISSIONS_ERROR_INVALID_EMAIL
Definition error_cc.h:69
mip_cc_service_disabled_error_extent
Definition error_cc.h:57
@ MIP_SERVICE_DISABLED_ERROR_EXTENT_USER
Service is disabled for the user.
Definition error_cc.h:58
@ MIP_SERVICE_DISABLED_ERROR_EXTENT_DEVICE
Service is disabled for the device.
Definition error_cc.h:59
@ MIP_SERVICE_DISABLED_ERROR_EXTENT_PLATFORM
Service is disabled for the platform.
Definition error_cc.h:60
@ MIP_SERVICE_DISABLED_ERROR_EXTENT_TENANT
Service is disabled for the tenant.
Definition error_cc.h:61
const char * description
Defines success/error result codes.
mip_cc_result
API success/failure result.
Definition result_cc.h:44
Error information.
Definition error_cc.h:79
mip_cc_service_disabled_error_extent serviceDisabledError_Extent
Definition error_cc.h:96
int32_t networkError_ResponseCode
Definition error_cc.h:89
mip_cc_no_permissions_error_category noPermissionsError_Category
Definition error_cc.h:85
mip_cc_result result
Definition error_cc.h:80
mip_cc_network_error_category networkError_Category
Definition error_cc.h:84