2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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 * @file FLocLocationCriteria.h
20 * @brief This is the header file for the %LocationCriteria class.
22 * This header file contains the declarations of the %LocationCriteria class.
25 #ifndef _FLOC_LOCATION_CRITERIA_H_
26 #define _FLOC_LOCATION_CRITERIA_H_
28 #include <FBaseObject.h>
29 #include <FLocTypes.h>
31 namespace Tizen { namespace Locations
35 * @class LocationCriteria
36 * @brief This class provides methods to specify the service quality that an application wants for the location provider.
40 * @final This class is not intended for extension.
42 * The %LocationCriteria class provides methods to specify the service quality that an application wants for the location provider.
43 * The application specifies the location criteria based on its scenario and gives it to the location provider.
45 * The accuracy in the location criteria is for specifying the accuracy levels for the location provider.
46 * The accuracy @c LOC_ACCURACY_ANY is for getting locations of any accuracy that the location provider provides.
47 * The application can get more accurate locations as it takes higher accuracy levels from @c LOC_ACCURACY_ONE_KILOMETER,
48 * @c LOC_ACCURACY_HUNDRED_METERS, @c LOC_ACCURACY_TEN_METERS, and @c LOC_ACCURACY_FINEST.
49 * The application should be aware that higher accuracy levels makes the location provider run costly positioning systems more. Considering proper
50 * accuracy levels helps the system to provide efficient services to the user.
52 * @see LocationProvider
54 class _OSP_EXPORT_ LocationCriteria
55 : public Tizen::Base::Object
59 * Initializes an instance of %LocationCriteria with the accuracy set to @c LOC_ACCURACY_ANY.
64 LocationCriteria(void);
67 * This is the copy constructor for the %LocationCriteria class.
69 * Copying of objects using this copy constructor is allowed.
73 * @param[in] rhs An instance of %LocationCriteria to copy
75 LocationCriteria(const LocationCriteria& rhs);
78 * This destructor overrides Tizen::Base::Object::~Object().
82 virtual ~LocationCriteria(void);
85 * Compares the calling instance with the specified instance for equality.
89 * @return @c true if all the fields in the objects are equal, @n
91 * @param[in] rhs The object to compare
93 virtual bool Equals(const Tizen::Base::Object& rhs) const;
96 * Gets the hash value of the calling instance.
100 * @return The hash value of the calling instance
102 virtual int GetHashCode(void) const;
105 * Sets the desired accuracy.
109 * @return An error code
110 * @param[in] accuracy The desired accuracy
111 * @exception E_SUCCESS The method is successful.
112 * @exception E_INVALID_ARG The specified @c accuracy is invalid.
115 result SetAccuracy(LocationAccuracy accuracy);
118 * Gets the desired accuracy of this location criteria.
122 * @return The accuracy of this location criteria
125 LocationAccuracy GetAccuracy(void) const;
128 * Copying of objects using this copy assignment operator is allowed.
132 * @return A reference to the current instance
133 * @param[in] rhs An instance of %LocationCriteria to assign
135 LocationCriteria& operator =(const LocationCriteria& rhs);
138 LocationAccuracy __accuracy;
140 class _LocationCriteriaImpl* __pImpl;
141 friend class _LocationCriteriaImpl;
142 }; // LocationCriteria
143 }} // Tizen::Locations
144 #endif // _FLOC_LOCATION_CRITERIA_H_