Microsoft Information Protection SDK - C 1.17
API Reference Documentation for C
Loading...
Searching...
No Matches
http_delegate_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
34#ifndef API_MIP_HTTP_DELEGATE_CC_H_
35#define API_MIP_HTTP_DELEGATE_CC_H_
36
37#include <stddef.h>
38#include <stdint.h>
39
41#include "mip_cc/error_cc.h"
43#include "mip_cc/result_cc.h"
44
52
60
64typedef struct {
65 const char* name;
66 const char* value;
68
72typedef struct {
73 const char* id;
75 const char* url;
76 int64_t bodySize;
77 const uint8_t* body;
78 int64_t headersCount;
81
85typedef struct {
86 const char* id;
87 int32_t statusCode;
88 int64_t bodySize;
89 const uint8_t* body;
90 int64_t headersCount;
93
100MIP_CC_CALLBACK(mip_cc_http_send_callback_fn /*typename*/,
101 void /*return*/,
102 const mip_cc_http_request* /*request*/,
103 const void* /*context*/);
104
110MIP_CC_CALLBACK(mip_cc_http_cancel_callback_fn /*typename*/,
111 void /*return*/,
112 const char* /*requestId*/);
113
115
126MIP_CC_API(mip_cc_result) MIP_CC_CreateHttpDelegate(
127 const mip_cc_http_send_callback_fn sendCallback,
128 const mip_cc_http_cancel_callback_fn cancelCallback,
131
143MIP_CC_API(void) MIP_CC_NotifyHttpDelegateResponse(
145 const char* requestId,
148
154MIP_CC_API(void) MIP_CC_ReleaseHttpDelegate(mip_cc_http_delegate httpDelegate);
155
156#endif // API_MIP_HTTP_DELEGATE_CC_H_
A file Containing the common types used by the upe, file and protection modules.
Error definition and functions.
const char const mip_cc_http_result result
Definition http_delegate_cc.h:146
mip_cc_http_request_type
HTTP request type.
Definition http_delegate_cc.h:48
@ HTTP_REQUEST_TYPE_GET
Definition http_delegate_cc.h:49
@ HTTP_REQUEST_TYPE_POST
Definition http_delegate_cc.h:50
const mip_cc_http_cancel_callback_fn mip_cc_http_delegate mip_cc_error * errorInfo
Definition http_delegate_cc.h:130
mip_cc_handle * mip_cc_http_delegate
Definition http_delegate_cc.h:114
const char const mip_cc_http_result const mip_cc_http_response * response
Definition http_delegate_cc.h:147
const mip_cc_http_cancel_callback_fn mip_cc_http_delegate * httpDelegate
Definition http_delegate_cc.h:129
const char * requestId
Definition http_delegate_cc.h:145
const mip_cc_http_cancel_callback_fn cancelCallback
Definition http_delegate_cc.h:128
mip_cc_http_result
Success/failure state of the HTTP operation.
Definition http_delegate_cc.h:56
@ HTTP_RESULT_FAILURE
Definition http_delegate_cc.h:58
@ HTTP_RESULT_OK
Definition http_delegate_cc.h:57
MIP_CC_CALLBACK(mip_cc_http_send_callback_fn, void, const mip_cc_http_request *, const void *)
Callback function definition for issuing an HTTP request.
MIP_CC_API(void) MIP_CC_NotifyHttpDelegateResponse(const mip_cc_http_delegate httpDelegate
Notifies an HTTP delegate that an HTTP response is ready.
Export/import and other macros for C API.
Defines success/error result codes.
mip_cc_result
API success/failure result.
Definition result_cc.h:44
Error information.
Definition error_cc.h:79
Opaque handle to MIP object.
Definition common_types_cc.h:44
HTTP request/response header.
Definition http_delegate_cc.h:64
const char * name
Definition http_delegate_cc.h:65
const char * value
Definition http_delegate_cc.h:66
HTTP request.
Definition http_delegate_cc.h:72
int64_t bodySize
Definition http_delegate_cc.h:76
const char * url
Definition http_delegate_cc.h:75
int64_t headersCount
Definition http_delegate_cc.h:78
const mip_cc_http_header * headers
Definition http_delegate_cc.h:79
mip_cc_http_request_type type
Definition http_delegate_cc.h:74
const uint8_t * body
Definition http_delegate_cc.h:77
const char * id
Definition http_delegate_cc.h:73
HTTP response.
Definition http_delegate_cc.h:85
const mip_cc_http_header * headers
Definition http_delegate_cc.h:91
int64_t bodySize
Definition http_delegate_cc.h:88
int32_t statusCode
Definition http_delegate_cc.h:87
int64_t headersCount
Definition http_delegate_cc.h:90
const char * id
Definition http_delegate_cc.h:86
const uint8_t * body
Definition http_delegate_cc.h:89