2 * Copyright (C) 2013 HERE Global B.V. All rights reserved.
3 * This software, including documentation, is protected by copyright controlled by
4 * HERE Global B.V. (“Software”). All rights are reserved. Copying, including reproducing,
5 * storing, adapting or translating, any or all of this material requires the prior
6 * written consent of HERE Global B.V. You may use this
7 * Software in accordance with the terms and conditions defined in the
8 * HERE Location Platform Services Terms and Conditions, available at
9 * http://developer.here.com/terms-conditions-base
11 * As an additional permission to the above, you may distribute Software,
12 * in object code format as part of an Application, according to, and subject to, terms and
13 * conditions defined in the Tizen Software Development kit (“SDK”) License Agreement.
14 * You may distribute such object code format Application under terms of your choice,
15 * provided that the header and source files of the Software have not been modified.
18 #ifndef PLACES_ERROR_H_
19 #define PLACES_ERROR_H_
21 #include "common/HereMaps_global.h"
22 #include "common/ErrorBase.h"
24 HERE_MAPS_BEGIN_NAMESPACE
27 * This class encapsulates an error condition that may arise when submitting
28 * places-related queries and retrieving results.
32 class PlacesError : public ErrorBase
36 * This enumeration defines identifiers for both success and error
41 EC_NoError, ///< Indicates success.
42 EC_PlaceDoesNotExistError, ///< Indicates that the play does not exist.
43 EC_CategoryDoesNotExistError, ///< Indicates that the category does not exist.
44 EC_ParseError, ///< Indicates a parsing error.
45 EC_PermissionsError, ///< Indicates that the required
46 /// permissions are not in place.
47 EC_UnsupportedError, ///< Indicates that a query/operation is
49 EC_BadArgumentError, ///< Indicates that an argument supplied
50 /// by the caller is bad or not recognized.
51 EC_CancelError, ///< Indicates that an error occurred when
52 /// attempting to cancel a request.
53 EC_UnknownError ///< Indicates an unspecified/unknown error.
57 * This is a constructor for the class.
59 * @param aErrorCode A value representing the error code with which to
60 * initialize a new instance of the class.
62 PlacesError(ErrorCode aErrorCode);
65 * This method is the (virtual) destructor for the class.
67 virtual ~PlacesError();
70 * This method retrieves a value representing the error code assigned to
71 * the given instance of the class.
73 * @return A value representing the error code assigned to
74 * the given instance of the class.
76 ErrorCode GetErrorCode() const;
79 * This method retrieves a string representation of the given instance of
82 * @return A String representation of
83 * the given instance of the class. The possible values are
84 * "No Error", "Place Doesn't exist", "Category doesn't exist",
85 * "Parse error", "Permissions error", "Unsupported error",
86 * "Bad argument", "Cancel error", "Unknown error",
87 * or "No defined error".
89 virtual String ToString() const;
92 HERE_MAPS_NO_COPY_NO_ASSIGN(PlacesError);
94 class PlacesErrorImpl;
95 PlacesErrorImpl* m_pImpl;
98 HERE_MAPS_END_NAMESPACE
100 #endif // PLACES_ERROR_H_