[kdbus] Add SipHash algorithm
[platform/upstream/glib.git] / glib / gpattern.h
index add239c..4263a8f 100644 (file)
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
+
 #ifndef __G_PATTERN_H__
 #define __G_PATTERN_H__
 
-#include <gtypes.h>
+#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
+#error "Only <glib.h> can be included directly."
+#endif
+
+#include <glib/gtypes.h>
 
 G_BEGIN_DECLS
 
-typedef enum
-{
-  G_MATCH_ALL,       /* "*A?A*" */
-  G_MATCH_ALL_TAIL,  /* "*A?AA" */
-  G_MATCH_HEAD,      /* "AAAA*" */
-  G_MATCH_TAIL,      /* "*AAAA" */
-  G_MATCH_EXACT,     /* "AAAAA" */
-  G_MATCH_LAST
-} GMatchType;
 
 typedef struct _GPatternSpec    GPatternSpec;
-struct _GPatternSpec
-{
-  GMatchType match_type;
-  guint      pattern_length;
-  gchar     *pattern;
-  gchar     *pattern_reversed;
-};
 
+GLIB_AVAILABLE_IN_ALL
 GPatternSpec* g_pattern_spec_new       (const gchar  *pattern);
+GLIB_AVAILABLE_IN_ALL
 void          g_pattern_spec_free      (GPatternSpec *pspec);
+GLIB_AVAILABLE_IN_ALL
+gboolean      g_pattern_spec_equal     (GPatternSpec *pspec1,
+                                       GPatternSpec *pspec2);
+GLIB_AVAILABLE_IN_ALL
 gboolean      g_pattern_match          (GPatternSpec *pspec,
                                        guint         string_length,
                                        const gchar  *string,
                                        const gchar  *string_reversed);
+GLIB_AVAILABLE_IN_ALL
 gboolean      g_pattern_match_string   (GPatternSpec *pspec,
                                        const gchar  *string);
+GLIB_AVAILABLE_IN_ALL
 gboolean      g_pattern_match_simple   (const gchar  *pattern,
                                        const gchar  *string);