* limitations under the License.
*/
+#include "app_request.h"
+
#include <bundle_internal.h>
#include <ctype.h>
#include <dirent.h>
#include <memory>
#include <utility>
-#include "app_request.h"
-#include "app_signal.h"
-#include "aul_api.h"
-#include "aul_app_com.h"
+#include "aul_cmd.h"
#include "aul_error.h"
+#include "aul_sock.h"
#include "aul_util.h"
#include "key.h"
#include "launch.h"
int AppRequest::Send(int opt) {
traceBegin(TTRACE_TAG_APPLICATION_MANAGER, "AUL:REQ_TO_PAD");
std::string appid = bundle_.GetString(AUL_K_APPID);
- _W("Request cmd(%d): appid(%s), target_uid(%u)",
- cmd_, appid.c_str(), uid_);
+ _W("Request cmd(%d:%s): appid(%s), target_uid(%u)",
+ cmd_, aul_cmd_convert_to_string(cmd_), appid.c_str(), uid_);
SetTime();
switch (cmd_) {
bundle_.GetHandle(), opt);
if (ret < 0)
ret = aul_error_convert(ret);
- _W("Request cmd(%d): result(%d)", cmd_, ret);
+ _W("Request cmd(%d:%s): result(%d)",
+ cmd_, aul_cmd_convert_to_string(cmd_), ret);
if (ret == AUL_R_LOCAL)
ret = app_request_local(cmd_, bundle_.GetHandle());
traceEnd(TTRACE_TAG_APPLICATION_MANAGER);
}
int AppRequest::SendSimply(int opt) {
- _W("Request cmd(%d): target_uid(%u)", cmd_, uid_);
+ _W("Request cmd(%d:%s): target_uid(%u)",
+ cmd_, aul_cmd_convert_to_string(cmd_), uid_);
int ret = aul_sock_send_bundle(AUL_UTIL_PID, uid_, cmd_,
bundle_.GetHandle(), opt);
if (ret < 0)
ret = aul_error_convert(ret);
- _W("Request cmd(%d): result(%d)", cmd_, ret);
+ _W("Request cmd(%d:%s): result(%d)",
+ cmd_, aul_cmd_convert_to_string(cmd_), ret);
return ret;
}
int AppRequest::SendCmdOnly(int opt) {
- _W("Request cmd(%d): target_uid(%u)", cmd_, uid_);
+ _W("Request cmd(%d:%s): target_uid(%u)",
+ cmd_, aul_cmd_convert_to_string(cmd_), uid_);
int ret = aul_sock_send_raw(AUL_UTIL_PID, uid_, cmd_, nullptr, 0, opt);
- _W("Request cmd(%d): result(%d)", cmd_, ret);
+ _W("Request cmd(%d:%s): result(%d)",
+ cmd_, aul_cmd_convert_to_string(cmd_), ret);
return ret;
}