Move IBus definitions to a dedicated header file
authorEduardo Lima (Etrunko) <eduardo.lima@intel.com>
Fri, 20 Sep 2013 19:34:14 +0000 (16:34 -0300)
committerEduardo Lima (Etrunko) <eduardo.lima@intel.com>
Fri, 20 Sep 2013 20:22:51 +0000 (17:22 -0300)
Change-Id: Iddfe3bc5cccd46087d0d78834b3320b0d49c8df2
Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
src/Makefile.am
src/wkb-ibus-config.c
src/wkb-ibus-defs.h [new file with mode: 0644]
src/wkb-ibus-panel.c
src/wkb-ibus.c
src/wkb-ibus.h

index 2d30b50..7fd9c02 100644 (file)
@@ -37,6 +37,7 @@ noinst_PROGRAMS +=                            \
 weekeyboard_ibus_test_SOURCES =                        \
        wkb-ibus.h                              \
        wkb-ibus.c                              \
+       wkb-ibus-defs.h                         \
        wkb-ibus-panel.c                        \
        wkb-ibus-config.c                       \
        wkb-ibus-config-key.c                   \
index 0c6e3bc..5ed7535 100644 (file)
@@ -21,6 +21,7 @@
 #include <Eldbus.h>
 
 #include "wkb-ibus.h"
+#include "wkb-ibus-defs.h"
 #include "wkb-ibus-config-eet.h"
 
 static struct wkb_ibus_config_eet *_conf_eet = NULL;
diff --git a/src/wkb-ibus-defs.h b/src/wkb-ibus-defs.h
new file mode 100644 (file)
index 0000000..e45d4c6
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright © 2013 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _WKB_IBUS_DEFS_H_
+#define _WKB_IBUS_DEFS_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* from ibusshare.h */
+#define IBUS_SERVICE_IBUS       "org.freedesktop.IBus"
+#define IBUS_SERVICE_PANEL      "org.freedesktop.IBus.Panel"
+#define IBUS_SERVICE_CONFIG     "org.freedesktop.IBus.Config"
+
+#define IBUS_PATH_IBUS          "/org/freedesktop/IBus"
+#define IBUS_PATH_PANEL         "/org/freedesktop/IBus/Panel"
+#define IBUS_PATH_CONFIG        "/org/freedesktop/IBus/Config"
+
+#define IBUS_INTERFACE_IBUS     "org.freedesktop.IBus"
+#define IBUS_INTERFACE_PANEL    "org.freedesktop.IBus.Panel"
+#define IBUS_INTERFACE_CONFIG   "org.freedesktop.IBus.Config"
+
+/* from ibustypes.h/ibuserror.c */
+#define IBUS_ERROR_NO_ENGINE    "org.freedesktop.IBus.Error.NoEngine"
+#define IBUS_ERROR_NO_CONFIG    "org.freedesktop.IBus.Error.NoConfig"
+#define IBUS_ERROR_FAILED       "org.freedesktop.IBus.Error.Failed"
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _WKB_IBUS_DEFS_H_ */
index 62e437f..9832c06 100644 (file)
@@ -21,6 +21,7 @@
 #include <Eldbus.h>
 
 #include "wkb-ibus.h"
+#include "wkb-ibus-defs.h"
 
 #define PANEL_CHECK_MESSAGE_ERRORS(_msg) \
    do \
index ee52c69..882a9dd 100644 (file)
@@ -23,6 +23,7 @@
 #include <Eldbus.h>
 
 #include "wkb-ibus.h"
+#include "wkb-ibus-defs.h"
 
 int _wkb_ibus_log_dom = -1;
 
index 1b92b99..bddf357 100644 (file)
@@ -31,21 +31,6 @@ extern int _wkb_ibus_log_dom;
 #define ERR(...)      EINA_LOG_DOM_ERR(_wkb_ibus_log_dom, __VA_ARGS__)
 #define CRITICAL(...) EINA_LOG_DOM_CRIT(_wkb_ibus_log_dom, __VA_ARGS__)
 
-
-/* from ibusshare.h */
-#define IBUS_SERVICE_IBUS       "org.freedesktop.IBus"
-#define IBUS_SERVICE_PANEL      "org.freedesktop.IBus.Panel"
-#define IBUS_SERVICE_CONFIG     "org.freedesktop.IBus.Config"
-
-#define IBUS_PATH_IBUS          "/org/freedesktop/IBus"
-#define IBUS_PATH_PANEL         "/org/freedesktop/IBus/Panel"
-#define IBUS_PATH_CONFIG        "/org/freedesktop/IBus/Config"
-
-#define IBUS_INTERFACE_IBUS     "org.freedesktop.IBus"
-#define IBUS_INTERFACE_PANEL    "org.freedesktop.IBus.Panel"
-#define IBUS_INTERFACE_CONFIG   "org.freedesktop.IBus.Config"
-
-
 int wkb_ibus_init(void);
 void wkb_ibus_shutdown(void);