diff options
author | HyungKyu Song <hk76.song@samsung.com> | 2013-02-16 00:10:22 +0900 |
---|---|---|
committer | HyungKyu Song <hk76.song@samsung.com> | 2013-02-16 00:10:22 +0900 |
commit | 1fa97c03e9f24127dacc341316fc394707297a08 (patch) | |
tree | 8fab65eb91f00206e70873eed6ae50f6be095c2a | |
parent | e0ca36eef24c43274d4a5375cd492c0cdcbec878 (diff) | |
download | common-tizen_2.0.tar.gz common-tizen_2.0.tar.bz2 common-tizen_2.0.zip |
-rwxr-xr-x | CMakeLists.txt | 44 | ||||
-rwxr-xr-x | LICENSE | 206 | ||||
-rwxr-xr-x | capi-base-common.pc | 12 | ||||
-rwxr-xr-x | include/tizen.h | 25 | ||||
-rw-r--r-- | include/tizen_error.h | 200 | ||||
-rwxr-xr-x | include/tizen_type.h | 29 | ||||
-rw-r--r-- | packaging/capi-base-common.spec | 44 |
7 files changed, 560 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100755 index 0000000..360f921 --- /dev/null +++ b/CMakeLists.txt @@ -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) @@ -0,0 +1,206 @@ +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ 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.
+
+
+
diff --git a/capi-base-common.pc b/capi-base-common.pc new file mode 100755 index 0000000..c4d67b9 --- /dev/null +++ b/capi-base-common.pc @@ -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 index 0000000..acaf64c --- /dev/null +++ b/include/tizen.h @@ -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 index 0000000..779076b --- /dev/null +++ b/include/tizen_error.h @@ -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 index 0000000..63b8013 --- /dev/null +++ b/include/tizen_type.h @@ -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 index 0000000..c36fa70 --- /dev/null +++ b/packaging/capi-base-common.spec @@ -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 + + |