4 * Copyright (c) 2014 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
20 #ifndef __POSIX_SERVICE_H__
21 #define __POSIX_SERVICE_H__
24 #define API __attribute__ ((visibility("default")))
35 * @brief Describes infromation about Cloud Service
38 typedef struct _posix_service_s
40 int (*posix_open_service)(void *plugin,
45 int (*posix_read_service)(void *plugin,
52 int (*posix_write_service)(void *plugin,
59 int (*posix_close_service)(void *plugin,
64 typedef struct _posix_service_s *posix_service_h;
66 /*==================================================================================================
68 ==================================================================================================*/
71 * @brief Register Posix Service
74 * @param[in] cloud The Cloud service handle
77 * @see cloud_unregister_service()
78 * @return 0 on success, otherwise a negative error value
79 * @retval #SERVICE_ADAPTOR_ERROR_NONE Successful
80 * @retval #SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER Invalid parameter
81 * @retval #SERVICE_ADAPTOR_ERROR_UNKNOWN Unknown error
83 int posix_register_service(posix_service_h posix, GHashTable *service);
86 * @brief Unregister Cloud Service
89 * @param[in] cloud The Cloud service handle
91 * @see cloud_register_service()
92 * @return 0 on success, otherwise a negative error value
93 * @retval #SERVICE_ADAPTOR_ERROR_NONE Successful
94 * @retval #SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER Invalid parameter
95 * @retval #SERVICE_ADAPTOR_ERROR_UNKNOWN Unknown error
97 int posix_unregister_service(posix_service_h posix);
103 #endif /* __POSIX_SERVICE_H__ */