}
}
-static GPtrArray *
-strip_utf8_string (const gchar *string)
+GPtrArray *
+empathy_live_search_strip_utf8_string (const gchar *string)
{
GPtrArray *word_array = NULL;
GString *word = NULL;
return FALSE;
}
-static gboolean
-live_search_match_words (const gchar *string,
+gboolean
+empathy_live_search_match_words (const gchar *string,
GPtrArray *words)
{
guint i;
if (priv->stripped_words != NULL)
g_ptr_array_unref (priv->stripped_words);
- priv->stripped_words = strip_utf8_string (text);
+ priv->stripped_words = empathy_live_search_strip_utf8_string (text);
g_object_notify (G_OBJECT (self), "text");
}
priv = GET_PRIV (self);
- return live_search_match_words (string, priv->stripped_words);
+ return empathy_live_search_match_words (string, priv->stripped_words);
}
gboolean
GPtrArray *words;
gboolean match;
- words = strip_utf8_string (prefix);
- match = live_search_match_words (string, words);
+ words = empathy_live_search_strip_utf8_string (prefix);
+ match = empathy_live_search_match_words (string, words);
if (words != NULL)
g_ptr_array_unref (words);
return match;
}
+GPtrArray *
+empathy_live_search_get_words (EmpathyLiveSearch *self)
+{
+ EmpathyLiveSearchPriv *priv = GET_PRIV (self);
+
+ return priv->stripped_words;
+}
gboolean empathy_live_search_match (EmpathyLiveSearch *self,
const gchar *string);
+GPtrArray * empathy_live_search_strip_utf8_string (const gchar *string);
+
+gboolean empathy_live_search_match_words (const gchar *string,
+ GPtrArray *words);
+
+GPtrArray * empathy_live_search_get_words (EmpathyLiveSearch *self);
+
/* Made public for unit tests */
gboolean empathy_live_search_match_string (const gchar *string,
const gchar *prefix);