Add vine wrapper and vine manager
authorSukHyung, Kang <shine.kang@samsung.com>
Thu, 21 Jan 2021 05:47:21 +0000 (14:47 +0900)
committerSukHyung, Kang <shine.kang@samsung.com>
Mon, 25 Jan 2021 03:20:11 +0000 (12:20 +0900)
13 files changed:
1  2 
CMakeLists.txt
packaging/cion.spec
vine_manager/CMakeLists.txt
vine_manager/vine_listener.cc
vine_manager/vine_listener.hh
vine_manager/vine_listener_implementation.hh
vine_manager/vine_manager.cc
vine_manager/vine_manager.hh
vine_manager/vine_manager.pc.in
vine_manager/vine_manager_implementation.hh
vine_manager/vine_sender.cc
vine_manager/vine_sender.hh
vine_manager/vine_sender_implementation.hh

diff --cc CMakeLists.txt
index e97eeb04958cbf3147dd6498d8a55e68b1479898,d2f1da0e0834f08136ff93450b660912c4121cea..3c59b922dd579e18b0a278486dc85178cb138611
@@@ -8,15 -8,13 +8,15 @@@ INCLUDE(FindPkgConfig
  
  ADD_SUBDIRECTORY(cion)
  #ADD_SUBDIRECTORY(cion-service)
- #ADD_SUBDIRECTORY(vine_manager)
 +ADD_SUBDIRECTORY(vine_wrapper)
++ADD_SUBDIRECTORY(vine_manager)
  
 -#IF(NOT DEFINED MINIMUM_BUILD)
 -#ENABLE_TESTING()
 -#SET(CION_UNITTESTS cion_unittests)
 -#ADD_TEST(NAME ${CION_UNITTESTS} COMMAND ${CION_UNITTESTS}
 -#     WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/unittests)
 +IF(NOT DEFINED MINIMUM_BUILD)
 +ENABLE_TESTING()
 +SET(CION_UNITTESTS cion_unittests)
 +ADD_TEST(NAME ${CION_UNITTESTS} COMMAND ${CION_UNITTESTS}
 +      WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/unittests)
  
 -#ADD_SUBDIRECTORY(unittests)
 -#ADD_DEPENDENCIES(${CION_UNITTESTS} cion)
 -#ENDIF(NOT DEFINED MINIMUM_BUILD)
 +ADD_SUBDIRECTORY(unittests)
 +ADD_DEPENDENCIES(${CION_UNITTESTS} cion)
 +ENDIF(NOT DEFINED MINIMUM_BUILD)
index 71fe9cc6c19006e6ae6628e5faa2588c35e48b46,b19d27f6a6918c5dbf9e775ea9fd2e737a1bb1ff..d0aae171b3b3d09793b5895a1d223af4ae548e33
@@@ -12,10 -12,11 +12,14 @@@ Requires(postun): /sbin/ldconfi
  
  BuildRequires: boost-devel
  BuildRequires: cmake
+ # TODO: remove bundle dependency
+ BuildRequires: pkgconfig(bundle)
  BuildRequires: pkgconfig(glib-2.0)
 +BuildRequires: pkgconfig(gmock)
 +BuildRequires: pkgconfig(vine)
+ BuildRequires: pkgconfig(parcel)
 +
  %if 0%{?gcov:1}
  BuildRequires:  lcov
  BuildRequires:  zip
@@@ -57,17 -58,6 +61,28 @@@ Group:   Application Framework/Communic
  %description -n cion-service
  Tizen Companion Service Application
  
++#################################################
++# Vine-Manager
++#################################################
++%package -n libvine_manager
++Summary: Vine Manager module
++License: Apache-2.0
++Group:   Application Framework/Communication
++
++%description -n libvine_manager
++Vine Manager module
++
 +#################################################
 +# libvine_wrapper
 +#################################################
 +%package -n libvine_wrapper
 +Summary: Vine API wrapper module
 +License: Apache-2.0
 +Group:   Application Framework/Communication
 +
 +%description -n libvine_wrapper
 +Vine API wrapper module
 +
  #################################################
  # unittests
  #################################################
@@@ -185,22 -174,6 +200,38 @@@ install -m 0644 cion.zip %{buildroot}%{
  #%{_manifestdir}/org.tizen.%{name}-service.xml
  #%{_shareddir}/*
  
++#################################################
++# Vine-Manager
++#################################################
++%post -n libvine_manager -p /sbin/ldconfig
++
++%postun -n libvine_manager -p /sbin/ldconfig
++
++%files -n libvine_manager
++%manifest %{name}.manifest
++%license LICENSE
++%defattr(-,root,root,-)
++%{_libdir}/libvine_manager.so.*
++%{_includedir}/vine_manager/*.hh
++%{_libdir}/libvine_manager.so
++%{_libdir}/pkgconfig/vine_manager.pc
++
 +#################################################
 +# libvine_wrapper
 +#################################################
 +%post -n libvine_wrapper -p /sbin/ldconfig
 +
 +%postun -n libvine_wrapper -p /sbin/ldconfig
 +
 +%files -n libvine_wrapper
 +%manifest %{name}.manifest
 +%license LICENSE
 +%defattr(-,root,root,-)
 +%{_libdir}/libvine_wrapper.so.*
 +%{_includedir}/vine_wrapper/*.hh
 +%{_libdir}/libvine_wrapper.so
 +%{_libdir}/pkgconfig/vine_wrapper.pc
 +
  #################################################
  # unittests
  #################################################
index 3c0599ba1b272de688c1c40799c602b9965d62bb,0000000000000000000000000000000000000000..1e43bc81090e54377e76990aa627c5892027d362
mode 100644,000000..100644
--- /dev/null
@@@ -1,39 -1,0 +1,41 @@@
- PROJECT(vine-manager CXX)
 +CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
- SET(LIBDIR ${LIB_INSTALL_DIR})
- #SET(INCLUDEDIR "\${prefix}/include/${PROJECT_NAME}")
- SET(VERSION_MAJOR 1)
- SET(VERSION "${VERSION_MAJOR}.0.0")
++PROJECT(vine_manager CXX)
 +
 +SET(PREFIX "${CMAKE_INSTALL_PREFIX}")
 +SET(EXEC_PREFIX "\${prefix}")
 +SET(PROJECT_NAME "${PROJECT_NAME}")
- pkg_check_modules(vine-manager REQUIRED
++SET(VERSION ${FULLVER})
 +
 +INCLUDE(FindPkgConfig)
 +
- FOREACH(flag ${vine-manager})
++pkg_check_modules(vine_manager REQUIRED
 +      dlog
 +)
 +
- SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -Wall -Werror)
++FOREACH(flag ${vine_manager_CFLAGS})
 +      SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 +ENDFOREACH(flag)
- INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
++SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -Wall -Werror")
 +
 +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} -std=c++14")
 +SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
 +SET(CMAKE_CXX_FLAGS_RELEASE "-O2")
 +
- #ADD_LIBRARY(${PROJECT_NAME} STATIC vine_wrapper.cc)
- SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${VERSION_MAJOR})
- SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${VERSION})
++INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/)
++INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../)
 +
- INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR})
- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${LIBDIR}/pkgconfig)
- TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${vine-manager_LDFLAGS} "-ldl")
++AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} SOURCES)
++ADD_LIBRARY (${PROJECT_NAME} SHARED ${SOURCES})
++SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${FULLVER})
++SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${MAJORVER})
++
++TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${vine_manager_LDFLAGS})
 +
 +CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY)
 +
- #INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/vine.h DESTINATION include/${PROJECT_NAME})
++INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR})
++INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
 +
++INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/vine_listener.hh DESTINATION include/${PROJECT_NAME})
++INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/vine_manager.hh DESTINATION include/${PROJECT_NAME})
++INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/vine_sender.hh DESTINATION include/${PROJECT_NAME})
index fea38cbd0d9500a7628ef4f2d87c3578b78da208,0000000000000000000000000000000000000000..dcd4be7b64686fbb211fc814e9e8d71d2ae6d099
mode 100644,000000..100644
--- /dev/null
@@@ -1,45 -1,0 +1,42 @@@
- #ifndef CION_API_VINE_LISTENER_HH_
- #define CION_API_VINE_LISTENER_HH_
 +/*
 + * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
 + *
 + * 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.
 + */
 +
- #include <string>
++#include <dlog.h>
++#include <unistd.h>
 +#include <memory>
-   VineListener::VineListener()
-     : impl_(new Impl()) {
++
++#include "vine_listener.hh"
++#include "vine_listener_implementation.hh"
 +
 +namespace cion {
- VineListener::Impl::~Impl() {
++
++VineListener::VineListener()
++  : impl_(new Impl()) {
 +}
 +
 +VineListener::~VineListener() {    
 +}
 +
 +VineListener::Impl::Impl() {
 +}
 +
- void VineListener::RegisterObserver() {
- }
- void VineListener::UnregisterObserver() {
++void VineListener::RegisterObserver(channel::IEventObserver* observer) {
 +}
 +
- #endif  // CION_API_VINE_LISTENER_HH_
++void VineListener::UnregisterObserver(channel::IEventObserver* observer) {
 +}
 +
 +}   // namespace cion
index deaa6f5866aac90a1ae838ee831dbb4dcab4a266,0000000000000000000000000000000000000000..8233c43d18d5149745857b101dc06878d40a5c11
mode 100644,000000..100644
--- /dev/null
@@@ -1,41 -1,0 +1,41 @@@
- #include <memory>
- #include <string>
 +/*
 + * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
 + *
 + * 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 CION_API_VINE_LISTENER_HH_
 +#define CION_API_VINE_LISTENER_HH_
 +
- class EXPORT_API VineListener {
++#include "cion/channel/event_observer.hh"
 +
 +namespace cion {
-   void RegisterObserver();
-   void UnregisterObserver();
++
++class VineListener {
 + public:
 +  VineListener();
 +  virtual ~VineListener();
 +
 + protected:
++  void RegisterObserver(channel::IEventObserver* observer);
++  void UnregisterObserver(channel::IEventObserver* observer);
 +
 +
 + private:
 +  class Impl;
 +  std::unique_ptr<Impl> impl_;
 +};
 +
 +}   // namespace cion
 +
 +#endif  // CION_API_VINE_LISTENER_HH_
index ccdb7e549ac5dfa3f1d25141e6e7eb9557fc74ae,0000000000000000000000000000000000000000..62a4343da24d365fb22e3b38146b7922cc4ac3b5
mode 100644,000000..100644
--- /dev/null
@@@ -1,39 -1,0 +1,36 @@@
- #ifndef CION_API_VINE_LISTENER_HH_
- #define CION_API_VINE_LISTENER_HH_
- #include <memory>
- #include <string>
 +/*
 + * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
 + *
 + * 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.
 + */
 +
-   virtual ~Impl();
++#ifndef CION_API_VINE_LISTENER_IMPLEMENTATION_HH_
++#define CION_API_VINE_LISTENER_IMPLEMENTATION_HH_
 +
 +namespace cion {
 +
 +class VineListener::Impl {
 + public:
- #endif  // CION_API_VINE_LISTENER_HH_
++  virtual ~Impl() = default;
 +
 + private:
 +  friend class VineListener;
 +  Impl();
 +
 +
 + private:
 +};
 +
 +}   // namespace cion
 +
++#endif  // CION_API_VINE_LISTENER_IMPLEMENTATION_HH_
index a505d7d9176497a407dfa34a4a8a0761f78755f3,0000000000000000000000000000000000000000..0bb3a56c6842ec7de37ad4b1e5fbb443ea66d7fd
mode 100644,000000..100644
--- /dev/null
@@@ -1,74 -1,0 +1,97 @@@
-       THROW(ret);
 +/*
 + * Copyright (c) 2020 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.
 + */
 +
 +#include <dlog.h>
 +#include <unistd.h>
 +#include <vine.h>
++#include <memory>
++
++#include "vine_manager.hh"
++#include "vine_manager_implementation.hh"
 +
 +#ifdef LOG_TAG
 +#undef LOG_TAG
 +#endif
 +
 +#define LOG_TAG "VINE_MANAGER"
 +#define LOG_TAG "VINE_MANAGER"
 +
 +namespace cion {
 +
 +VineManager& VineManager::GetInst() {
 +  static VineManager w_inst;
 +  int ret;
 +
 +  if (w_inst.impl_ == nullptr) {
 +    ret = w_inst.Init();
 +    if (ret != CION_ERROR_NONE)
- void VineManager::RegisterSender() {};
- void VineManager::UnregisterSender() {};
- void VineManager::RegisterObserver() {};
- void VineManager::UnregisterObserver() {};
- void VineManager::SendDataAsync() {};
- void VineManager::SendData() {};
- void VineManager::OperateChannel() {};
++      throw ret;
 +  }
 +  return w_inst;
 +}
 +
 +VineManager::VineManager() = default;
 +VineManager::~VineManager() = default;
 +VineManager::Impl::Impl() = default;
 +
 +VineManager::Impl::~Impl() {
 +  vine_deinitialize();
 +}
 +
 +int VineManager::Init() {
 +  std::unique_ptr<Impl> tmp_impl;
 +
 +  try {
 +    tmp_impl = std::unique_ptr<VineManager::Impl>(new Impl());
 +  } catch (const std::bad_alloc &ba) {
 +    LOGE("Out of memory");
 +    return -1;
 +  }
 +
 +  vine_initialize();
 +
 +  impl_ = std::move(tmp_impl);
 +  return 0;
 +}
 +
++void VineManager::RegisterSender(std::string service_name, int channel_id) {
++}
++
++void VineManager::UnregisterSender(int channel_id) {
++}
++
++void VineManager::RegisterObserver(channel::IEventObserver* observer) {
++}
++
++void VineManager::UnregisterObserver(channel::IEventObserver* observer) {
++}
++
++void VineManager::SendDataAsync(std::vector<char> serialized_payload,
++    channel::IDataInfo info, int channel_id,
++    std::shared_ptr<PeerInfo> peer_info) {
++}
++
++std::vector<char> VineManager::SendData(std::vector<char> serialized_payload,
++    channel::IDataInfo info, int channel_id,
++    std::string peer_uuid, int timeout) {
++  return {};
++}
++
++void VineManager::OperateChannel(int channel_id, channel::IControlInfo info,
++    std::shared_ptr<PeerInfo> peer_info) {
++}
 +
 +}  // namespace cion
index 9ffa858cef0e85207eb2a723d6b1b313d8d46d01,0000000000000000000000000000000000000000..f05e08b7262b3c43fcd5835b5bc4e0fd9218a5c9
mode 100644,000000..100644
--- /dev/null
@@@ -1,47 -1,0 +1,57 @@@
- #include <memory>
- #include <string>
 +/*
 + * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
 + *
 + * 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 CION_API_VINE_MANAGER_HH_
 +#define CION_API_VINE_MANAGER_HH_
 +
- class EXPORT_API VineManager {
++#include "cion/tizen-api/cion_error.h"
++#include "cion/channel/event_observer.hh"
++#include "cion/common/data_payload.hh"
++#include "cion/common/peer_info.hh"
++#include "cion/channel/data_info.hh"
++#include "cion/channel/control_info.hh"
 +
 +namespace cion {
-   void UnregisterSender();
-   void RegisterObserver();
-   void UnregisterObserver();
-   void SendDataAsync();
-   void SendData();
-   void OperateChannel();
++
++class VineManager {
 + public:
 +  static VineManager& GetInst();
 +  void RegisterSender(std::string service_name, int channel_id);
++  void UnregisterSender(int channel_id);
++  void RegisterObserver(channel::IEventObserver* observer);
++  void UnregisterObserver(channel::IEventObserver* observer);
++  void SendDataAsync(std::vector<char> serialized_payload,
++      channel::IDataInfo info, int channel_id,
++      std::shared_ptr<PeerInfo> peer_info);
++  std::vector<char> SendData(std::vector<char> serialized_payload,
++      channel::IDataInfo info, int channel_id,
++      std::string peer_uuid, int timeout);
++  void OperateChannel(int channel_id, channel::IControlInfo info,
++      std::shared_ptr<PeerInfo> peer_info);
 +
 + private:
 +  VineManager();
 +  virtual ~VineManager();
 +  int Init();
 +
 + private:
 +  class Impl;
 +  std::unique_ptr<Impl> impl_;
 +};
 +
 +}   // namespace cion
 +
 +#endif  // CION_API_VINE_MANAGER_H_
index 15857ed13a03624f9c9c70b4036716c1a4beef20,0000000000000000000000000000000000000000..ff9f528fa8f08d3ff5c9ffffe4ce319ce5d53775
mode 100644,000000..100644
--- /dev/null
@@@ -1,11 -1,0 +1,11 @@@
- Name: vine-manager
 +prefix=@PREFIX@
 +exec_prefix=@EXEC_PREFIX@
 +libdir=@LIB_INSTALL_DIR@
 +includedir=@INCLUDE_INSTALL_DIR@
 +
- Requires: @PC_REQUIRED@
++Name: vine_manager
 +Description: Support development of the Tizen Companion Library
 +Version: @VERSION@
- Cflags: -I${includedir} -I${includedir}/cion -I${includedir}/cion/api
 +Libs: -L${libdir} -lion
++Cflags: -I${includedir} -I${includedir}/vine_manager
++cppflags: -I${includedir}
index fbc5fae49168fbeb15724a14dbcd11ae4327dab5,0000000000000000000000000000000000000000..ff51e9ffec84848b80e0dae20f8214bdf8e016d3
mode 100644,000000..100644
--- /dev/null
@@@ -1,31 -1,0 +1,33 @@@
-   virtual ~Impl()
 +/*
 + * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
 + *
 + * 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 CION_API_VINE_MANAGER_IMPLEMENTATION_HH_
 +#define CION_API_VINE_MANAGER_IMPLEMENTATION_HH_
 +
 +namespace cion {
 +
 +class VineManager::Impl {
 + public:
++  virtual ~Impl();
 +
 + private:
 +  friend class VineManager;
 +  Impl();
 +};
 +
 +}   // namespace cion
++
++#endif  // CION_API_VINE_MANAGER_IMPLEMENTATION_HH_
index c9e114a424b544cde8a87950abc1084994e48851,0000000000000000000000000000000000000000..96dc32154181c1ed08a44f75c4c7369064303c8e
mode 100644,000000..100644
--- /dev/null
@@@ -1,52 -1,0 +1,52 @@@
- #ifndef CION_API_VINE_SENDER_HH_
- #define CION_API_VINE_SENDER_HH_
 +/*
 + * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
 + *
 + * 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.
 + */
 +
- #include <string>
++#include <dlog.h>
++#include <unistd.h>
 +#include <memory>
-   VineSender::VineSender(std::string service_name, int channel_id)
-     : impl_(new Impl()) {
++
++#include "vine_sender.hh"
++#include "vine_sender_implementation.hh"
 +
 +namespace cion {
- VineSender::Impl::~Impl() {
++
++VineSender::VineSender(std::string service_name, int channel_id)
++  : impl_(new Impl()) {
 +}
 +
 +VineSender::~VineSender() {    
 +}
 +
 +VineSender::Impl::Impl() {
 +}
 +
- void VineSender::SendDataAsync() {
++void VineSender::SendDataAsync(std::vector<char> serialized_payload,
++    channel::IDataInfo info, std::shared_ptr<PeerInfo> peer_info) {
 +}
 +
- void VineSender::SendData() {
++std::vector<char> VineSender::SendData(std::vector<char> serialized_payload,
++    channel::IDataInfo info, std::shared_ptr<PeerInfo> peer_info, int timeout) {
++  return {};
 +}
 +
- void VineSender::OperateChannel() {
++void VineSender::OperateChannel(channel::IControlInfo info,
++    std::shared_ptr<PeerInfo> peer_info) {
 +}
 +
- void VineSender::SetSecurity() {
- }
++void VineSender::SetSecurity(SecurityInfo sec) {
 +}
 +
- #endif  // CION_API_VINE_SENDER_HH_
 +}   // namespace cion
index fb3d866c679ecd57562885821e45b4c792998fea,0000000000000000000000000000000000000000..51cd83ec1632da0f355e2806b6f9de19cdab1d2f
mode 100644,000000..100644
--- /dev/null
@@@ -1,42 -1,0 +1,48 @@@
- #include <memory>
- #include <string>
 +/*
 + * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
 + *
 + * 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 CION_API_VINE_SENDER_HH_
 +#define CION_API_VINE_SENDER_HH_
 +
- class EXPORT_API VineSender {
++#include "cion/common/data_payload.hh"
++#include "cion/common/peer_info.hh"
++#include "cion/channel/data_info.hh"
++#include "cion/channel/control_info.hh"
++#include "cion/security/security_info.hh"
 +
 +namespace cion {
-   VineSender(std::string service_name, int channel_id);
++
++class VineSender {
 + public:
-   void SendDataAsync();
-   void SendData();
-   void OperateChannel();
-   void SetSecurity();
++  VineSender(std::string service_name, int channel_int);
 +  virtual ~VineSender();
 +
 + protected:
++  void SendDataAsync(std::vector<char> serialized_payload,
++      channel::IDataInfo info, std::shared_ptr<PeerInfo> peer_info);
++  std::vector<char> SendData(std::vector<char> serialized_payload,
++      channel::IDataInfo info, std::shared_ptr<PeerInfo> peer_info, int timeout);
++  void OperateChannel(channel::IControlInfo info, std::shared_ptr<PeerInfo> peer_info);
++  void SetSecurity(SecurityInfo sec);
 +
 + private:
 +  class Impl;
 +  std::unique_ptr<Impl> impl_;
 +};
 +
 +}   // namespace cion
 +
 +#endif  // CION_API_VINE_SENDER_HH_
index ec67c2890928e8aa7a478f0d92bdd503f31509b2,0000000000000000000000000000000000000000..8e06e836bdcee07a294e98b556c052bcd3aa1184
mode 100644,000000..100644
--- /dev/null
@@@ -1,39 -1,0 +1,35 @@@
- #ifndef CION_API_VINE_SENDER_HH_
- #define CION_API_VINE_SENDER_HH_
- #include <memory>
- #include <string>
 +/*
 + * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
 + *
 + * 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 CION_API_VINE_SENDER_IMPLEMENTATION_HH_
++#define CION_API_VINE_SENDER_IMPLEMENTATION_HH_
 +
 +namespace cion {
 +
 +class VineSender::Impl {
 + public:
 +  virtual ~Impl();
 +
 + private:
 +  friend class VineSender;
 +  Impl();
 +
- #endif  // CION_API_VINE_SENDER_HH_
 + private:
 +};
 +
 +}   // namespace cion
 +
++#endif  // CION_API_VINE_SENDER_IMPLEMENTATION_HH_