Mistake on this page? Email us
protocol_api.h
Go to the documentation of this file.
1 /*
2  * ----------------------------------------------------------------------------
3  * Copyright 2018 ARM Ltd.
4  *
5  * SPDX-License-Identifier: Apache-2.0
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ----------------------------------------------------------------------------
19  */
20 
21 #ifndef PROTOCOL_API_H
22 #define PROTOCOL_API_H
23 
24 #include "jsonrpc/jsonrpc.h"
26 #include "edge-core/server.h"
27 #include "certificate-enrollment-client/ce_status.h"
28 #include "certificate-enrollment-client/ce_defs.h"
29 
50 void init_protocol();
51 
62 int protocol_translator_register(json_t *request, json_t *json_params, json_t **result, void *userdata);
63 
74 int device_register(json_t *request, json_t *json_params, json_t **result, void *userdata);
75 
87 int device_unregister(json_t *request, json_t *json_params, json_t **result, void *userdata);
88 
99 int write_value(json_t *request, json_t *json_params, json_t **result, void *userdata);
100 
111 int certificate_renewal_list_set(json_t *request, json_t *json_params, json_t **result, void *userdata);
112 
123 int renew_certificate(json_t *request, json_t *json_params, json_t **result, void *userdata);
124 
125 
129 typedef struct edgeclient_request_context edgeclient_request_context_t;
130 
131 
140 int write_to_pt(edgeclient_request_context_t *ctx, void *userdata);
141 
154 int certificate_renewal_notifier(const char *certificate_name, ce_status_e status, ce_initiator_e initiator, void *ctx);
155 
161 #endif /* PROTOCOL_API_H */
Edge service error codes.
void init_protocol()
Initialize Edge RPC API.
int write_value(json_t *request, json_t *json_params, json_t **result, void *userdata)
Write endpoint device values.
int renew_certificate(json_t *request, json_t *json_params, json_t **result, void *userdata)
Initiate certificate renewal operation for a certificate.
int protocol_translator_register(json_t *request, json_t *json_params, json_t **result, void *userdata)
Register the protocol translator to Edge.
int device_register(json_t *request, json_t *json_params, json_t **result, void *userdata)
Register an endpoint device to Edge.
int device_unregister(json_t *request, json_t *json_params, json_t **result, void *userdata)
Unregister an endpoint device from Edge.
int write_to_pt(edgeclient_request_context_t *ctx, void *userdata)
Writes the updated values to the protocol translator.
struct edgeclient_request_context edgeclient_request_context_t
The edgeclient request context data.
Definition: protocol_api.h:129
int certificate_renewal_list_set(json_t *request, json_t *json_params, json_t **result, void *userdata)
Set list of certificates to receive renewal status updates for.
int certificate_renewal_notifier(const char *certificate_name, ce_status_e status, ce_initiator_e initiator, void *ctx)
Writes the certificate renewal status to the protocol translator.