/**
* @brief Sets the app-control that will be called when the job's execution criteria is satisfied.
+ * @remarks The @c app_control should be freed using @c bundle_free().
* @param[in] job Job handle
* @param[in] app_control App-control (bundle-exported)
* @return @c 0 on success, otherwise a negative error value
/**
* @brief Sets the notification that will be called when the job's execution criteria is satisfied.
+ * @remarks If the @c app_control is not @c NULL, it should be freed using @c bundle_free().
* @param[in] job Job handle
* @param[in] title Title text
* @param[in] content Content body text
node[KEY_PARAM] = __parameters;
}
-JobAppControl::JobAppControl(bundle* appCtrlBundle) :
- __appCtrlBundle(appCtrlBundle)
+JobAppControl::JobAppControl(bundle* appCtrlBundle)
{
+ __appCtrlBundle = bundle_dup(appCtrlBundle);
}
JobAppControl::JobAppControl(Json::Value& jsonNode)
const std::string& iconPath, bundle* appCtrlBundle) :
__title(title),
__content(content),
- __iconPath(iconPath),
- __appCtrlBundle(appCtrlBundle)
+ __iconPath(iconPath)
{
+ __appCtrlBundle = bundle_dup(appCtrlBundle);
}
JobNotification::JobNotification(Json::Value& jsonNode)