AWS IoT Device SDK C: Main
Return to main page ↑
Jobs

How to migrate a Jobs application from v3 to v4.

The Jobs library has been redesigned in v4 as a thread-aware library supporting asynchronous operations.

The features of the Jobs libraries in v3 and v4 are defined by the common AWS service; therefore, the two versions are similar.

Functions

The following table lists equivalent API functions in v3 and v4. These functions are the API functions declared in:

Version 3 Version 4 Notes
aws_iot_jobs_subscribe_to_job_messages
aws_iot_jobs_subscribe_to_all_job_messages
aws_iot_jobs_unsubscribe_from_job_messages
aws_iot_jobs_send_query
Specific Jobs operation function

These v3 functions for sending generic Jobs operations have been removed and replaced with individual functions for each supported Jobs operation.

In v3, the topicType parameter determined the Jobs operation. The equivalent functions in v4 are:

v3 topicType v4 Function
JOB_UNRECOGNIZED_TOPIC None (not valid)
JOB_GET_PENDING_TOPIC AwsIotJobs_GetPendingSync
JOB_START_NEXT_TOPIC AwsIotJobs_StartNextSync
JOB_DESCRIBE_TOPIC AwsIotJobs_DescribeSync
JOB_UPDATE_TOPIC AwsIotJobs_UpdateSync
JOB_NOTIFY_TOPIC AwsIotJobs_SetNotifyPendingCallback
JOB_NOTIFY_NEXT_TOPIC AwsIotJobs_SetNotifyNextCallback
JOB_WILDCARD_TOPIC Combination of functions, based on what the wildcard represented

For example, a call to aws_iot_jobs_send_query(..., topicType=JOB_GET_PENDING_TOPIC, ...) should be replaced with a call to the v4 API AwsIotJobs_GetPendingSync.

aws_iot_jobs_start_next AwsIotJobs_StartNextSync AwsIotJobs_StartNextAsync is the equivalent asynchronous function.
aws_iot_jobs_describe AwsIotJobs_DescribeSync AwsIotJobs_DescribeAsync is the equivalent asynchronous function.
aws_iot_jobs_update AwsIotJobs_UpdateSync AwsIotJobs_UpdateAsync is the equivalent asynchronous function.