Tizen Native API  7.0

This provides APIs related to Address information used in Geocoding and Reverse Geocoding.

Functions

int maps_address_create (maps_address_h *address)
 Creates a new address handle.
int maps_address_destroy (maps_address_h address)
 Destroys the address handle and releases all its resources.
int maps_address_clone (const maps_address_h origin, maps_address_h *cloned)
 Clones the address handle.
int maps_address_get_building_number (const maps_address_h address, char **building_number)
 Gets the building number of the address handle.
int maps_address_get_street (const maps_address_h address, char **street)
 Gets the street name of the address handle.
int maps_address_get_district (const maps_address_h address, char **district)
 Gets the district name of the address handle.
int maps_address_get_city (const maps_address_h address, char **city)
 Gets the city name of the address handle.
int maps_address_get_state (const maps_address_h address, char **state)
 Gets the state name of the address handle.
int maps_address_get_country (const maps_address_h address, char **country)
 Gets the country name of the address handle.
int maps_address_get_country_code (const maps_address_h address, char **country_code)
 Gets the country code of the address handle.
int maps_address_get_county (const maps_address_h address, char **county)
 Gets the county of the address handle.
int maps_address_get_postal_code (const maps_address_h address, char **postal_code)
 Gets the postal code of the address handle.
int maps_address_get_freetext (const maps_address_h address, char **freetext)
 Gets the free text of the address handle.
int maps_address_set_building_number (maps_address_h address, const char *building_number)
 Sets the building number of the address handle.
int maps_address_set_street (maps_address_h address, const char *street)
 Sets the street name of the address handle.
int maps_address_set_district (maps_address_h address, const char *district)
 Sets the district name of the address handle.
int maps_address_set_city (maps_address_h address, const char *city)
 Sets the city name of the address handle.
int maps_address_set_state (maps_address_h address, const char *state)
 Sets the state name of the address handle.
int maps_address_set_country (maps_address_h address, const char *country)
 Sets the country name of the address handle.
int maps_address_set_country_code (maps_address_h address, const char *country_code)
 Sets the country code of the address handle.
int maps_address_set_county (maps_address_h address, const char *county)
 Sets the county of the address handle.
int maps_address_set_postal_code (maps_address_h address, const char *postal_code)
 Sets the postal code of the address handle.
int maps_address_set_freetext (maps_address_h address, const char *freetext)
 Sets the free text of the address handle.
int maps_address_list_create (maps_address_list_h *address_list)
 Creates an address list having a set of addresses.
int maps_address_list_append (maps_address_list_h address_list, maps_address_h address)
 Appends an address to an address list.
int maps_address_list_remove (maps_address_list_h address_list, maps_address_h address)
 Removes an address from an address list.
int maps_address_list_get_length (maps_address_list_h address_list, int *length)
 Gets the number of elements in an address list.
int maps_address_list_foreach (maps_address_list_h address_list, maps_address_cb callback, void *user_data)
 Retrieves all addresses by invoking a specific callback for each address of address list.
int maps_address_list_destroy (maps_address_list_h address_list)
 Frees all of the memory used by an address list.

Typedefs

typedef void * maps_address_h
 The address handle.
typedef void * maps_address_list_h
 The address list handle.
typedef bool(* maps_address_cb )(int index, maps_address_h address, void *user_data)
 Called iteratively to get address information.

Typedef Documentation

typedef bool(* maps_address_cb)(int index, maps_address_h address, void *user_data)

Called iteratively to get address information.

Since :
3.0
Parameters:
[in]indexThe index of iteration
[in]addressThe address handle
[in]user_dataThe user data passed from the foreach function
Returns:
true to continue with the next iteration of the loop,
false to break out of the loop
See also:
maps_address_list_foreach()
maps_address_list_destroy()
typedef void* maps_address_h

The address handle.

The address handle can be obtained via calling of maps_address_create().

Since :
2.4
typedef void* maps_address_list_h

The address list handle.

The address list handle can be obtained via calling of maps_address_list_create().

Since :
3.0

Function Documentation

int maps_address_clone ( const maps_address_h  origin,
maps_address_h cloned 
)

Clones the address handle.

This function clones the address handle origin and all its resources.
Address handle origin may be created using maps_address_create().

Since :
2.4
Remarks:
cloned must be released using maps_address_destroy().
Parameters:
[in]originThe original address handle
[out]clonedA cloned address handle
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_OUT_OF_MEMORYOut of memory
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
origin is created using maps_address_create().
See also:
maps_address_create()
maps_address_destroy()
int maps_address_create ( maps_address_h address)

Creates a new address handle.

This function creates a new address handle and allocates all needed resources.

Since :
2.4
Remarks:
address must be released using maps_address_destroy().
address may be cloned using maps_address_clone().
Parameters:
[out]addressThe address handle
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_OUT_OF_MEMORYOut of memory
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
See also:
maps_address_destroy()
maps_address_clone()

Destroys the address handle and releases all its resources.

This function destroys the address handle and releases all its resources.

Since :
2.4
Parameters:
[in]addressThe address handle to destroy
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
address is created using maps_address_create().
See also:
maps_address_create()
maps_address_clone()
int maps_address_get_building_number ( const maps_address_h  address,
char **  building_number 
)

Gets the building number of the address handle.

This function gets the building number of the address handle.

Since :
2.4
Remarks:
building_number must be released using free().
Parameters:
[in]addressThe address handle
[out]building_numberThe building number of the address handle
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
address is created using maps_address_create().
See also:
maps_address_set_building_number()
maps_address_create()
int maps_address_get_city ( const maps_address_h  address,
char **  city 
)

Gets the city name of the address handle.

This function gets the city name of the address handle.

Since :
2.4
Remarks:
city must be released using free().
Parameters:
[in]addressThe address handle
[out]cityThe city name of the address handle
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
address is created using maps_address_create().
See also:
maps_address_set_city()
maps_address_create()
int maps_address_get_country ( const maps_address_h  address,
char **  country 
)

Gets the country name of the address handle.

This function gets the country name of the address handle.

Since :
2.4
Remarks:
country must be released using free().
Parameters:
[in]addressThe address handle
[out]countryThe country name of the address handle
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
address is created using maps_address_create().
See also:
maps_address_set_country()
maps_address_create()
int maps_address_get_country_code ( const maps_address_h  address,
char **  country_code 
)

Gets the country code of the address handle.

This function gets the country code of the address handle.

Since :
2.4
Remarks:
country_code must be released using free().
Parameters:
[in]addressThe address handle
[out]country_codeThe country code of the address handle
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
address is created using maps_address_create().
See also:
maps_address_set_country_code()
maps_address_create()
int maps_address_get_county ( const maps_address_h  address,
char **  county 
)

Gets the county of the address handle.

This function gets the county of the address handle.

Since :
2.4
Remarks:
county must be released using free().
Parameters:
[in]addressThe address handle
[out]countyThe county of the address handle
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
address is created using maps_address_create().
See also:
maps_address_set_county()
maps_address_create()
int maps_address_get_district ( const maps_address_h  address,
char **  district 
)

Gets the district name of the address handle.

This function gets the district name of the address handle.

Since :
2.4
Remarks:
district must be released using free().
Parameters:
[in]addressThe address handle
[out]districtThe district name of the address handle
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
address is created using maps_address_create().
See also:
maps_address_set_district()
maps_address_create()
int maps_address_get_freetext ( const maps_address_h  address,
char **  freetext 
)

Gets the free text of the address handle.

This function gets the free text of the address handle.

Since :
2.4
Remarks:
freetext must be released using free().
Parameters:
[in]addressThe address handle
[out]freetextThe free text of the address handle
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
address is created using maps_address_create().
See also:
maps_address_set_freetext()
maps_address_create()
int maps_address_get_postal_code ( const maps_address_h  address,
char **  postal_code 
)

Gets the postal code of the address handle.

This function gets the postal code of the address handle.

Since :
2.4
Remarks:
postal_code must be released using free().
Parameters:
[in]addressThe address handle
[out]postal_codeThe postal code of the address handle
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
address is created using maps_address_create().
See also:
maps_address_set_postal_code()
maps_address_create()
int maps_address_get_state ( const maps_address_h  address,
char **  state 
)

Gets the state name of the address handle.

This function gets the state name of the address handle.

Since :
2.4
Remarks:
state must be released using free().
Parameters:
[in]addressThe address handle
[out]stateThe state name of the address handle
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
address is created using maps_address_create().
See also:
maps_address_set_state()
maps_address_create()
int maps_address_get_street ( const maps_address_h  address,
char **  street 
)

Gets the street name of the address handle.

This function gets the street name of the address handle.

Since :
2.4
Remarks:
street must be released using free().
Parameters:
[in]addressThe address handle
[out]streetThe street name of the address handle
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
address is created using maps_address_create().
See also:
maps_address_set_street()
maps_address_create()
int maps_address_list_append ( maps_address_list_h  address_list,
maps_address_h  address 
)

Appends an address to an address list.

Since :
3.0
Remarks:
Don't release address before removed from the list using maps_address_list_remove().
Parameters:
[in]address_listThe address list handle
[in]addressThe address handle
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_OUT_OF_MEMORYOut of memory
MAPS_ERROR_NOT_SUPPORTEDNot supported
See also:
maps_address_list_create()
maps_address_list_destroy()
maps_address_create()

Creates an address list having a set of addresses.

Since :
3.0
Parameters:
[out]address_listThe address list handle
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_OUT_OF_MEMORYOut of memory
MAPS_ERROR_NOT_SUPPORTEDNot supported
See also:
maps_address_list_destroy()

Frees all of the memory used by an address list.

Since :
3.0
Parameters:
[in]address_listThe address list handle
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
See also:
maps_address_list_create()
int maps_address_list_foreach ( maps_address_list_h  address_list,
maps_address_cb  callback,
void *  user_data 
)

Retrieves all addresses by invoking a specific callback for each address of address list.

Since :
3.0
Parameters:
[in]address_listThe address list handle
[in]callbackThe iteration callback
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
See also:
maps_address_list_create()
maps_address_list_destroy()
maps_address_list_get_length()
int maps_address_list_get_length ( maps_address_list_h  address_list,
int *  length 
)

Gets the number of elements in an address list.

Since :
3.0
Parameters:
[in]address_listThe address list handle
[out]lengthThe number of elements in the address list
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
See also:
maps_address_list_create()
maps_address_list_destroy()
int maps_address_list_remove ( maps_address_list_h  address_list,
maps_address_h  address 
)

Removes an address from an address list.

Since :
3.0
Remarks:
address is just excepted from the list.
It must be released using maps_address_destroy().
Parameters:
[in]address_listThe address list handle
[in]addressThe address handle
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
See also:
maps_address_list_create()
maps_address_list_destroy()
maps_address_destroy()
int maps_address_set_building_number ( maps_address_h  address,
const char *  building_number 
)

Sets the building number of the address handle.

This function sets the building number of the address handle.

Since :
2.4
Parameters:
[in]addressThe address handle
[in]building_numberThe building number to be set
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
address is created using maps_address_create().
See also:
maps_address_create()
int maps_address_set_city ( maps_address_h  address,
const char *  city 
)

Sets the city name of the address handle.

This function sets the city name of the address handle.

Since :
2.4
Parameters:
[in]addressThe address handle
[in]cityThe city name to be set
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
address is created using maps_address_create().
See also:
maps_address_create()
maps_address_get_city()
int maps_address_set_country ( maps_address_h  address,
const char *  country 
)

Sets the country name of the address handle.

This function sets the country name of the address handle.

Since :
2.4
Parameters:
[in]addressThe address handle
[in]countryThe country name to be set
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
address is created using maps_address_create().
See also:
maps_address_create()
maps_address_get_country()
int maps_address_set_country_code ( maps_address_h  address,
const char *  country_code 
)

Sets the country code of the address handle.

This function sets the country code of the address handle.

Since :
2.4
Parameters:
[in]addressThe address handle
[in]country_codeThe country code to be set
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
address is created using maps_address_create().
See also:
maps_address_create()
maps_address_get_country_code()
int maps_address_set_county ( maps_address_h  address,
const char *  county 
)

Sets the county of the address handle.

This function sets the county of the address handle.

Since :
2.4
Parameters:
[in]addressThe address handle
[in]countyThe county to be set
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
address is created using maps_address_create().
See also:
maps_address_create()
maps_address_get_county()
int maps_address_set_district ( maps_address_h  address,
const char *  district 
)

Sets the district name of the address handle.

This function sets the district name of the address handle.

Since :
2.4
Parameters:
[in]addressThe address handle
[in]districtThe district name to be set
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
address is created using maps_address_create().
See also:
maps_address_create()
maps_address_get_district()
int maps_address_set_freetext ( maps_address_h  address,
const char *  freetext 
)

Sets the free text of the address handle.

This function sets the free text of the address handle.

Since :
2.4
Parameters:
[in]addressThe address handle
[in]freetextThe free text to be set
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
address is created using maps_address_create().
See also:
maps_address_create()
maps_address_get_freetext()
int maps_address_set_postal_code ( maps_address_h  address,
const char *  postal_code 
)

Sets the postal code of the address handle.

This function sets the postal code of the address handle.

Since :
2.4
Parameters:
[in]addressThe address handle
[in]postal_codeThe postal code to be set
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
address is created using maps_address_create().
See also:
maps_address_create()
maps_address_get_postal_code()
int maps_address_set_state ( maps_address_h  address,
const char *  state 
)

Sets the state name of the address handle.

This function sets the state name of the address handle.

Since :
2.4
Parameters:
[in]addressThe address handle
[in]stateThe state name to be set
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
address is created using maps_address_create().
See also:
maps_address_create()
maps_address_get_state()
int maps_address_set_street ( maps_address_h  address,
const char *  street 
)

Sets the street name of the address handle.

This function sets the street name of the address handle.

Since :
2.4
Parameters:
[in]addressThe address handle
[in]streetThe street name to be set
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
address is created using maps_address_create().
See also:
maps_address_create()
maps_address_get_street()