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 "est_defs.h"
28 #include "certificate-enrollment-client/ce_status.h"
29 #include "certificate-enrollment-client/ce_defs.h"
30 
51 void init_protocol();
52 
63 int protocol_translator_register(json_t *request, json_t *json_params, json_t **result, void *userdata);
64 
75 int device_register(json_t *request, json_t *json_params, json_t **result, void *userdata);
76 
88 int device_unregister(json_t *request, json_t *json_params, json_t **result, void *userdata);
89 
100 int write_value(json_t *request, json_t *json_params, json_t **result, void *userdata);
101 
112 int certificate_renewal_list_set(json_t *request, json_t *json_params, json_t **result, void *userdata);
113 
124 int renew_certificate(json_t *request, json_t *json_params, json_t **result, void *userdata);
125 
135 int est_request_enrollment(json_t *request, json_t *json_params, json_t **result, void *userdata);
136 
140 typedef struct edgeclient_request_context edgeclient_request_context_t;
141 
142 
151 int write_to_pt(edgeclient_request_context_t *ctx, void *userdata);
152 
165 int certificate_renewal_notifier(const char *certificate_name, ce_status_e status, ce_initiator_e initiator, void *ctx);
166 
176 int est_enrollment_result_notifier(est_enrollment_result_e result, struct cert_chain_context_s *cert_chain, void *ctx);
177 
183 #endif /* PROTOCOL_API_H */
int est_enrollment_result_notifier(est_enrollment_result_e result, struct cert_chain_context_s *cert_chain, void *ctx)
Sends the EST enrollment result to the protocol translator.
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 est_request_enrollment(json_t *request, json_t *json_params, json_t **result, void *userdata)
Requests an EST enrollment for a certificate.
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:140
Definition: pt_certificate_api.h:105
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.