Tizen Native API

Functions

int maps_place_filter_create (maps_place_filter_h *filter)
 Creates a new place filter handle.
int maps_place_filter_destroy (maps_place_filter_h filter)
 Destroys the place filter handle and releases all its resources.
int maps_place_filter_clone (const maps_place_filter_h origin, maps_place_filter_h *cloned)
 Clones the place filter handle.
int maps_place_filter_get (const maps_place_filter_h filter, const char *key, char **value)
 Gets the value of the specified key in the place filter.
int maps_place_filter_get_keyword (const maps_place_filter_h filter, char **keyword)
 Gets the value of keyword.
int maps_place_filter_get_place_name (const maps_place_filter_h filter, char **place_name)
 Gets the place name.
int maps_place_filter_get_category (const maps_place_filter_h filter, maps_place_category_h *category)
 Gets the category.
int maps_place_filter_foreach_property (const maps_place_filter_h filter, maps_place_filter_properties_cb callback, void *user_data)
 Retrieves all filter properties.
int maps_place_filter_set (maps_place_filter_h filter, const char *key, const char *value)
 Sets the filter value.
int maps_place_filter_set_keyword (maps_place_filter_h filter, const char *keyword)
 Sets the keyword.
int maps_place_filter_set_place_name (maps_place_filter_h filter, const char *place_name)
 Sets the place name.
int maps_place_filter_set_category (maps_place_filter_h filter, const maps_place_category_h category)
 Sets the category.

Typedefs

typedef void * maps_place_filter_h
 The Place Filter handle.
typedef bool(* maps_place_filter_properties_cb )(int index, int total, char *key, void *value, void *user_data)
 Called when requesting the list of Place Filter Properties.

This provides APIs related to Place Filter information, used in Place Discovery and Search.


Typedef Documentation

typedef void* maps_place_filter_h

The Place Filter handle.

The handle of Place Filter instance.

Remarks:
To release the handle use maps_place_filter_destroy().
To clone the handle use maps_place_filter_clone().
Since :
2.4
See also:
maps_place_filter_destroy()
maps_place_filter_clone()
typedef bool(* maps_place_filter_properties_cb)(int index, int total, char *key, void *value, void *user_data)

Called when requesting the list of Place Filter Properties.

This callback is invoked while iterating through the list of Place Filter Properties.

Since :
2.4
Remarks:
key and value must be released using free() and corresponding release method for property value correspondingly.
Parameters:
[in]indexThe current index of property
[in]totalThe total amount of properties
[in]keyThe key of property
[in]valueThe value of property
[in]uesr_dataThe user data passed from the maps_place_filter_foreach_property()
Returns:
true to continue with the next iteration of the loop,
false to break out of the loop
Precondition:
maps_place_filter_foreach_property() will invoke this callback.
See also:
maps_place_filter_foreach_property()

Function Documentation

int maps_place_filter_clone ( const maps_place_filter_h  origin,
maps_place_filter_h cloned 
)

Clones the place filter handle.

This function clones the place filter handle origin and all its resources.
Place filter handle origin may be created using maps_place_filter_create().

Since :
2.4
Remarks:
cloned must be released using maps_place_filter_destroy().
Parameters:
[in]originThe place filter handle to be cloned
[out]clonedA handle of a newly cloned place filter on success
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
Precondition:
origin is created using maps_place_filter_create().
See also:
maps_place_filter_create()
maps_place_filter_destroy()

Creates a new place filter handle.

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

Since :
2.4
Remarks:
filter must be released using maps_place_filter_destroy().
filter may be cloned using maps_place_filter_clone().
Parameters:
[out]filterA handle of a new place filter on success
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
See also:
maps_place_filter_destroy()
maps_place_filter_clone()

Destroys the place filter handle and releases all its resources.

This function destroys the place filter handle and releases all its resources.

Since :
2.4
Parameters:
[in]filterThe place filter handle to destroy
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
filter is created using maps_place_filter_create().
See also:
maps_place_filter_create()
maps_place_filter_clone()
int maps_place_filter_foreach_property ( const maps_place_filter_h  filter,
maps_place_filter_properties_cb  callback,
void *  user_data 
)

Retrieves all filter properties.

This function retrieves all place filter properties.

Since :
2.4
Parameters:
[in]filterThe handle of the place filter
[in]callbackThe callback function to invoke
[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_FOUNDResult not found
Precondition:
filter is created using maps_place_filter_create().
Postcondition:
This function invokes maps_place_filter_properties_cb() repeatedly to retrieve each available filter keys.
See also:
maps_place_filter_properties_cb()
maps_place_filter_get()
maps_place_filter_set()
maps_place_filter_create()
int maps_place_filter_get ( const maps_place_filter_h  filter,
const char *  key,
char **  value 
)

Gets the value of the specified key in the place filter.

This function gets the value of the specified key in the place filter.

Since :
2.4
Remarks:
value must be released using free().
Parameters:
[in]filterThe handle of the place filter
[in]keyThe key of filter
[out]valueThe filter value
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
filter is created using maps_place_filter_create().
See also:
maps_place_filter_set()
maps_place_filter_create()

Gets the category.

This function gets the category.
For allowed values of keys, see the macros above.

Since :
2.4
Remarks:
category must be released using maps_place_category_destroy().
Parameters:
[in]filterThe handle of the place filter
[out]categoryThe category
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
filter is created using maps_place_filter_create().
See also:
maps_place_filter_set_category()
maps_place_filter_create()
int maps_place_filter_get_keyword ( const maps_place_filter_h  filter,
char **  keyword 
)

Gets the value of keyword.

This function gets the value of keyword.

Since :
2.4
Remarks:
keyword must be released using free().
Parameters:
[in]filterThe handle of the place filter
[out]keywordThe key of filter
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
filter is created using maps_place_filter_create().
See also:
maps_place_filter_set_keyword()
maps_place_filter_create()
int maps_place_filter_get_place_name ( const maps_place_filter_h  filter,
char **  place_name 
)

Gets the place name.

This function gets the place name.

Since :
2.4
Remarks:
place_name must be released using free().
Parameters:
[in]filterThe handle of the place filter
[out]place_nameThe place name
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
filter is created using maps_place_filter_create().
See also:
maps_place_filter_set_place_name()
maps_place_filter_create()
int maps_place_filter_set ( maps_place_filter_h  filter,
const char *  key,
const char *  value 
)

Sets the filter value.

This function sets the filter value in an assignment with a specified string key.

Since :
2.4
Parameters:
[in]filterThe handle of the place filter
[in]keyThe key of filter
[in]valueThe filter value to set, could be NULL if want remove value
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
filter is created using maps_place_filter_create().
See also:
maps_place_filter_get()
maps_place_filter_create()

Sets the category.

This function sets the place name.

Since :
2.4
Parameters:
[in]filterThe handle of the place filter
[in]categoryThe category
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
filter is created using maps_place_filter_create().
See also:
maps_place_filter_get_category()
maps_place_filter_create()
int maps_place_filter_set_keyword ( maps_place_filter_h  filter,
const char *  keyword 
)

Sets the keyword.

This function sets the keyword.

Since :
2.4
Parameters:
[in]filterThe handle of the place filter
[in]keywordThe keyword
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
filter is created using maps_place_filter_create().
See also:
maps_place_filter_get_keyword()
maps_place_filter_create()
int maps_place_filter_set_place_name ( maps_place_filter_h  filter,
const char *  place_name 
)

Sets the place name.

This function sets the place name.

Since :
2.4
Parameters:
[in]filterThe handle of the place filter
[in]place_nameThe place name
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
filter is created using maps_place_filter_create().
See also:
maps_place_filter_get_place_name()
maps_place_filter_create()