* added an 'ignore_zero' argument to Unify_unify()
[util-vserver.git] / util-vserver / lib_internal / matchlist.h
index 0e31517..f625f38 100644 (file)
 #include <stdbool.h>
 
 typedef int    (*MatchItemCompareFunc)(char const *, char const *);
+typedef enum { stINCLUDE,stEXCLUDE,stSKIP }    MatchType;
 
 struct MatchItem
 {
-    enum { stINCLUDE, stEXCLUDE }      type;
-    char const *                       name;
-    MatchItemCompareFunc               cmp;
+    MatchType                  type;
+    char const *               name;
+    MatchItemCompareFunc       cmp;
 };
 
 struct MatchList
@@ -46,13 +47,19 @@ struct MatchList
     size_t             buf_count;
 };
 
+struct MatchVserverInfo
+{
+    char const                 *name;
+    bool               use_pkgmgmt;
+};
+
 void           MatchList_init(struct MatchList *, char const *root,
                               size_t count) NONNULL((1,2));
 bool           MatchList_initByVserver(struct MatchList *,
-                                       char const *vserver,
+                                       struct MatchVserverInfo const *vserver,
                                        char const **res_appdir) NONNULL((1,2));
 void           MatchList_initManually(struct MatchList *list,
-                                      char const *vserver,
+                                      struct MatchVserverInfo const *vserver,
                                       char const *vdir,
                                       char const *exclude_file) NONNULL((1,3,4));
 void           MatchList_initRefserverList(struct MatchList **, size_t *cnt,
@@ -62,7 +69,7 @@ void          MatchList_appendFiles(struct MatchList *, size_t idx,
                                      char **files, size_t count,
                                      bool auto_type) NONNULL((1,3));
 
-bool           MatchList_compare(struct MatchList const *,
+MatchType      MatchList_compare(struct MatchList const *,
                                  char const *path) NONNULL((1,2));
 struct MatchItem
 const *                MatchList_find(struct MatchList const *,