/ gwenginequicksearch.h / Functions / Description

Functions



engine_quick_search_new

Creates a new engine quick search
struct engine_quick_search *engine_quick_search_new ( void);
This function creates a new engine quick search. It's an allocation function.
All data are agregated.

Result: a pointer to the engine quick search structure. Returns NULL when an error occured..


engine_quick_search_set_pattern

Sets the search pattern string
gint engine_quick_search_set_pattern ( struct engine_quick_search *p, gchar *pattern);
This function sets the pattern for quick search. This pattern is a regular expression

Parameters
p the engine quick search to set pattern
pattern the search pattern string

Result: an error code. Returns 0 when it's done. Returns -1 when an error occured..


engine_quick_search_set_key_words

Sets the list of key words for the search
gint engine_quick_search_set_key_words ( struct engine_quick_search *p, gchar **key_words_list);
This function sets the list of key words for the search. These key words are regular expressions

Parameters
p the engine quick search to set pattern
key_words_list the key words list

Result: an error code. Returns 0 when it's done. Returns -1 when an error occured..


engine_quick_search_set_type

Sets the search type
gint engine_quick_search_set_type ( struct engine_quick_search *p, gint type);
This function sets the search type

Parameters
p the engine quick search to set pattern
type the search type (SEARCH_TYPE_KEY_WORDS, SEARCH_TYPE_WILDCARDS, SEARCH_TYPE_REGEX)

Result: an error code. Returns 0 when it's done. Returns -1 when an error occured..


engine_quick_search_set_case_sensitive

Sets if the quick search is case sensitive
gint engine_quick_search_set_case_sensitive ( struct engine_quick_search *p, gboolean case_sensitive);
This function sets if the quick search is case sensitive.

Parameters
p the engine quick search to set case sensitive mode
case_sensitive TRUE if quick search is case sensitive or FALSE if is uncase sensitive

Result: an error code. Returns 0 when it's done. Returns -1 when an error occured..


engine_quick_search_set_match_file

Sets if the quick search matches with files
gint engine_quick_search_set_match_file ( struct engine_quick_search *p, gboolean match_file);
This function sets if the quick search matches with files

Parameters
p the engine quick search to set if matches with files
match_file TRUE if quick search matches with files or FALSE if doesn't match

Result: an error code. Returns 0 when it's done. Returns -1 when an error occured..


engine_quick_search_set_match_folder

Sets if the quick search matches with folders
gint engine_quick_search_set_match_folder ( struct engine_quick_search *p, gboolean match_folder);
This function sets if the quick search matches with folders

Parameters
p the engine quick search to set if matches with folders
match_folder TRUE if quick search matches with folders or FALSE if doesn't match

Result: an error code. Returns 0 when it's done. Returns -1 when an error occured..


engine_quick_search_set_match_disk

Sets if the quick search matches with disks
gint engine_quick_search_set_match_disk ( struct engine_quick_search *p, gboolean match_disk);
This function sets if the quick search matches with disks

Parameters
p the engine quick search to set if matches with disks
match_disk TRUE if quick search matches with disks or FALSE if doesn't match

Result: an error code. Returns 0 when it's done. Returns -1 when an error occured..


engine_quick_search_set_match_category

Sets if the quick search matches with categories
gint engine_quick_search_set_match_category ( struct engine_quick_search *p, gboolean match_category);
This function sets if the quick search matches with categories

Parameters
p the engine quick search to set if matches with cateogies
match_category TRUE if quick search matches with categories or FALSE if doesn't match

Result: an error code. Returns 0 when it's done. Returns -1 when an error occured..


engine_quick_search_set_match_description

Sets if the quick search matches with descriptions
gint engine_quick_search_set_match_description ( struct engine_quick_search *p, gboolean match_description);
This function sets if the quick search matches with descriptions

Parameters
p the engine quick search to set if matches with descriptions
match_description TRUE if quick search matches with descriptions or FALSE if doesn't match

Result: an error code. Returns 0 when it's done. Returns -1 when an error occured..


engine_quick_search_set_match_all_key_words

Sets if the quick search matches with all key words
gint engine_quick_search_set_match_all_key_words ( struct engine_quick_search *p, gboolean match_all_key_words);
This function sets if the quick search matches with all key words

Parameters
p the engine quick search to set if matches with all key words
match_all_key_words TRUE if quick search matches with all key words or FALSE if it matches with only one of them

Result: an error code. Returns 0 when it's done. Returns -1 when an error occured..


engine_quick_search_get_pattern

Gets the search pattern string
gchar * engine_quick_search_get_pattern ( struct engine_quick_search *p);
This function gets the pattern for quick search.

Parameters
p the engine quick search to get pattern

Result: the pattern Returns NULL when an error occured..


engine_quick_search_get_key_words

Gets the list of key words for the search
gchar ** engine_quick_search_get_key_words ( struct engine_quick_search *p);
This function gets the list of key words for the search. These key words are regular expressions

Parameters
p the engine quick search to set pattern

Result: The key words list.
Returns NULL when an error occured..


engine_quick_search_get_type

Gets the search type Gets if the quick search is case sensitive
gboolean engine_quick_search_get_case_sensitive ( struct engine_quick_search *p);


/*!
 * @function	engine_quick_search_get_match_file
 * @abstract	Gets if the quick search matches with files
 * @discussion	This function gets if the quick search matches with files.
 * @param	p	the engine quick search to get if matches with files
 * @result	TRUE if the quick search matches with files or FALSE if doesn't match
 *		Returns NULL when an error occured.
 */
gboolean engine_quick_search_get_match_file ( struct engine_quick_search *p);


/*!
 * @function	engine_quick_search_get_match_folder
 * @abstract	Gets if the quick search matches with folders
 * @discussion	This function gets if the quick search matches with folders.
 * @param	p	the engine quick search to get if matches with folders
 * @result	TRUE if the quick search matches with folders or FALSE if doesn't match
 *		Returns NULL when an error occured.
 */
gboolean engine_quick_search_get_match_folder ( struct engine_quick_search *p);


/*!
 * @function	engine_quick_search_get_match_disk
 * @abstract	Gets if the quick search matches with disks
 * @discussion	This function gets if the quick search matches with disks.
 * @param	p	the engine quick search to get if matches with disks
 * @result	TRUE if the quick search matches with disks or FALSE if doesn't match
 *		Returns NULL when an error occured.
 */
gboolean engine_quick_search_get_match_disk ( struct engine_quick_search *p);


/*!
 * @function	engine_quick_search_get_match_category
 * @abstract	Gets if the quick search matches with categories
 * @discussion	This function gets if the quick search matches with categories.
 * @param	p	the engine quick search to get if matches with categories
 * @result	TRUE if the quick search matches with categories or FALSE if doesn't match
 *		Returns NULL when an error occured.
 */
gboolean engine_quick_search_get_match_category ( struct engine_quick_search *p);


/*!
 * @function	engine_quick_search_get_match_description
 * @abstract	Gets if the quick search matches with descriptions
 * @discussion	This function gets if the quick search matches with descriptions.
 * @param	p	the engine quick search to get if matches with descriptions
 * @result	TRUE if the quick search matches with descriptions or FALSE if doesn't match
 *		Returns NULL when an error occured.
 */
gboolean engine_quick_search_get_match_description ( struct engine_quick_search *p);


/*!
 * @function	engine_quick_search_get_match_all_key_words
 * @abstract	Gets if the quick search matches with all key words
 * @discussion	This function gets if the quick search matches with all key words.
 * @param	p	the engine quick search to get if matches with all key words
 * @result	TRUE if the quick search matches with all key words or FALSE if it matches with only one of them
 *		Returns NULL when an error occured.
 */
gboolean engine_quick_search_get_match_all_key_words ( struct engine_quick_search *p);


/*!
 * @function	engine_quick_search_free
 * @abstract	Frees data structure
 * @discussion	This function frees the engine quick search data structure.
 * @param	p	the engine quick search to free
 * @result	an error code.
 *		Returns 0 when it's done.
 *		Returns -1 when an error occured.
 */
gint engine_quick_search_free ( struct engine_quick_search *p);


#endif
This function gets the search type gint engine_quick_search_get_type ( struct engine_quick_search *p); /*! This function gets if the quick search is case sensitive.

Parameters
p the engine quick search to set pattern
p the engine quick search to get if is case sensitive

Result: TRUE if the quick search is case sensitive or FALSE if is uncase sensitive Returns NULL when an error occured..