2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file FSys_SystemServiceIpcEventForAsync.cpp
19 * @brief This is the header file for the %_SystemServiceIpcEventForAsync class.
21 * This header file contains the declarations of the %_SystemServiceIpcEventForAsync class.
24 #include <FIo_AppServiceIpcMessages.h>
25 #include "FSys_SystemServiceIpcEventForAsync.h"
27 using namespace Tizen::Base;
28 using namespace Tizen::Base::Collection;
29 using namespace Tizen::Base::Runtime;
30 using namespace Tizen::Io;
32 namespace Tizen{ namespace System {
34 _SystemServiceIpcEventForAsync::_SystemServiceIpcEventForAsync(_IpcServer *pIpcServer)
36 __pIpcServer = pIpcServer;
40 _SystemServiceIpcEventForAsync::Construct(long stackSize, ThreadPriority priority)
42 return EventDrivenThread::Construct(stackSize, priority);
46 _SystemServiceIpcEventForAsync::OnUserEventReceivedN(RequestId requestId, IList *pArgs)
50 ArrayList* data = (ArrayList*)pArgs;
51 result r = __pIpcServer->SendResponse((int)requestId, new (std::nothrow) IoService_Data(*data));
53 SysTryReturnVoidResult(NID_SYS, r == E_SUCCESS, E_SYSTEM,
54 "It is failed to send IPC message to %d. [%s]", (int)requestId, GetErrorMessage(r));