prov_device_ll_client.h

Includes

#include "umock_c/umock_c_prod.h"
#include "azure_macro_utils/macro_utils.h"
#include "azure_prov_client/prov_transport.h"

Detailed Description

Functions

Function Name Description
PROV_DEVICE_RESULTStrings
PROV_DEVICE_RESULT_FromString
PROV_DEVICE_REG_STATUSStrings
PROV_DEVICE_REG_STATUS_FromString
Prov_Device_LL_Create Creates a Provisioning Client for communications with the Device Provisioning Client Service.
Prov_Device_LL_Destroy Disposes of resources allocated by the provisioning Client.
Prov_Device_LL_Register_Device Asynchronous call initiates the registration of a device.
Prov_Device_LL_DoWork Api to be called by user when work (registering device) can be done.
Prov_Device_LL_SetOption API sets a runtime option identified by parameter optionName to a value pointed to by value.
Prov_Device_LL_GetVersionString API to get the version of the provisioning client.
Prov_Device_LL_Set_Provisioning_Payload Sets the Provisioning Data that is sent to the Provisioning service.
Prov_Device_LL_Get_Provisioning_Payload Retrieves the Provisioning Data that is sent from the Provisioning service.

Macro definitions

PROV_DEVICE_RESULT_VALUE

#define PROV_DEVICE_RESULT_VALUE \
        PROV_DEVICE_RESULT_OK, \
        PROV_DEVICE_RESULT_INVALID_ARG, \
        PROV_DEVICE_RESULT_SUCCESS, \
        PROV_DEVICE_RESULT_MEMORY, \
        PROV_DEVICE_RESULT_PARSING, \
        PROV_DEVICE_RESULT_TRANSPORT, \
        PROV_DEVICE_RESULT_INVALID_STATE, \
        PROV_DEVICE_RESULT_DEV_AUTH_ERROR, \
        PROV_DEVICE_RESULT_TIMEOUT, \
        PROV_DEVICE_RESULT_KEY_ERROR, \
        PROV_DEVICE_RESULT_ERROR, \
        PROV_DEVICE_RESULT_HUB_NOT_SPECIFIED, \
        PROV_DEVICE_RESULT_UNAUTHORIZED, \
        PROV_DEVICE_RESULT_DISABLED 

PROV_DEVICE_REG_STATUS_VALUES

#define PROV_DEVICE_REG_STATUS_VALUES \
        PROV_DEVICE_REG_STATUS_CONNECTED, \
        PROV_DEVICE_REG_STATUS_REGISTERING, \
        PROV_DEVICE_REG_STATUS_ASSIGNING, \
        PROV_DEVICE_REG_STATUS_ASSIGNED, \
        PROV_DEVICE_REG_STATUS_ERROR, \
        PROV_DEVICE_REG_HUB_NOT_SPECIFIED 

Enumeration types

PROV_DEVICE_RESULT

enum PROV_DEVICE_RESULT {
  PROV_DEVICE_RESULT_OK,
  PROV_DEVICE_RESULT_INVALID_ARG,
  PROV_DEVICE_RESULT_SUCCESS,
  PROV_DEVICE_RESULT_MEMORY,
  PROV_DEVICE_RESULT_PARSING,
  PROV_DEVICE_RESULT_TRANSPORT,
  PROV_DEVICE_RESULT_INVALID_STATE,
  PROV_DEVICE_RESULT_DEV_AUTH_ERROR,
  PROV_DEVICE_RESULT_TIMEOUT,
  PROV_DEVICE_RESULT_KEY_ERROR,
  PROV_DEVICE_RESULT_ERROR,
  PROV_DEVICE_RESULT_HUB_NOT_SPECIFIED,
  PROV_DEVICE_RESULT_UNAUTHORIZED,
  PROV_DEVICE_RESULT_DISABLED
}

PROV_DEVICE_REG_STATUS

enum PROV_DEVICE_REG_STATUS {
  PROV_DEVICE_REG_STATUS_CONNECTED,
  PROV_DEVICE_REG_STATUS_REGISTERING,
  PROV_DEVICE_REG_STATUS_ASSIGNING,
  PROV_DEVICE_REG_STATUS_ASSIGNED,
  PROV_DEVICE_REG_STATUS_ERROR,
  PROV_DEVICE_REG_HUB_NOT_SPECIFIED
}

Type definitions

PROV_DEVICE_LL_HANDLE

typedef struct PROV_INSTANCE_INFO_TAG* PROV_DEVICE_LL_HANDLE;

PROV_DEVICE_CLIENT_REGISTER_DEVICE_CALLBACK

typedef void(* PROV_DEVICE_CLIENT_REGISTER_DEVICE_CALLBACK) (
  PROV_DEVICE_RESULT  register_result,
  const char *        iothub_uri,
  const char *        device_id,
  void *              user_context
);

PROV_DEVICE_CLIENT_REGISTER_STATUS_CALLBACK

typedef void(* PROV_DEVICE_CLIENT_REGISTER_STATUS_CALLBACK) (
  PROV_DEVICE_REG_STATUS  reg_status,
  void *                  user_context
);

PROV_DEVICE_TRANSPORT_PROVIDER_FUNCTION

typedef const PROV_DEVICE_TRANSPORT_PROVIDER*(* PROV_DEVICE_TRANSPORT_PROVIDER_FUNCTION) (
    void
);

Constants and Variables

PROV_REGISTRATION_ID

const char* const PROV_REGISTRATION_ID = "registration_id";

PROV_OPTION_LOG_TRACE

const char* const PROV_OPTION_LOG_TRACE = "logtrace";

PROV_OPTION_TIMEOUT

const char* const PROV_OPTION_TIMEOUT = "provisioning_timeout";