Git init
[framework/location/libslp-location.git] / location / 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/location-types.h>
26
27 G_BEGIN_DECLS
28
29 /**
30  * @file location-address.h
31  * @brief This file contains the definitions, structures, and functions related to address information.
32  * @addtogroup LocationTypes
33  * @{
34  */
35
36 /**
37  * @brief This represents address information such as building number, street name, etc.
38  */
39 struct _LocationAddress
40 {
41         gchar *building_number;  ///< Building number.
42         gchar *street;           ///< Full street name.
43         gchar *district;         ///< Municipal district name.
44         gchar *city;             ///< City name.
45         gchar *state;            ///< State or provinc region of a nation.
46         gchar *country_code;     ///< Country name.
47         gchar *postal_code;      ///< Postal delivery code.
48 };
49
50 GType location_address_get_type(void);
51 #define LOCATION_TYPE_ADDRESS (location_address_get_type())
52
53 /**
54  * @brief   Create a new #LocationAddress with  given information.
55  * @remarks None.
56  * @pre     #location_init should be called before.\n
57  * @post    None.
58  * @param [in]  building_number - Building number
59  * @param [in]  street - Full street name.
60  * @param [in]  district - Municipal district name.
61  * @param [in]  city - City name.
62  * @param [in]  state - State or provinc region of a nation.
63  * @param [in]  country_code - Country name.
64  * @param [in]  postal_code - Postal delivery code.
65  * @return a new #LocationAddress
66  * @retval NULL if error occured
67  */
68 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);
69
70 /**
71  * @brief   Free a #LocationAddress.
72  * @remarks None.
73  * @pre     #location_init should be called before.\n
74  * @post    None.
75  * @param [in] address - a #LocationAddress.
76  * @return None.
77  */
78 void location_address_free (LocationAddress *address);
79
80 /**
81  * @brief   Makes a copy of #LocationAddress
82  * @remarks None.
83  * @pre     #location_init should be called before.\n
84  * @post    None.
85  * @param [in]  address - a #LocationAddress
86  * @return a new #LocationAddress
87  * @retval NULL if error occured
88  */
89 LocationAddress *location_address_copy (const LocationAddress *address);
90
91 /**
92  * @}
93  */
94
95 G_END_DECLS
96
97 #endif