Fix wayland indicator issue 79/48079/1
authortaeyoon <taeyoon0.lee@samsung.com>
Mon, 14 Sep 2015 04:22:59 +0000 (13:22 +0900)
committertaeyoon <taeyoon0.lee@samsung.com>
Mon, 14 Sep 2015 06:01:17 +0000 (15:01 +0900)
 - Fix wayland ServerConnection

Change-Id: I6cfaff0621acfa71a460455223c2cb1e99d8d346

adaptors/common/server-connection.cpp
adaptors/wayland/file.list
adaptors/wayland/server-connection-wl.cpp [deleted file]
adaptors/x11/file.list
adaptors/x11/server-connection-x.cpp [deleted file]

index 8246cd5..598ba06 100644 (file)
@@ -43,6 +43,54 @@ namespace Adaptor
 extern Debug::Filter* gIndicatorLogFilter;
 #endif
 
+ServerConnection::ServerConnection(
+  const char*                 serviceName,
+  int                         serviceNumber,
+  bool                        isSystem,
+  ServerConnection::Observer* observer)
+
+: mConnected(false),
+  mObserver(observer)
+{
+  Ecore_Ipc_Type ipctype = ECORE_IPC_LOCAL_USER;
+
+  ecore_ipc_init();
+  mService.name = eina_stringshare_add(serviceName);
+  mService.num = serviceNumber;
+  mService.isSystem = isSystem;
+
+  if( mService.isSystem )
+  {
+    ipctype = ECORE_IPC_LOCAL_SYSTEM;
+  }
+
+  DALI_LOG_INFO( gIndicatorLogFilter, Debug::General, "ServerConnection: Connecting to %s %d\n", mService.name, mService.num );
+
+  mIpcServer = ecore_ipc_server_connect( ipctype, (char *)mService.name, mService.num, this );
+
+  if( !mIpcServer )
+  {
+    DALI_LOG_INFO( gIndicatorLogFilter, Debug::General, "mIpcServer is null\n" );
+    ecore_ipc_shutdown();
+  }
+  else
+  {
+    mIpcHandlers.push_back( ecore_event_handler_add( ECORE_IPC_EVENT_SERVER_ADD,
+                                                     &ServerConnection::IpcServerAdd,
+                                                     this ) );
+
+    mIpcHandlers.push_back( ecore_event_handler_add( ECORE_IPC_EVENT_SERVER_DEL,
+                                                     &ServerConnection::IpcServerDel,
+                                                     this ) );
+
+    mIpcHandlers.push_back( ecore_event_handler_add( ECORE_IPC_EVENT_SERVER_DATA,
+                                                     &ServerConnection::IpcServerData,
+                                                     this));
+
+    mConnected = true;
+  }
+}
+
 ServerConnection::~ServerConnection()
 {
   CloseConnection();
index b44598b..24483a6 100644 (file)
@@ -7,7 +7,6 @@ adaptor_wayland_tizen_internal_src_files = \
   $(adaptor_wayland_dir)/framework-wl.cpp \
   $(adaptor_wayland_dir)/imf-manager-impl-wl.cpp \
   $(adaptor_wayland_dir)/pixmap-image-impl-wl.cpp \
-  $(adaptor_wayland_dir)/server-connection-wl.cpp \
   $(adaptor_wayland_dir)/virtual-keyboard-impl-wl.cpp \
   $(adaptor_wayland_dir)/window-impl-wl.cpp \
   $(adaptor_wayland_dir)/event-handler-wl.cpp \
diff --git a/adaptors/wayland/server-connection-wl.cpp b/adaptors/wayland/server-connection-wl.cpp
deleted file mode 100644 (file)
index 76376c3..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2014 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.
- * 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.
- *
- */
-
-// CLASS HEADER
-#include "server-connection.h"
-
-// EXTERNAL INCLUDES
-#include <Ecore.h>
-
-#include <dali/integration-api/debug.h>
-
-// INTERNAL INCLUDES
-
-namespace Dali
-{
-namespace Internal
-{
-namespace Adaptor
-{
-#if defined(DEBUG_ENABLED)
-extern Debug::Filter* gIndicatorLogFilter;
-#endif
-
-
-ServerConnection::ServerConnection(
-  const char*                 serviceName,
-  int                         serviceNumber,
-  bool                        isSystem,
-  ServerConnection::Observer* observer)
-
-: mConnected(false),
-  mObserver(observer)
-{
-  ecore_ipc_init();
-  mService.name = eina_stringshare_add(serviceName);
-  mService.num = serviceNumber;
-  mService.isSystem = isSystem;
-
-  DALI_LOG_INFO( gIndicatorLogFilter, Debug::General, "ServerConnection: Connecting to %s %d\n", mService.name, mService.num );
-
-  mIpcServer = NULL;
-
-  if( !mIpcServer )
-  {
-    ecore_ipc_shutdown();
-  }
-  else
-  {
-    mIpcHandlers.push_back( ecore_event_handler_add( ECORE_IPC_EVENT_SERVER_ADD,
-                                                     &ServerConnection::IpcServerAdd,
-                                                     this ) );
-
-    mIpcHandlers.push_back( ecore_event_handler_add( ECORE_IPC_EVENT_SERVER_DEL,
-                                                     &ServerConnection::IpcServerDel,
-                                                     this ) );
-
-    mIpcHandlers.push_back( ecore_event_handler_add( ECORE_IPC_EVENT_SERVER_DATA,
-                                                     &ServerConnection::IpcServerData,
-                                                     this));
-
-    mConnected = true;
-  }
-}
-
-} // Adaptor
-} // Internal
-} // Dali
index 81a71b9..486850d 100644 (file)
@@ -5,7 +5,6 @@ _adaptor_x11_internal_src_files = \
   $(adaptor_x11_dir)/display-connection-impl-x.cpp \
   $(adaptor_x11_dir)/imf-manager-impl-x.cpp \
   $(adaptor_x11_dir)/pixmap-image-impl-x.cpp \
-  $(adaptor_x11_dir)/server-connection-x.cpp \
   $(adaptor_x11_dir)/virtual-keyboard-impl-x.cpp \
   $(adaptor_x11_dir)/window-impl-x.cpp \
   $(adaptor_x11_dir)/egl-implementation-x.cpp \
diff --git a/adaptors/x11/server-connection-x.cpp b/adaptors/x11/server-connection-x.cpp
deleted file mode 100644 (file)
index 22d469c..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2014 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.
- * 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.
- *
- */
-
-// CLASS HEADER
-#include "server-connection.h"
-
-// EXTERNAL INCLUDES
-#include <Ecore.h>
-
-#include <dali/integration-api/debug.h>
-
-// INTERNAL INCLUDES
-
-namespace Dali
-{
-namespace Internal
-{
-namespace Adaptor
-{
-#if defined(DEBUG_ENABLED)
-extern Debug::Filter* gIndicatorLogFilter;
-#endif
-
-
-ServerConnection::ServerConnection(
-  const char*                 serviceName,
-  int                         serviceNumber,
-  bool                        isSystem,
-  ServerConnection::Observer* observer)
-
-: mConnected(false),
-  mObserver(observer)
-{
-  Ecore_Ipc_Type ipctype = ECORE_IPC_LOCAL_USER;
-
-  ecore_ipc_init();
-  mService.name = eina_stringshare_add(serviceName);
-  mService.num = serviceNumber;
-  mService.isSystem = isSystem;
-
-  if (mService.isSystem)
-  {
-    ipctype = ECORE_IPC_LOCAL_SYSTEM;
-  }
-
-  DALI_LOG_INFO( gIndicatorLogFilter, Debug::General, "ServerConnection: Connecting to %s %d\n", mService.name, mService.num );
-
-  mIpcServer = ecore_ipc_server_connect( ipctype, (char *)mService.name, mService.num, this );
-
-  if( !mIpcServer )
-  {
-    ecore_ipc_shutdown();
-  }
-  else
-  {
-    mIpcHandlers.push_back( ecore_event_handler_add( ECORE_IPC_EVENT_SERVER_ADD,
-                                                     &ServerConnection::IpcServerAdd,
-                                                     this ) );
-
-    mIpcHandlers.push_back( ecore_event_handler_add( ECORE_IPC_EVENT_SERVER_DEL,
-                                                     &ServerConnection::IpcServerDel,
-                                                     this ) );
-
-    mIpcHandlers.push_back( ecore_event_handler_add( ECORE_IPC_EVENT_SERVER_DATA,
-                                                     &ServerConnection::IpcServerData,
-                                                     this));
-
-    mConnected = true;
-  }
-}
-
-} // Adaptor
-} // Internal
-} // Dali