4 * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. All rights reserved.
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>
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
13 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #ifndef __LOCATION_ADDRESS_H_
23 #define __LOCATION_ADDRESS_H_
25 #include <location/location-types.h>
30 * @file location-address.h
31 * @brief This file contains the definitions, structures, and functions related to address information.
32 * @addtogroup LocationTypes
37 * @brief This represents address information such as building number, street name, etc.
39 struct _LocationAddress
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 province region of a nation.
46 gchar *country_code; ///< Country name.
47 gchar *postal_code; ///< Postal delivery code.
50 GType location_address_get_type(void);
51 #define LOCATION_TYPE_ADDRESS (location_address_get_type())
54 * @brief Create a new #LocationAddress with given information.
56 * @pre #location_init should be called before.\n
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 province 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
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);
71 * @brief Free a #LocationAddress.
73 * @pre #location_init should be called before.\n
75 * @param [in] address - a #LocationAddress.
78 void location_address_free (LocationAddress *address);
81 * @brief Makes a copy of #LocationAddress
83 * @pre #location_init should be called before.\n
85 * @param [in] address - a #LocationAddress
86 * @return a new #LocationAddress
87 * @retval NULL if error occured
89 LocationAddress *location_address_copy (const LocationAddress *address);