leo hendrickson / Mbed OS example-Ethernet-mbed-Cloud-connect
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ce_defs.h Source File

ce_defs.h

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------------
00002 // Copyright 2018 ARM Ltd.
00003 //  
00004 // Licensed under the Apache License, Version 2.0 (the "License");
00005 // you may not use this file except in compliance with the License.
00006 // You may obtain a copy of the License at
00007 //  
00008 //     http://www.apache.org/licenses/LICENSE-2.0
00009 //  
00010 // Unless required by applicable law or agreed to in writing, software
00011 // distributed under the License is distributed on an "AS IS" BASIS,
00012 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013 // See the License for the specific language governing permissions and
00014 // limitations under the License.
00015 // ----------------------------------------------------------------------------
00016 
00017 #ifndef __CE_DEFS_H__
00018 #define __CE_DEFS_H__
00019 
00020 #ifdef __cplusplus
00021 extern "C" {
00022 #endif
00023 
00024 /**
00025 * @file ce_defs.h
00026 *  \brief Certificate Enrollment (CE) public defines. 
00027 * This file, along with `ce_status.h` (included by this file) contains all the defines exposed for the certificate renewal feature. 
00028 * It is included by `MbedCloudClient.h` so you don't need to include it directly.
00029 */
00030 
00031 #include "ce_status.h"
00032 
00033 /** Enumeration representing the initiator of a certificate renewal operation */
00034 typedef enum {
00035     CE_INITIATOR_DEVICE,                //!< Operation initiated by the application.
00036     CE_INITIATOR_SERVER                 //!< Operation initiated by the certificate enrollment service.
00037 } ce_initiator_e;
00038 
00039 //!< User callback for the certificate renewal feature. char* guaranteed to be persistent only in context of the callback!
00040 typedef void(*cert_renewal_cb_f)(const char*, ce_status_e , ce_initiator_e);
00041 
00042 #ifdef __cplusplus
00043 }
00044 #endif
00045 
00046 #endif  //__CE_DEFS_H__