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_POWER_LOCK = 0,
61 * @brief Gets the reference count of @a type tracker
63 * @param[in] type Tracker type
64 * @param[out] count The reference count of @a type tracker
65 * @return @c 0 on success,
66 * otherwise a negative error value
67 * @retval #TRACKER_ERROR_NONE Successful
68 * @retval #TRACKER_ERROR_INVALID_PARAMETER The input parameter is invalid
69 * @retval #TRACKER_ERROR_PERMISSION_DENIED No permission to use the API
71 int tracker_get_ref_counter(tracker_type_e type, int *count);
74 * @brief Gets the total count of @a type tracker
76 * @param[in] type Tracker type
77 * @param[out] count The total count of @a type tracker
78 * @return @c 0 on success,
79 * otherwise a negative error value
80 * @retval #TRACKER_ERROR_NONE Successful
81 * @retval #TRACKER_ERROR_INVALID_PARAMETER The input parameter is invalid
82 * @retval #TRACKER_ERROR_PERMISSION_DENIED No permission to use the API
84 int tracker_get_tick(tracker_type_e type, int *count);
87 * @brief Start tracking for information of services
88 * @details This API should be used only in the framework, not in applications
90 * @param[in] services The services to use internally
91 * @return @c 0 on success,
92 * otherwise a negative error value
93 * @retval #TRACKER_ERROR_NONE Successful
94 * @retval #TRACKER_ERROR_INVALID_PARAMETER The input parameter is invalid
95 * @retval #TRACKER_ERROR_PERMISSION_DENIED No permission to use the API
97 int tracker_start_services(int services);
100 * @brief Stop tracking for information of services
101 * @details This API should be used only in the framework, not in applications
103 * @param[in] services The services not to use internally
104 * @return @c 0 on success,
105 * otherwise a negative error value
106 * @retval #TRACKER_ERROR_NONE Successful
107 * @retval #TRACKER_ERROR_INVALID_PARAMETER The input parameter is invalid
108 * @retval #TRACKER_ERROR_PERMISSION_DENIED No permission to use the API
110 int tracker_stop_services(int services);
120 #endif /* __LIBTRACKER_TRACKER_H__ */