--- /dev/null
+# Compiled Object files
+*.slo
+*.lo
+*.o
+
+# Compiled Dynamic libraries
+*.so
+
+# Compiled Static libraries
+*.lai
+*.la
+*.a
+
+# CMake/Makefile files
+*.cmake
+CMakeCache.txt
+CMakeFiles
+Makefile
+
+# Others
+security-containers.pc
--- /dev/null
+# Copyright (c) 2014 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.
+#
+#
+# @file CMakeLists.txt
+# @author Jan Olszak (j.olszak@samsung.com)
+#
+
+CMAKE_MINIMUM_REQUIRED (VERSION 2.6.2)
+PROJECT(security-containers)
+
+## File names ##################################################################
+SET(SERVER_CODENAME "${PROJECT_NAME}-server")
+SET(CLIENT_CODENAME "${PROJECT_NAME}-client")
+
+
+## Generate the pc file ########################################################
+CONFIGURE_FILE(security-containers.pc.in security-containers.pc @ONLY)
+
+
+## Compiler flags, depending on the build type #################################
+SET(CMAKE_C_FLAGS_PROFILING "-g -O0 -pg")
+SET(CMAKE_CXX_FLAGS_PROFILING "-g -std=c++0x -O0 -pg")
+SET(CMAKE_C_FLAGS_DEBUG "-g -O0 -ggdb")
+SET(CMAKE_CXX_FLAGS_DEBUG "-g -std=c++0x -O0 -ggdb")
+SET(CMAKE_C_FLAGS_RELEASE "-g -O2")
+SET(CMAKE_CXX_FLAGS_RELEASE "-g -std=c++0x -O2")
+SET(CMAKE_C_FLAGS_CCOV "-g -O2 --coverage")
+SET(CMAKE_CXX_FLAGS_CCOV "-g -std=c++0x -O2 --coverage")
+
+ADD_DEFINITIONS("-fPIC") # Position Independent Code
+ADD_DEFINITIONS("-Werror") # Make all warnings into errors.
+ADD_DEFINITIONS("-Wall") # Generate all warnings
+ADD_DEFINITIONS("-Wextra") # Generate even more extra warnings
+
+
+## Subdirectories ##############################################################
+SET(CLIENT_FOLDER ${PROJECT_SOURCE_DIR}/src/client)
+SET(SERVER_FOLDER ${PROJECT_SOURCE_DIR}/src/server)
+ADD_SUBDIRECTORY(src)
+
+
+## Installations ###############################################################
+# FILE(MAKE_DIRECTORY /usr/include/security-containers)
+INSTALL(FILES ${CLIENT_FOLDER}/include/security-containers-client.h
+ DESTINATION /usr/include/security-containers)
+
+INSTALL(FILES ${CMAKE_BINARY_DIR}/security-containers.pc
+ DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
--- /dev/null
+Name: security-containers
+Version: 0.1.0
+Release: 0
+Source0: %{name}-%{version}.tar.gz
+License: Apache-2.0
+Group: Security/Other
+Summary: Daemon for managing containers
+BuildRequires: cmake
+
+%description
+This package provides a daemon used to manage containers - start, stop and switch
+between them. A proccess from inside a container can request a switch of context
+(display, inputdevices) to the other container.
+
+%files
+%attr(755,root,root) %{_bindir}/security-containers-server
+
+%prep
+%setup -q
+
+%build
+%cmake . -DVERSION=%{version} \
+ -DCMAKE_BUILD_TYPE=%{?build_type:%build_type}%{!?build_type:RELEASE} \
+ -DCMAKE_VERBOSE_MAKEFILE=ON
+make %{?jobs:-j%jobs}
+
+%install
+%make_install
+
+%clean
+rm -rf %{buildroot}
+
+
+## Client Package ##############################################################
+%package client
+Summary: Security Containers Client
+Group: Development/Libraries
+Requires: security-containers = %{version}-%{release}
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+
+%description client
+Library interface to the security-containers daemon
+
+%files client
+%attr(644,root,root) %{_libdir}/libsecurity-containers-client.so
+
+
+## Devel Package ###############################################################
+%package devel
+Summary: Security Containers Client Devel
+Group: Development/Libraries
+Requires: security-containers = %{version}-%{release}
+Requires: security-containers-client = %{version}-%{release}
+
+%description devel
+Development package including the header files for the client library
+
+%files devel
+%defattr(644,root,root,644)
+%attr(644,root,root) %{_includedir}/security-containers/security-containers-client.h
+%attr(644,root,root) %{_libdir}/pkgconfig/security-containers.pc
--- /dev/null
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=@LIB_INSTALL_DIR@
+includedir=${prefix}/include
+
+Name: security-containers
+Description: Security Containers Package
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lsecurity-containers-client
+Cflags: -I${includedir}/security-containers
--- /dev/null
+# Copyright (c) 2014 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.
+#
+#
+# @file CMakeLists.txt
+# @author Jan Olszak (j.olszak@samsung.com)
+#
+
+ADD_SUBDIRECTORY(client)
+ADD_SUBDIRECTORY(server)
\ No newline at end of file
--- /dev/null
+# Copyright (c) 2014 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.
+#
+#
+# @file CMakeLists.txt
+# @author Jan Olszak (j.olszak@samsung.com)
+#
+
+INCLUDE_DIRECTORIES ("${CLIENT_FOLDER}/include")
+ADD_SUBDIRECTORY(src)
\ No newline at end of file
--- /dev/null
+#ifndef SC_CLIENT_H
+#define SC_CLIENT_H
+
+#endif /*SC_CLIENT_H*/
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Bumjin Im <bj.im@samsung.com>
+ *
+ * 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
+ */
+
+
+/**
+ * @file security-containers-client.h
+ * @author Jan Olszak (j.olszak@samsung.com)
+ * @brief This file contains the API for Security Containers Client
+ */
+
+#ifndef SECURITY_CONTAINERS_CLIENT_H
+#define SECURITY_CONTAINERS_CLIENT_H
+
+#endif /*SECURITY_CONTAINERS_CLIENT_H*/
--- /dev/null
+# Copyright (c) 2014 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.
+#
+#
+# @file CMakeLists.txt
+# @author Jan Olszak (j.olszak@samsung.com)
+#
+
+MESSAGE ("Generating makefile for the Client...")
+FILE (GLOB_RECURSE project_SRCS *.cpp *.cxx *.cc *.C *.c *.h *.hpp)
+MESSAGE ("Files: ${project_SRCS}")
+
+ADD_LIBRARY(${CLIENT_CODENAME} SHARED ${project_SRCS})
+INSTALL(TARGETS ${CLIENT_CODENAME}
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ COMPONENT RuntimeLibraries)
\ No newline at end of file
--- /dev/null
+#include <sc-client.hpp>
\ No newline at end of file
--- /dev/null
+# Copyright (c) 2014 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.
+#
+#
+# @file CMakeLists.txt
+# @author Jan Olszak (j.olszak@samsung.com)
+#
+
+INCLUDE_DIRECTORIES ("${SERVER_FOLDER}/include")
+ADD_SUBDIRECTORY(src)
\ No newline at end of file
--- /dev/null
+#ifndef SC_SERVER_H
+#define SC_SERVER_H
+
+#endif /*SC_SERVER_H*/
--- /dev/null
+# Copyright (c) 2014 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.
+#
+#
+# @file CMakeLists.txt
+# @author Jan Olszak (j.olszak@samsung.com)
+#
+
+MESSAGE ("Generating makefile for the Server...")
+FILE(GLOB_RECURSE project_SRCS *.cpp *.cxx *.cc *.C *.c *.h *.hpp)
+MESSAGE("Files: " ${project_SRCS})
+
+SET(SERVER_CODENAME "${PROJECT_NAME}-server")
+ADD_EXECUTABLE(${SERVER_CODENAME} main.cpp)
+INSTALL(TARGETS ${SERVER_CODENAME} DESTINATION bin)
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Bumjin Im <bj.im@samsung.com>
+ *
+ * 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
+ */
+
+
+/**
+ * @file main.cpp
+ * @author Jan Olszak (j.olszak@samsung.com)
+ * @brief Main file for the Security Containers Daemon
+ */
+
+
+#include <iostream>
+
+#include <sc-server.hpp>
+
+int main(int argc, const char *argv[])
+{
+ std::cout << "SC FTW!" << std::endl;
+ std::cout << argc << std::endl;
+ for (int i = 0; i < argc; ++i){
+ std::cout << argv[i] << std::endl;
+ }
+}
\ No newline at end of file