77e6208d8afadab260e646091f4a2de833984826
[framework/location/libslp-location.git] / location / map-service / location-address.h
1 /*
2  * libslp-location
3  *
4  * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Youngae Kang <youngae.kang@samsung.com>, Yunhan Kim <yhan.kim@samsung.com>,
7  *          Genie Kim <daejins.kim@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21
22 #ifndef __LOCATION_ADDRESS_H_
23 #define __LOCATION_ADDRESS_H_
24
25 #include <location-types.h>
26
27 G_BEGIN_DECLS
28
29 GType location_address_get_type(void);
30 #define LOCATION_TYPE_ADDRESS (location_address_get_type())
31
32 /**
33  * @file location-address.h
34  * @brief This file contains the definitions, structures, and functions related to address information.
35  * @addtogroup LocationMapService
36  * @{
37  * @defgroup LocationMapServiceGeocode Location Geocode
38  * @brief This sub module provides structure, enumeration, and asynchronous function definitions.
39  * @addtogroup LocationMapServiceGeocode
40  * @{
41  */
42
43 /**
44  * @brief This represents address information such as building number, street name, etc.
45  */
46 struct _LocationAddress
47 {
48         gchar *building_number;  ///< Building number.
49         gchar *street;           ///< Full street name.
50         gchar *district;         ///< Municipal district name.
51         gchar *city;             ///< City name.
52         gchar *state;            ///< State or province region of a nation.
53         gchar *country_code;     ///< Country name.
54         gchar *postal_code;      ///< Postal delivery code.
55 };
56
57 /**
58  * @brief   Create a new #LocationAddress with  given information.
59  * @remarks None.
60  * @pre     #location_init should be called before.\n
61  * @post    None.
62  * @param [in]  building_number - Building number
63  * @param [in]  street - Full street name.
64  * @param [in]  district - Municipal district name.
65  * @param [in]  city - City name.
66  * @param [in]  state - State or province region of a nation.
67  * @param [in]  country_code - Country name.
68  * @param [in]  postal_code - Postal delivery code.
69  * @return a new #LocationAddress
70  * @retval NULL if error occured
71  */
72 LocationAddress *location_address_new (const gchar *building_number, const gchar *street, const gchar *district, const gchar *city, const gchar *state, const gchar *country_code, const gchar *postal_code);
73
74 /**
75  * @brief   Free a #LocationAddress.
76  * @remarks None.
77  * @pre     #location_init should be called before.\n
78  * @post    None.
79  * @param [in] address - a #LocationAddress.
80  * @return None.
81  */
82 void location_address_free (LocationAddress *address);
83
84 /**
85  * @brief   Makes a copy of #LocationAddress
86  * @remarks None.
87  * @pre     #location_init should be called before.\n
88  * @post    None.
89  * @param [in]  address - a #LocationAddress
90  * @return a new #LocationAddress
91  * @retval NULL if error occured
92  */
93 LocationAddress *location_address_copy (const LocationAddress *address);
94
95 /**
96  * @} @}
97  */
98
99 G_END_DECLS
100
101 #endif