diff options
author | Carlos Garnacho <carlos@imendio.com> | 2008-10-07 12:05:08 +0000 |
---|---|---|
committer | Carlos Garnacho <carlosg@src.gnome.org> | 2008-10-07 12:05:08 +0000 |
commit | 588539fdf6f848cfb017818d4f1dd1af08bdf0da (patch) | |
tree | 7e9deb58806fca8dabc8d2f5040605f05af33d6a /src/libtracker-common | |
parent | 586abf020c42883dd09b8dbc2ef7e187eee1a694 (diff) | |
download | tracker-588539fdf6f848cfb017818d4f1dd1af08bdf0da.tar.gz |
Do not expose the TrackerParser struct in the header, it was pulling
2008-10-07 Carlos Garnacho <carlos@imendio.com>
* src/libtracker-common/tracker-parser.[ch]: Do not expose the
TrackerParser struct in the header, it was pulling pango.h
unnecessarily.
svn path=/trunk/; revision=2319
Diffstat (limited to 'src/libtracker-common')
-rw-r--r-- | src/libtracker-common/tracker-parser.c | 34 | ||||
-rw-r--r-- | src/libtracker-common/tracker-parser.h | 34 |
2 files changed, 35 insertions, 33 deletions
diff --git a/src/libtracker-common/tracker-parser.c b/src/libtracker-common/tracker-parser.c index 844fae691..d688ca53e 100644 --- a/src/libtracker-common/tracker-parser.c +++ b/src/libtracker-common/tracker-parser.c @@ -22,6 +22,7 @@ #include "config.h" #include <string.h> +#include <pango/pango.h> #include "tracker-parser.h" #include "tracker-log.h" @@ -62,6 +63,39 @@ typedef enum { TRACKER_PARSER_WORD_NEWLINE } TrackerParserWordType; +typedef enum { + TRACKER_PARSER_ENCODING_ASCII, + TRACKER_PARSER_ENCODING_LATIN, + TRACKER_PARSER_ENCODING_CJK, + TRACKER_PARSER_ENCODING_OTHER +} TrackerParserEncoding; + +struct TrackerParser { + const gchar *txt; + gint txt_size; + + TrackerLanguage *language; + gboolean enable_stemmer; + gboolean enable_stop_words; + guint max_words_to_index; + guint max_word_length; + guint min_word_length; + gboolean delimit_words; + gboolean parse_reserved_words; + + /* Private members */ + gchar *word; + gint word_length; + guint word_position; + TrackerParserEncoding encoding; + const gchar *cursor; + + /* Pango members for CJK text parsing */ + PangoLogAttr *attrs; + guint attr_length; + guint attr_pos; +}; + static inline TrackerParserWordType get_word_type (gunichar c) { diff --git a/src/libtracker-common/tracker-parser.h b/src/libtracker-common/tracker-parser.h index c890c3e91..3d56d0a73 100644 --- a/src/libtracker-common/tracker-parser.h +++ b/src/libtracker-common/tracker-parser.h @@ -23,7 +23,6 @@ #define __TRACKERD_PARSER_H__ #include <glib.h> -#include <pango/pango.h> #include "tracker-language.h" @@ -33,38 +32,7 @@ G_BEGIN_DECLS #error "only <libtracker-common/tracker-common.h> must be included directly." #endif -typedef enum { - TRACKER_PARSER_ENCODING_ASCII, - TRACKER_PARSER_ENCODING_LATIN, - TRACKER_PARSER_ENCODING_CJK, - TRACKER_PARSER_ENCODING_OTHER -} TrackerParserEncoding; - -typedef struct { - const gchar *txt; - gint txt_size; - - TrackerLanguage *language; - gboolean enable_stemmer; - gboolean enable_stop_words; - guint max_words_to_index; - guint max_word_length; - guint min_word_length; - gboolean delimit_words; - gboolean parse_reserved_words; - - /* Private members */ - gchar *word; - gint word_length; - guint word_position; - TrackerParserEncoding encoding; - const gchar *cursor; - - /* Pango members for CJK text parsing */ - PangoLogAttr *attrs; - guint attr_length; - guint attr_pos; -} TrackerParser; +typedef struct TrackerParser TrackerParser; TrackerParser *tracker_parser_new (TrackerLanguage *language, gint max_word_length, |