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();
$(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 \
+++ /dev/null
-/*
- * 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
$(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 \
+++ /dev/null
-/*
- * 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