You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.1 KiB
38 lines
1.1 KiB
#include "util.h"
|
|
|
|
int jd_get_target(EPM_action_message_t msg) {
|
|
POM_AM__set_application_bypass(true);
|
|
tag_t root_task, *attachments;
|
|
int att_cnt;
|
|
stringstream ss;
|
|
EPM_ask_root_task(msg.task, &root_task);
|
|
EPM_ask_attachments(root_task, EPM_target_attachment, &att_cnt, &attachments);
|
|
|
|
for (int i = 0;i < att_cnt;i++) {
|
|
char *item_id, *item_revision_id;
|
|
if (isTypeOf(attachments[i], "ItemRevision")) {
|
|
AOM_ask_value_string(attachments[i], "item_id", &item_id);
|
|
AOM_ask_value_string(attachments[i], "item_revision_id", &item_revision_id);
|
|
ss << item_id;
|
|
ss << "/";
|
|
ss << item_revision_id;
|
|
ss << ",";
|
|
}
|
|
}
|
|
string temp = ss.str().substr(0, ss.str().length() - 1);
|
|
//AOM_lock(root_task);
|
|
//AOM_set_value_string(root_task, "jd2_task_target", temp.c_str());
|
|
//AOM_save(root_task);
|
|
//AOM_unlock(root_task);
|
|
|
|
POM_AM__set_application_bypass(false);
|
|
ofstream out;
|
|
stringstream file_location;
|
|
file_location << getenv("temp");
|
|
file_location << "\\";
|
|
file_location << "jd2_task_target.txt";
|
|
out.open(file_location.str().c_str(), ios::out | ios::trunc);
|
|
out << temp.c_str() << endl;
|
|
out.close();
|
|
return 0;
|
|
} |