Tizen 2.1 base
authorJinkun Jang <jinkun.jang@samsung.com>
Tue, 12 Mar 2013 16:45:50 +0000 (01:45 +0900)
committerJinkun Jang <jinkun.jang@samsung.com>
Tue, 12 Mar 2013 16:45:50 +0000 (01:45 +0900)
CMakeLists.txt [new file with mode: 0755]
LICENSE [new file with mode: 0755]
capi-base-common.pc [new file with mode: 0755]
include/tizen.h [new file with mode: 0755]
include/tizen_error.h [new file with mode: 0644]
include/tizen_type.h [new file with mode: 0755]
packaging/capi-base-common.spec [new file with mode: 0644]

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..360f921
--- /dev/null
@@ -0,0 +1,44 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+PROJECT("capi-base-common")
+
+SET(CMAKE_INSTALL_PREFIX "/usr")
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(VERSION 0.0.1)
+
+INSTALL(FILES include/tizen.h DESTINATION include)
+INSTALL(FILES include/tizen_error.h DESTINATION include)
+INSTALL(FILES include/tizen_type.h DESTINATION include)
+
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/capi-base-common.pc DESTINATION lib/pkgconfig)
+
+IF(UNIX)
+
+ADD_CUSTOM_TARGET (distclean @echo cleaning for source distribution)
+ADD_CUSTOM_COMMAND(
+        DEPENDS clean 
+        COMMENT "distribution clean"
+        COMMAND find
+        ARGS    . 
+        -not -name config.cmake -and \(
+        -name tester.c -or
+        -name Testing -or
+        -name CMakeFiles -or
+        -name cmake.depends -or
+        -name cmake.check_depends -or
+        -name CMakeCache.txt -or
+        -name cmake.check_cache -or
+        -name *.cmake -or
+        -name Makefile -or
+        -name core -or
+        -name core.* -or
+        -name gmon.out -or
+        -name install_manifest.txt -or
+        -name *.pc -or
+        -name *~ \)
+        | grep -v TC | xargs rm -rf
+        TARGET  distclean
+        VERBATIM
+)
+
+ENDIF(UNIX)
diff --git a/LICENSE b/LICENSE
new file mode 100755 (executable)
index 0000000..bbe9d02
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,206 @@
+Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+\r
+                                 Apache License\r
+                           Version 2.0, January 2004\r
+                        http://www.apache.org/licenses/\r
+\r
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\r
+\r
+   1. Definitions.\r
+\r
+      "License" shall mean the terms and conditions for use, reproduction,\r
+      and distribution as defined by Sections 1 through 9 of this document.\r
+\r
+      "Licensor" shall mean the copyright owner or entity authorized by\r
+      the copyright owner that is granting the License.\r
+\r
+      "Legal Entity" shall mean the union of the acting entity and all\r
+      other entities that control, are controlled by, or are under common\r
+      control with that entity. For the purposes of this definition,\r
+      "control" means (i) the power, direct or indirect, to cause the\r
+      direction or management of such entity, whether by contract or\r
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the\r
+      outstanding shares, or (iii) beneficial ownership of such entity.\r
+\r
+      "You" (or "Your") shall mean an individual or Legal Entity\r
+      exercising permissions granted by this License.\r
+\r
+      "Source" form shall mean the preferred form for making modifications,\r
+      including but not limited to software source code, documentation\r
+      source, and configuration files.\r
+\r
+      "Object" form shall mean any form resulting from mechanical\r
+      transformation or translation of a Source form, including but\r
+      not limited to compiled object code, generated documentation,\r
+      and conversions to other media types.\r
+\r
+      "Work" shall mean the work of authorship, whether in Source or\r
+      Object form, made available under the License, as indicated by a\r
+      copyright notice that is included in or attached to the work\r
+      (an example is provided in the Appendix below).\r
+\r
+      "Derivative Works" shall mean any work, whether in Source or Object\r
+      form, that is based on (or derived from) the Work and for which the\r
+      editorial revisions, annotations, elaborations, or other modifications\r
+      represent, as a whole, an original work of authorship. For the purposes\r
+      of this License, Derivative Works shall not include works that remain\r
+      separable from, or merely link (or bind by name) to the interfaces of,\r
+      the Work and Derivative Works thereof.\r
+\r
+      "Contribution" shall mean any work of authorship, including\r
+      the original version of the Work and any modifications or additions\r
+      to that Work or Derivative Works thereof, that is intentionally\r
+      submitted to Licensor for inclusion in the Work by the copyright owner\r
+      or by an individual or Legal Entity authorized to submit on behalf of\r
+      the copyright owner. For the purposes of this definition, "submitted"\r
+      means any form of electronic, verbal, or written communication sent\r
+      to the Licensor or its representatives, including but not limited to\r
+      communication on electronic mailing lists, source code control systems,\r
+      and issue tracking systems that are managed by, or on behalf of, the\r
+      Licensor for the purpose of discussing and improving the Work, but\r
+      excluding communication that is conspicuously marked or otherwise\r
+      designated in writing by the copyright owner as "Not a Contribution."\r
+\r
+      "Contributor" shall mean Licensor and any individual or Legal Entity\r
+      on behalf of whom a Contribution has been received by Licensor and\r
+      subsequently incorporated within the Work.\r
+\r
+   2. Grant of Copyright License. Subject to the terms and conditions of\r
+      this License, each Contributor hereby grants to You a perpetual,\r
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r
+      copyright license to reproduce, prepare Derivative Works of,\r
+      publicly display, publicly perform, sublicense, and distribute the\r
+      Work and such Derivative Works in Source or Object form.\r
+\r
+   3. Grant of Patent License. Subject to the terms and conditions of\r
+      this License, each Contributor hereby grants to You a perpetual,\r
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r
+      (except as stated in this section) patent license to make, have made,\r
+      use, offer to sell, sell, import, and otherwise transfer the Work,\r
+      where such license applies only to those patent claims licensable\r
+      by such Contributor that are necessarily infringed by their\r
+      Contribution(s) alone or by combination of their Contribution(s)\r
+      with the Work to which such Contribution(s) was submitted. If You\r
+      institute patent litigation against any entity (including a\r
+      cross-claim or counterclaim in a lawsuit) alleging that the Work\r
+      or a Contribution incorporated within the Work constitutes direct\r
+      or contributory patent infringement, then any patent licenses\r
+      granted to You under this License for that Work shall terminate\r
+      as of the date such litigation is filed.\r
+\r
+   4. Redistribution. You may reproduce and distribute copies of the\r
+      Work or Derivative Works thereof in any medium, with or without\r
+      modifications, and in Source or Object form, provided that You\r
+      meet the following conditions:\r
+\r
+      (a) You must give any other recipients of the Work or\r
+          Derivative Works a copy of this License; and\r
+\r
+      (b) You must cause any modified files to carry prominent notices\r
+          stating that You changed the files; and\r
+\r
+      (c) You must retain, in the Source form of any Derivative Works\r
+          that You distribute, all copyright, patent, trademark, and\r
+          attribution notices from the Source form of the Work,\r
+          excluding those notices that do not pertain to any part of\r
+          the Derivative Works; and\r
+\r
+      (d) If the Work includes a "NOTICE" text file as part of its\r
+          distribution, then any Derivative Works that You distribute must\r
+          include a readable copy of the attribution notices contained\r
+          within such NOTICE file, excluding those notices that do not\r
+          pertain to any part of the Derivative Works, in at least one\r
+          of the following places: within a NOTICE text file distributed\r
+          as part of the Derivative Works; within the Source form or\r
+          documentation, if provided along with the Derivative Works; or,\r
+          within a display generated by the Derivative Works, if and\r
+          wherever such third-party notices normally appear. The contents\r
+          of the NOTICE file are for informational purposes only and\r
+          do not modify the License. You may add Your own attribution\r
+          notices within Derivative Works that You distribute, alongside\r
+          or as an addendum to the NOTICE text from the Work, provided\r
+          that such additional attribution notices cannot be construed\r
+          as modifying the License.\r
+\r
+      You may add Your own copyright statement to Your modifications and\r
+      may provide additional or different license terms and conditions\r
+      for use, reproduction, or distribution of Your modifications, or\r
+      for any such Derivative Works as a whole, provided Your use,\r
+      reproduction, and distribution of the Work otherwise complies with\r
+      the conditions stated in this License.\r
+\r
+   5. Submission of Contributions. Unless You explicitly state otherwise,\r
+      any Contribution intentionally submitted for inclusion in the Work\r
+      by You to the Licensor shall be under the terms and conditions of\r
+      this License, without any additional terms or conditions.\r
+      Notwithstanding the above, nothing herein shall supersede or modify\r
+      the terms of any separate license agreement you may have executed\r
+      with Licensor regarding such Contributions.\r
+\r
+   6. Trademarks. This License does not grant permission to use the trade\r
+      names, trademarks, service marks, or product names of the Licensor,\r
+      except as required for reasonable and customary use in describing the\r
+      origin of the Work and reproducing the content of the NOTICE file.\r
+\r
+   7. Disclaimer of Warranty. Unless required by applicable law or\r
+      agreed to in writing, Licensor provides the Work (and each\r
+      Contributor provides its Contributions) on an "AS IS" BASIS,\r
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\r
+      implied, including, without limitation, any warranties or conditions\r
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\r
+      PARTICULAR PURPOSE. You are solely responsible for determining the\r
+      appropriateness of using or redistributing the Work and assume any\r
+      risks associated with Your exercise of permissions under this License.\r
+\r
+   8. Limitation of Liability. In no event and under no legal theory,\r
+      whether in tort (including negligence), contract, or otherwise,\r
+      unless required by applicable law (such as deliberate and grossly\r
+      negligent acts) or agreed to in writing, shall any Contributor be\r
+      liable to You for damages, including any direct, indirect, special,\r
+      incidental, or consequential damages of any character arising as a\r
+      result of this License or out of the use or inability to use the\r
+      Work (including but not limited to damages for loss of goodwill,\r
+      work stoppage, computer failure or malfunction, or any and all\r
+      other commercial damages or losses), even if such Contributor\r
+      has been advised of the possibility of such damages.\r
+\r
+   9. Accepting Warranty or Additional Liability. While redistributing\r
+      the Work or Derivative Works thereof, You may choose to offer,\r
+      and charge a fee for, acceptance of support, warranty, indemnity,\r
+      or other liability obligations and/or rights consistent with this\r
+      License. However, in accepting such obligations, You may act only\r
+      on Your own behalf and on Your sole responsibility, not on behalf\r
+      of any other Contributor, and only if You agree to indemnify,\r
+      defend, and hold each Contributor harmless for any liability\r
+      incurred by, or claims asserted against, such Contributor by reason\r
+      of your accepting any such warranty or additional liability.\r
+\r
+   END OF TERMS AND CONDITIONS\r
+\r
+   APPENDIX: How to apply the Apache License to your work.\r
+\r
+      To apply the Apache License to your work, attach the following\r
+      boilerplate notice, with the fields enclosed by brackets "[]"\r
+      replaced with your own identifying information. (Don't include\r
+      the brackets!)  The text should be enclosed in the appropriate\r
+      comment syntax for the file format. We also recommend that a\r
+      file or class name and description of purpose be included on the\r
+      same "printed page" as the copyright notice for easier\r
+      identification within third-party archives.\r
+\r
+   Copyright [yyyy] [name of copyright owner]\r
+\r
+   Licensed under the Apache License, Version 2.0 (the "License");\r
+   you may not use this file except in compliance with the License.\r
+   You may obtain a copy of the License at\r
+\r
+       http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+   Unless required by applicable law or agreed to in writing, software\r
+   distributed under the License is distributed on an "AS IS" BASIS,\r
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+   See the License for the specific language governing permissions and\r
+   limitations under the License.\r
+\r
+\r
+\r
diff --git a/capi-base-common.pc b/capi-base-common.pc
new file mode 100755 (executable)
index 0000000..c4d67b9
--- /dev/null
@@ -0,0 +1,12 @@
+
+# Package Information for pkg-config
+
+prefix=/usr
+includedir=/usr/include
+
+Name: capi-base-common
+Description: 
+Version: 0.0.1
+Requires:  
+Cflags: -I${includedir}
+
diff --git a/include/tizen.h b/include/tizen.h
new file mode 100755 (executable)
index 0000000..acaf64c
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2011 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 __TIZEN_H__
+#define __TIZEN_H__
+
+#include <tizen_type.h>
+#include <tizen_error.h>
+
+#ifndef EXPORT_API
+#define EXPORT_API __attribute__((__visibility__("default")))
+#endif
+#endif // __TIZEN_H__
\ No newline at end of file
diff --git a/include/tizen_error.h b/include/tizen_error.h
new file mode 100644 (file)
index 0000000..779076b
--- /dev/null
@@ -0,0 +1,200 @@
+/*
+ * Copyright (c) 2011 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 __TIZEN_COMMON_ERROR_H__
+#define __TIZEN_COMMON_ERROR_H__
+
+#include <errno.h>
+
+/**
+ * @defgroup CAPI_COMMON_ERROR Common Error Code
+ * @brief This file provides error codes that are common for the whole TIZEN API.
+ * @section CAPI_COMMON_ERROR_HEADER Required Header
+ *   \#include <tizen_error.h>
+ * @ingroup CAPI_BASE_FRAMEWORK
+ * @{
+ */
+
+
+#define TIZEN_ERROR_MAX_PLATFORM_ERROR 0
+#define TIZEN_ERROR_MIN_PLATFORM_ERROR (-1073741824LL) /* = -2147483648 / 2 */
+
+/** Use this constant macro as the value of the first module specific error */
+#define TIZEN_ERROR_MIN_MODULE_ERROR (-2147483648LL)
+
+/** Module errors cannot be greater than the following constant */
+#define TIZEN_ERROR_MAX_MODULE_ERROR (TIZEN_ERROR_MIN_PLATFORM_ERROR - 1)
+
+/** Check if error or not */
+#define TIZEN_ERROR_IS_OK(x) (0 <= (x))
+
+/** Check if error or not */
+#define TIZEN_ERROR_IS_ERROR(x) (!TIZEN_ERROR_IS_OK(x))
+
+/** Check if slp error or not */
+#define TIZEN_ERROR_IS_PLATFORM_ERROR(x) (TIZEN_ERROR_MIN_PLATFORM_ERROR <= (x) && (x) < 0)
+
+/** Application Error Class */
+#define TIZEN_ERROR_APPLICATION_CLASS -0x00000200
+/** Base Error Class */
+#define TIZEN_ERROR_BASE_CLASS -0x00000400
+/** Content Error Class */
+#define TIZEN_ERROR_CONTENT_CLASS -0x00000800
+/** Location Error Class */
+#define TIZEN_ERROR_LOCATION_CLASS -0x00001000
+/** Multimedia Error Class */
+#define TIZEN_ERROR_MULTIMEDIA_CLASS -0x00002000
+/** Messaging Error Class */
+#define TIZEN_ERROR_MESSAGING_CLASS -0x00004000
+/** Network Error Class */
+#define TIZEN_ERROR_NETWORK_CLASS -0x00008000
+/** Social Error Class */
+#define TIZEN_ERROR_SOCIAL_CLASS -0x00010000
+/** System Error Class */
+#define TIZEN_ERROR_SYSTEM_CLASS -0x00020000
+/** Telephony Error Class */
+#define TIZEN_ERROR_TELEPHONY_CLASS -0x00040000
+/** UI Error class */
+#define TIZEN_ERROR_UI_CLASS -0x00080000
+/** UIX Error class */
+#define TIZEN_ERROR_UIX_CLASS -0x00100000
+/** AD Error class */
+#define TIZEN_ERROR_AD_CLASS -0x00200000
+/** Web Error class */
+#define TIZEN_ERROR_WEB_CLASS -0x00400000
+/** DRM Error class */
+#define TIZEN_ERROR_DRM_CLASS -0x00800000
+/** Account Error class */
+#define TIZEN_ERROR_ACCOUNT_CLASS -0x01000000
+
+typedef enum
+{
+    TIZEN_ERROR_NONE = 0, /**< Successful */
+    TIZEN_ERROR_NOT_PERMITTED = -EPERM, /**< Operation not permitted */
+    TIZEN_ERROR_NO_SUCH_FILE = -ENOENT, /**< No such file or directory */
+    TIZEN_ERROR_NO_SUCH_PROCESS = -ESRCH, /**< No such process */
+    TIZEN_ERROR_INTERRUPTED_SYS_CALL = -EINTR, /**< Interrupted system call */
+    TIZEN_ERROR_IO_ERROR = -EIO, /**< I/O error */
+    TIZEN_ERROR_NO_SUCH_DEVICE = -ENXIO, /**< No such device or address */
+    TIZEN_ERROR_ARGUMENT_LIST_TOO_LONG = -E2BIG, /**< Argument list too long */
+    TIZEN_ERROR_EXEC_FORMAT_ERROR = -ENOEXEC, /**< Exec format error */
+    TIZEN_ERROR_BAD_FILE_NUMBER = -EBADF, /**< Bad file number */
+
+    TIZEN_ERROR_TRY_AGAIN = -EAGAIN, /**< Try again */
+    TIZEN_ERROR_OUT_OF_MEMORY = -ENOMEM, /**< Out of memory */
+    TIZEN_ERROR_PERMISSION_DENIED = -EACCES, /**< Permission denied */
+    TIZEN_ERROR_BAD_ADDRESS = -EFAULT, /**< Bad address */
+    TIZEN_ERROR_BLOCK_DEVICE_REQUIRED = -ENOTBLK, /**< Block device required */
+    TIZEN_ERROR_RESOURCE_BUSY = -EBUSY, /**< Device or resource busy */
+    TIZEN_ERROR_FILE_EXISTS = -EEXIST, /**< File exists */
+    TIZEN_ERROR_CROSS_DEVICE_LINK = -EXDEV, /**< Cross-device link */
+    TIZEN_ERROR_NOT_A_DIRECTORY = -ENOTDIR, /**< Not a directory */
+
+    TIZEN_ERROR_IS_A_DIRECTORY = -EISDIR, /**< Is a directory */
+    TIZEN_ERROR_INVALID_PARAMETER = -EINVAL, /**< Invalid function parameter */
+    TIZEN_ERROR_FILE_TABLE_OVERFLOW = -ENFILE, /**< File table overflow */
+    TIZEN_ERROR_TOO_MANY_OPEN_FILES = -EMFILE, /**< Too many open files */
+    TIZEN_ERROR_TOO_NOT_A_TERMINAL = -ENOTTY, /**< Not a terminal */
+    TIZEN_ERROR_TOO_TEXT_FILE_BUSY = -ETXTBSY, /**< Not a terminal */
+    TIZEN_ERROR_FILE_TOO_LARGE = -EFBIG, /**< File too large */
+    TIZEN_ERROR_FILE_NO_SPACE_ON_DEVICE = -ENOSPC, /**< No space left on device */
+    TIZEN_ERROR_ILLEGAL_SEEK = -ESPIPE, /**< Illegal seek */
+    TIZEN_ERROR_READ_ONLY_FILESYSTEM = -EROFS, /**< Read-only file system */
+    TIZEN_ERROR_NO_DATA = -ENODATA, /**< No data available */
+
+    TIZEN_ERROR_TOO_MANY_LINKS = -EMLINK, /**< Too many links */
+    TIZEN_ERROR_BROKEN_PIPE = -EPIPE, /**< Broken pipe */
+    TIZEN_ERROR_ARGUMENT_OUT_OF_DOMAIN = -EDOM, /**< Math argument out of domain of func */
+    TIZEN_ERROR_RESULT_OUT_OF_RANGE = -ERANGE, /**< Math result not representable */
+    TIZEN_ERROR_WOULD_CAUSE_DEADLOCK = -EDEADLK, /**< Resource deadlock would occur */
+    TIZEN_ERROR_FILE_NAME_TOO_LONG = -ENAMETOOLONG,/**< File name too long */
+    TIZEN_ERROR_FILE_NO_LOCKS_AVAILABLE = -ENOLCK, /**< No record locks available */
+    TIZEN_ERROR_INVALID_OPERATION = -ENOSYS, /**< Function not implemented */
+    TIZEN_ERROR_DIR_NOT_EMPTY = -ENOTEMPTY, /**< Directory not empty */
+    TIZEN_ERROR_TOO_MANY_SYMBOLIC_LINKS = -ELOOP, /**< Too many symbolic links encountered */
+    TIZEN_ERROR_WOULD_BLOCK = TIZEN_ERROR_TRY_AGAIN, /**< Operation would block */
+    TIZEN_ERROR_CORRUPTED_SHARED_LIB = -ELIBBAD, /**< Accessing a corrupted shared library */
+    TIZEN_ERROR_LIB_SECTION_CORRUPTED = -ELIBSCN, /**< .lib section in a.out corrupted */
+    TIZEN_ERROR_LINK_TOO_MANY_SHARED_LIB = -ELIBMAX, /**< Attempting to link in too many shared libraries */
+    TIZEN_ERROR_SHARED_LIB_EXEC = -ELIBEXEC, /**< Cannot exec a shared library directly */
+    TIZEN_ERROR_ILLEGAL_BYTE_SEQ = -EILSEQ, /**< Illegal byte sequence */
+    TIZEN_ERROR_SYSTEM_CALL_RESTART = -ERESTART, /**< Interrupted system call should be restarted */
+    TIZEN_ERROR_STREAMS_PIPE = -ESTRPIPE, /**< Streams pipe error */
+    TIZEN_ERROR_TOO_MANY_USERS = -EUSERS, /**< Too many users */
+    TIZEN_ERROR_NON_SOCKET = -ENOTSOCK, /**< Socket operation on non-socket */
+    TIZEN_ERROR_NO_DEST_ADDRESS = -EDESTADDRREQ, /**< Destination address required */
+    TIZEN_ERROR_MSG_TOO_LONG = -EMSGSIZE, /**< Message too long */
+    TIZEN_ERROR_PROTOCOL_WRONG_TYPE = -EPROTOTYPE, /**< Protocol wrong type for socket */
+    TIZEN_ERROR_PROTOCOL_NOT_AVALIABLE = -ENOPROTOOPT, /**< Protocol not available */
+    TIZEN_ERROR_PROTOCOL_NOT_SUPPORTED = -EPROTONOSUPPORT, /**< Protocol not supported */
+    TIZEN_ERROR_SOCKET_TYPE_NOT_SUPPORTED = -ESOCKTNOSUPPORT, /**< Socket type not supported */
+    TIZEN_ERROR_ENDPOINT_OPERATIN_NOT_SUPPORTED = -EOPNOTSUPP, /**< Operation not supported on transport endpoint */
+    TIZEN_ERROR_PROTOCOL_FAMILY_NOT_SUPPORTED = -EPFNOSUPPORT, /**< Protocol family not supported */
+    TIZEN_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED = -EAFNOSUPPORT, /**< Address family not supported by protocol */
+    TIZEN_ERROR_ADDRES_IN_USE = -EADDRINUSE, /**< Address already in use */
+    TIZEN_ERROR_CANNOT_ASSIGN_ADDRESS = -EADDRNOTAVAIL, /**< Cannot assign requested address */
+    TIZEN_ERROR_NETWORK_DOWN = -ENETDOWN, /**< Network is down */
+    TIZEN_ERROR_NETWORK_UNREACHABLE = -ENETUNREACH, /**< Network is unreachable */
+    TIZEN_ERROR_NETWORK_RESET = -ENETRESET, /**< Network dropped connection because of reset */
+    TIZEN_ERROR_CONNECTION_ABORTED = -ECONNABORTED, /**< Software caused connection abort */
+    TIZEN_ERROR_CONNECTION_RESET_BY_PEER = -ECONNRESET, /**< Connection reset by peer */
+    TIZEN_ERROR_BUFFER_SPACE = -ENOBUFS, /**< No buffer space available */
+    TIZEN_ERROR_ENDPOINT_CONNECTED = -EISCONN, /**< Transport endpoint is already connected */
+    TIZEN_ERROR_ENDPOINT_NOT_CONNECTED = -ENOTCONN, /**< Transport endpoint is not connected */
+    TIZEN_ERROR_ENDPOINT_SHUTDOWN = -ESHUTDOWN, /**< Cannot send after transport endpoint shutdown */
+    TIZEN_ERROR_TOO_MANY_REFERENCES = -ETOOMANYREFS, /**< Too many references: cannot splice */
+    TIZEN_ERROR_CONNECTION_TIME_OUT = -ETIMEDOUT, /**< Connection timed out */
+    TIZEN_ERROR_CONNECTION_REFUSED = -ECONNREFUSED, /**< Connection refused */
+    TIZEN_ERROR_HOST_DOWN = -EHOSTDOWN, /**< Host is down */
+    TIZEN_ERROR_NO_ROUTE_TO_HOST = -EHOSTUNREACH, /**< No route to host */
+    TIZEN_ERROR_ALREADY_IN_PROGRESS = -EALREADY, /**< Operation already in progress */
+    TIZEN_ERROR_NOW_IN_PROGRESS = -EINPROGRESS, /**< Operation now in progress */
+    TIZEN_ERROR_STALE_NFS_FILE_HANDLE = -ESTALE, /**< Stale NFS file handle */
+    TIZEN_ERROR_STRUCTURE_UNCLEAN = -EUCLEAN, /**< Structure needs cleaning */
+    TIZEN_ERROR_NOT_XENIX_NAMED_TYPE_FILE = -ENOTNAM, /**< Not a XENIX named type file */
+    TIZEN_ERROR_NO_XENIX_SEMAPHORES_AVAILABLE = -ENAVAIL, /**< No XENIX semaphores available */
+    TIZEN_ERROR_IS_NAMED_TYPE_FILE = -EISNAM, /**< Is a named type file */
+    TIZEN_ERROR_REMOTE_IO = -EREMOTEIO, /**< Remote I/O error */
+    TIZEN_ERROR_QUOTA_EXCEEDED = -EDQUOT, /**< Quota exceeded */
+    TIZEN_ERROR_NO_MEDIUM = -ENOMEDIUM, /**< No medium found */
+    TIZEN_ERROR_WRONG_MEDIUM_TYPE = -EMEDIUMTYPE, /**< Wrong medium type */
+    TIZEN_ERROR_CANCELED = -ECANCELED, /**< Operation Canceled */
+    TIZEN_ERROR_KEY_NOT_AVAILABLE = -ENOKEY, /**< Required key not available */
+    TIZEN_ERROR_KEY_EXPIRED = -EKEYEXPIRED, /**< Key has expired */
+    TIZEN_ERROR_KEY_REVOKED = -EKEYREVOKED, /**< Key has been revoked */
+    TIZEN_ERROR_KEY_REJECTED = -EKEYREJECTED, /**< Key was rejected by service */
+
+    TIZEN_ERROR_OWNER_DEAD = -EOWNERDEAD, /**< Owner died (for robust mutexes) */
+
+    /** Different errors (not an errno) */
+    TIZEN_ERROR_UNKNOWN = TIZEN_ERROR_MIN_PLATFORM_ERROR,
+
+    /* This is a place to add new errors here.
+     * Do not assign integer values explicitly. Values are auto-assigned.
+     */
+    TIZEN_ERROR_TIMED_OUT,
+    TIZEN_ERROR_NOT_SUPPORT_API,
+    TIZEN_ERROR_END_OF_COLLECTION,
+
+} tizen_error_e;
+
+/**
+ * @}
+ */
+
+#endif         /**<__TIZEN_COMMON_ERROR_H__ */
diff --git a/include/tizen_type.h b/include/tizen_type.h
new file mode 100755 (executable)
index 0000000..63b8013
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2011 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 __TIZEN_TYPE_H__
+#define __TIZEN_TYPE_H__
+
+#include <stdbool.h>
+
+#ifndef NULL
+       #ifdef __cplusplus
+               #define NULL        (0L)
+       #else 
+               #define NULL        ((void*) 0)
+       #endif
+#endif
+
+#endif // __TIZEN_TYPE_H__
diff --git a/packaging/capi-base-common.spec b/packaging/capi-base-common.spec
new file mode 100644 (file)
index 0000000..c36fa70
--- /dev/null
@@ -0,0 +1,44 @@
+Name:       capi-base-common
+Summary:    Common header files of Tizen Native API
+Version: 0.1.0
+Release:    8
+Group:      TO_BE/FILLED_IN
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  cmake
+
+%description
+Common header files of Tizen Native API
+
+  
+%package devel  
+Summary:  Common header files of Tizen Native API (Development)  
+Group:    TO_BE/FILLED_IN  
+Requires: %{name} = %{version}-%{release}  
+  
+%description devel
+Common header files of Tizen Native API
+
+%prep
+%setup -q
+
+
+%build
+cmake . -DCMAKE_INSTALL_PREFIX=/usr
+
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+
+
+
+%files
+
+%files devel
+/usr/include/*.h
+/usr/lib/pkgconfig/capi-base-common.pc
+
+