AWS IoT Device SDK C: Jobs
AWS IoT Jobs library
Return to main page ↑
AwsIotJobsCallbackParam_t Struct Reference

Parameter to a Jobs callback function. More...

#include <aws_iot_jobs_types.h>

Data Fields

AwsIotJobsCallbackType_t callbackType
 Reason for invoking the Jobs callback function to provide context.
 
const char * pThingName
 The Thing Name associated with this Jobs callback.
 
size_t thingNameLength
 Length of AwsIotJobsCallbackParam_t.pThingName.
 
IotMqttConnection_t mqttConnection
 The MQTT connection associated with the Jobs callback.
 
union {
   struct {
      AwsIotJobsError_t   result
 Result of Jobs operation, e.g. succeeded or failed.
 
      AwsIotJobsOperation_t   reference
 Reference to the Jobs operation that completed.
 
      const char *   pResponse
 Response retrieved from the Jobs service.
 
      size_t   responseLength
 Length of retrieved response.
 
   }   operation
 Information on a completed Jobs operation.
 
   struct {
      const char *   pDocument
 Job execution document received on callback.
 
      size_t   documentLength
 Length of job execution document.
 
   }   callback
 Jobs document from an incoming delta or updated topic.
 
u
 Valid member depends on callback type.
 

Detailed Description

Parameter to a Jobs callback function.

Parameter for: Jobs callback functions

The Jobs library passes this struct to a callback function whenever a Jobs operation completes or a message is received on a Jobs notify-pending or notify-next topic.

The valid members of this struct are different based on AwsIotJobsCallbackParam_t.callbackType. If the callback type is AWS_IOT_JOBS_GET_PENDING_COMPLETE, AWS_IOT_JOBS_START_NEXT_COMPLETE, AWS_IOT_JOBS_DESCRIBE_COMPLETE, or AWS_IOT_JOBS_UPDATE_COMPLETE, then AwsIotJobsCallbackParam_t.operation is valid. Otherwise, if the callback type is AWS_IOT_JOBS_NOTIFY_PENDING_CALLBACK or AWS_IOT_JOBS_NOTIFY_NEXT_CALLBACK, then AwsIotJobsCallbackParam_t.callback is valid.

Attention
Any pointers in this callback parameter may be freed as soon as the callback function returns. Therefore, data must be copied if it is needed after the callback function returns.
The Jobs library may set strings that are not NULL-terminated.
See also
AwsIotJobsCallbackInfo_t for the signature of a callback function.

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