* limitations under the License.
*/
-#ifndef __TIZEN_APPFW_WATCHFACE_COMMON_INTERNAL_H__
-#define __TIZEN_APPFW_WATCHFACE_COMMON_INTERNAL_H__
+#ifndef WATCHFACE_COMMON_WATCHFACE_COMMON_INTERNAL_H_
+#define WATCHFACE_COMMON_WATCHFACE_COMMON_INTERNAL_H_
#include <tizen.h>
}
#endif
-#endif /* __TIZEN_APPFW_WATCHFACE_COMMON_INTERNAL_H__ */
+#endif // WATCHFACE_COMMON_WATCHFACE_COMMON_INTERNAL_H_
int type = GetDataType(shared_data);
bool is_valid = true;
- switch(type) {
+ switch (type) {
case WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT : {
if (shared_data.GetString(SHORT_TEXT_KEY).empty())
is_valid = false;
int ConvertPathToAppPath(const char* appid, bundle* data) {
list<string> key_list {ICON_KEY, IMAGE_KEY};
- for(auto& i : key_list) {
+ for (auto& i : key_list) {
char* path;
int ret = bundle_get_str(data, i.c_str(), &path);
if (ret != BUNDLE_ERROR_NONE)
#ifndef WATCHFACE_COMPLICATION_PROVIDER_COMPLICATION_PROVIDER_EVENT_INTERFACE_H_
#define WATCHFACE_COMPLICATION_PROVIDER_COMPLICATION_PROVIDER_EVENT_INTERFACE_H_
-#include <string>
#include <bundle_cpp.h>
+#include <string>
+
#include "watchface-complication/include/watchface-complication-internal.h"
namespace watchface_complication {
const std::string& sender_name, const char* sender_app_id,
int watcher_id, std::string watch_name)
: sender_name_(sender_name), sender_app_id_(sender_app_id),
- watcher_id_(watcher_id), watch_name_(watch_name), privilege_result_(COMPLICATION_CYNARA_UNKNOWN) {
+ watcher_id_(watcher_id), watch_name_(watch_name),
+ privilege_result_(COMPLICATION_CYNARA_UNKNOWN) {
}
int ComplicationProvider::Impl::SenderInfo::CheckPrivilege(
ComplicationProvider::Impl::SenderInfo* ComplicationProvider::Impl::GetSenderInfo(
std::string sender_name, GDBusConnection* connection, GVariant* parameters) {
-
auto iter = sender_info_.find(sender_name);
if (iter != sender_info_.end())
return iter->second;
return ret;
}
-bool ComplicationProvider::SetupReplyToEditor(std::string editor_appid, int editable_id, const char* raw) {
+bool ComplicationProvider::SetupReplyToEditor(std::string editor_appid,
+ int editable_id, const char* raw) {
bool emit_signal_ret = false;
try {
emit_signal_ret = ComplicationConnector::GetInst().EmitSignal(
#include <package-manager.h>
#include <pkgmgr-info.h>
+#include <list>
+
#include "watchface-complication/complication-connector.h"
#include "watchface-complication/complication-connector-implementation.h"
#include "watchface-common/watchface-exception.h"
#ifndef WATCHFACE_COMPLICATION_COMPLICATION_EVENT_INTERFACE_H_
#define WATCHFACE_COMPLICATION_COMPLICATION_EVENT_INTERFACE_H_
-#include <string>
#include <bundle_cpp.h>
+#include <string>
+
#include "watchface-complication/include/watchface-complication-internal.h"
namespace watchface_complication {
LOGI("Touch launch the %s : %d", provider_appid.c_str(), ret);
return util::ConvertAulError(ret);
-
} catch (const std::bad_alloc &ba) {
LOGE("Exception bad_alloc");
return WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY;
::DBHelper db;
if (!db.Open())
- return false;;
+ return false;
if (!db.Prepare(query))
return false;
#include <memory>
#include <list>
+#include <string>
#include "watchface-common/watchface-util.h"
#include "watchface-complication/gdbus-interface.h"
: conn_(conn) { }
virtual ~GDBus() {
- for(auto& id : subscribe_list_) {
+ for (auto& id : subscribe_list_) {
g_dbus_connection_signal_unsubscribe(conn_, id);
}
}
int SubscribeSignal(SigType type, std::string id,
int sub_id, IGDBus::IGDBusEvent* listener) {
-
LOGI("subscribe : %s, %d", id.c_str(), sub_id);
std::string path = util::EncodeStr(
type == Complication ?
} // namespace watchface_complication
-#endif // WATCHFACE_COMPLICATION_GDBUS_H_
\ No newline at end of file
+#endif // WATCHFACE_COMPLICATION_GDBUS_H_
virtual void Watch(IPackageEvent* pe) = 0;
virtual void UnWatch(IPackageEvent* pe) = 0;
virtual bool CheckDisabled(const std::string& appid) = 0;
-
};
} // namespace watchface_complication
#include <memory>
#include <list>
+#include <string>
namespace watchface_complication {
return true;
}
private:
-
};
} // namespace watchface_complication
-#endif // WATCHFACE_COMPLICATION_PACKAGE_MANAGER_H_
\ No newline at end of file
+#endif // WATCHFACE_COMPLICATION_PACKAGE_MANAGER_H_
#include <aul.h>
#include <dlog.h>
-#include "watchface-common/watchface-util.h"
#include "watchface-complication/include/watchface-complication.h"
#include "watchface-complication/include/watchface-complication-internal.h"
#include "watchface-complication/complication.h"
#include <unistd.h>
#include <utility>
#include <stdexcept>
+#include <vector>
#include "watchface-editor/editables-editor.h"
#include "watchface-editor/editables-editor-implementation.h"
impl_->edit_appid_.c_str(),
-1,
util::GetCmdStr(util::CmdType::EditableEditPreview),
- g_variant_new("(iis)", cur_data_idx, ed.GetEditableId(), ctx_str.c_str())
- );
+ g_variant_new("(iis)", cur_data_idx, ed.GetEditableId(), ctx_str.c_str()));
if (emit_result)
return WATCHFACE_COMPLICATION_ERROR_NONE;