/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "clipboard-impl.h"
// EXTERNAL INCLUDES
+// Ecore is littered with C style cast
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wold-style-cast"
#include <Ecore.h>
#include <Ecore_Wayland.h>
#include <dali/public-api/object/any.h>
#ifndef CBHM_DBUS_INTERFACE
#define CBHM_DBUS_INTERFACE "org.tizen.cbhm.dbus"
#endif /* CBHM_DBUS_INTERFACE */
-
-#define CLIPBOARD_STR "CLIPBOARD_STR"
+#define CBHM_COUNT_ALL 0 // ATOM_INDEX_CBHM_COUNT_ALL
///////////////////////////////////////////////////////////////////////////////////////////////////
// Clipboard
// ELM_SEL_TYPE_CLIPBOARD - To distinguish clipboard selection in cbhm
types[++i] = "CLIPBOARD_BEGIN";
- types[++i] = "application/x-elementary-markup";
- types[++i] = "text/plain";
types[++i] = "text/plain;charset=utf-8";
// ELM_SEL_TYPE_CLIPBOARD - To distinguish clipboard selection in cbhm
const char *types[10] = {0, };
int i = -1;
- types[++i] = "application/x-elementary-markup";
- types[++i] = "text/plain";
types[++i] = "text/plain;charset=utf-8";
ecore_wl_dnd_selection_get(ecore_wl_input_get(), *types);
}
}
eldbus_message_ref(req);
+ eldbus_message_arguments_append(req, "i", CBHM_COUNT_ALL) ;
reply = eldbus_proxy_send_and_block(eldbus_proxy, req, 100);
if (!reply || eldbus_message_error_get(reply, &errname, &errmsg))
{
DALI_LOG_ERROR("Unable to call method org.freedesktop.DBus.Properties.Get: %s %s",
errname, errmsg);
eldbus_message_unref(req);
+ if( reply )
+ {
+ eldbus_message_unref(reply);
+ }
return -1;
}
{
DALI_LOG_ERROR("Cannot get arguments from eldbus");
eldbus_message_unref(req);
+ eldbus_message_unref(reply);
return -1;
}
eldbus_message_unref(req);
+ eldbus_message_unref(reply);
DALI_LOG_ERROR("cbhm item count(%d)", count);
return count;
}
Clipboard::~Clipboard()
{
+ delete mImpl;
}
Dali::Clipboard Clipboard::Get()
} // namespace Internal
} // namespace Dali
+
+#pragma GCC diagnostic pop