3 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
5 * Licensed under the Apache License, Version 2.0 (the License);
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an AS IS BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
19 #ifndef __LIBTRACKER_TRACKER_H__
20 #define __LIBTRACKER_TRACKER_H__
28 * @addtogroup LIBTRACKER_MODULE
35 * @brief Enumeration of error codes for libtracker
38 TRACKER_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
39 TRACKER_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
40 TRACKER_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
41 TRACKER_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< An input/output error occurred */
42 TRACKER_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< No permission to use the API */
43 TRACKER_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< The api is not supported */
47 TRACKER_SERVICE_DOWNLOAD = 1 << 0, /**< download services */
48 TRACKER_SERVICE_MEDIA = 1 << 1, /**< media operations */
49 TRACKER_SERVICE_NETWORK = 1 << 2, /**< network services */
50 TRACKER_SERVICE_LOCATION = 1 << 3, /**< location services */
51 TRACKER_SERVICE_SENSOR = 1 << 4, /**< sensor information */
52 TRACKER_SERVICE_IOT = 1 << 5, /**< IoT services */
56 TRACKER_TYPE_INVALID = -1,
57 TRACKER_TYPE_POWER_LOCK = 0,
62 * @brief Gets the reference count of @a type tracker
64 * @param[in] type Tracker type
65 * @param[out] count The reference count of @a type tracker
66 * @return @c 0 on success,
67 * otherwise a negative error value
68 * @retval #TRACKER_ERROR_NONE Successful
69 * @retval #TRACKER_ERROR_INVALID_PARAMETER The input parameter is invalid
70 * @retval #TRACKER_ERROR_PERMISSION_DENIED No permission to use the API
72 int tracker_get_ref_counter(tracker_type_e type, int *count);
75 * @brief Gets the total count of @a type tracker
77 * @param[in] type Tracker type
78 * @param[out] count The total count of @a type tracker
79 * @return @c 0 on success,
80 * otherwise a negative error value
81 * @retval #TRACKER_ERROR_NONE Successful
82 * @retval #TRACKER_ERROR_INVALID_PARAMETER The input parameter is invalid
83 * @retval #TRACKER_ERROR_PERMISSION_DENIED No permission to use the API
85 int tracker_get_tick(tracker_type_e type, int *count);
88 * @brief Start tracking for information of services
89 * @details This API should be used only in the framework, not in applications
91 * @param[in] services The services to use internally
92 * @return @c 0 on success,
93 * otherwise a negative error value
94 * @retval #TRACKER_ERROR_NONE Successful
95 * @retval #TRACKER_ERROR_INVALID_PARAMETER The input parameter is invalid
96 * @retval #TRACKER_ERROR_PERMISSION_DENIED No permission to use the API
98 int tracker_start_services(int services);
101 * @brief Stop tracking for information of services
102 * @details This API should be used only in the framework, not in applications
104 * @param[in] services The services not to use internally
105 * @return @c 0 on success,
106 * otherwise a negative error value
107 * @retval #TRACKER_ERROR_NONE Successful
108 * @retval #TRACKER_ERROR_INVALID_PARAMETER The input parameter is invalid
109 * @retval #TRACKER_ERROR_PERMISSION_DENIED No permission to use the API
111 int tracker_stop_services(int services);
121 #endif /* __LIBTRACKER_TRACKER_H__ */