IoTivity C++ SDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OIC::Service::RemoteEnrollee Class Reference

This class represents Remote Enrollee device instance. More...

Inherits enable_shared_from_this< RemoteEnrollee >.

Public Member Functions

 ~RemoteEnrollee ()=default
 
void getStatus (const GetStatusCb callback)
 Get an Enrollee's status which includes provisioning status and last error code. More...
 
void getConfiguration (const GetConfigurationStatusCb callback)
 Get an Enrollee's configuration which includes WiFi supported frequency and device name. More...
 
void provisionSecurity (const SecurityProvStatusCb callback)
 Do security provisioning such as ownership tranfer to Enrollee. More...
 
void provisionSecurity (const SecurityProvStatusCbWithOption callback)
 Do security provisioning such as ownership tranfer to Enrollee which may require more specific user selections like a type of ownership transfer method or pre-configured pin number used to Pre-configured pin-based MOT. More...
 
void provisionDeviceProperties (const DeviceProp &devProp, const DevicePropProvStatusCb callback)
 Provision WiFi AP information and device configuration to Enrollee. More...
 
void provisionCloudProperties (const CloudProp &cloudProp, const CloudPropProvStatusCb callback)
 Provision Cloud information to Enrollee, which includes Auth code, auth provider, Cloud interface server URL, and etc. More...
 
void provisionCloudProperties (const std::shared_ptr< OC::OCResource > resource, const CloudProp &cloudProp, const CloudPropProvStatusCb callback)
 Provision Cloud information to Enrollee, which includes Auth code, auth provider, Cloud interface server URL, and etc. More...
 
void requestToConnect (const std::vector< ES_CONNECT_TYPE > &connectTypes, const ConnectRequestStatusCb callback)
 Notify an Enrollee to Connect WiFi/Cloud. More...
 

Friends

class EasySetup
 

Detailed Description

This class represents Remote Enrollee device instance.

What operation the class provides: 1) Ownership transfer for enabling secured communication between Mediator and Enrollee devices. 2) Provision WiFi AP information used for which Enrollee is going to connect to the AP 3) Provision Device confiruation setting, i.e. language, country, and etc 4) Provision Cloud information used for which Enrollee is going to register to the cloud

Constructor & Destructor Documentation

OIC::Service::RemoteEnrollee::~RemoteEnrollee ( )
default

Member Function Documentation

void OIC::Service::RemoteEnrollee::getConfiguration ( const GetConfigurationStatusCb  callback)

Get an Enrollee's configuration which includes WiFi supported frequency and device name.

Parameters
callbackwill give the requested configuration
Exceptions
ESInvalidParameterExceptionIf callback is null.
ESBadRequestExceptionIf RemoteEnrollee device not created prior to this call.
See Also
GetConfigurationStatusCb
void OIC::Service::RemoteEnrollee::getStatus ( const GetStatusCb  callback)

Get an Enrollee's status which includes provisioning status and last error code.

Parameters
callbackwill give the requested status
Exceptions
ESInvalidParameterExceptionIf callback is null.
ESBadRequestExceptionIf RemoteEnrollee device not created prior to this call.
See Also
GetStatusCb
void OIC::Service::RemoteEnrollee::provisionCloudProperties ( const CloudProp cloudProp,
const CloudPropProvStatusCb  callback 
)

Provision Cloud information to Enrollee, which includes Auth code, auth provider, Cloud interface server URL, and etc.

In this function, Discovery for the Enrollee will happen again in a given network. Because, this function is expected to call AFTER the Enrollee disconnects its Soft AP and successfully connects to the certain WiFi AP. In that case, Mediator should discover the Enrollee with a certain Device ID in the network.

Parameters
cloudPropa data structure storing the above information to be delivered
callbackwill give the result if the provisioning succeeds or fails
Exceptions
ESInvalidParameterExceptionIf callback is null.
ESBadRequestExceptionIf RemoteEnrollee device not created prior to this call.
See Also
CloudProp
CloudPropProvStatusCb
void OIC::Service::RemoteEnrollee::provisionCloudProperties ( const std::shared_ptr< OC::OCResource resource,
const CloudProp cloudProp,
const CloudPropProvStatusCb  callback 
)

Provision Cloud information to Enrollee, which includes Auth code, auth provider, Cloud interface server URL, and etc.

Note that, this API is skipping finding Enrollee in a given network. Instead, an OCResource given as a first parameter will be considered to the Enrollee for cloud provisioning.

Parameters
resourcean OCResource corresponding to a target Enrollee for cloud provisioning
cloudPropa data structure storing the above information to be delivered
callbackwill give the result if the provisioning succeeds or fails
Exceptions
ESInvalidParameterExceptionIf callback is null.
ESBadRequestExceptionIf RemoteEnrollee device not created prior to this call.
See Also
CloudProp
CloudPropProvStatusCb
void OIC::Service::RemoteEnrollee::provisionDeviceProperties ( const DeviceProp devProp,
const DevicePropProvStatusCb  callback 
)

Provision WiFi AP information and device configuration to Enrollee.

  1. WiFi AP information includes a SSID, password, auth type, and encryption type.
  2. Device configuration includes a language (IETF language tags) and country (ISO 3166-1 Alpha-2)
Parameters
devPropa data structure storing the above information to be delivered
callbackwill give the result if the provisioning succeeds or fails
Exceptions
ESInvalidParameterExceptionIf callback is null.
ESBadRequestExceptionIf RemoteEnrollee device not created prior to this call.
See Also
DeviceProp
DevicePropProvStatusCb
void OIC::Service::RemoteEnrollee::provisionSecurity ( const SecurityProvStatusCb  callback)

Do security provisioning such as ownership tranfer to Enrollee.

Parameters
callbackwill give the result if the security provisioning succeeds or fails for some reasons
Exceptions
ESInvalidParameterExceptionIf callback is null.
ESBadRequestExceptionIf RemoteEnrollee device not created prior to this call.
See Also
SecurityProvStatusCb
void OIC::Service::RemoteEnrollee::provisionSecurity ( const SecurityProvStatusCbWithOption  callback)

Do security provisioning such as ownership tranfer to Enrollee which may require more specific user selections like a type of ownership transfer method or pre-configured pin number used to Pre-configured pin-based MOT.

Parameters
callbackwill give the result if the security provisioning succeeds or fails for some reasons.
Exceptions
ESInvalidParameterExceptionIf callback is null.
ESBadRequestExceptionIf RemoteEnrollee device not created prior to this call.
See Also
SecurityProvStatusCb
void OIC::Service::RemoteEnrollee::requestToConnect ( const std::vector< ES_CONNECT_TYPE > &  connectTypes,
const ConnectRequestStatusCb  callback 
)

Notify an Enrollee to Connect WiFi/Cloud.

Parameters
connectTypesTarget configurations to be connected. E.g. WiFi and coap cloud server
callbackwill give the result if the connect request succeeds or fails
See Also
ES_CONNECT_TYPE
ConnectRequestStatusCb

Friends And Related Function Documentation

friend class EasySetup
friend

The documentation for this class was generated from the following file: