Port MatrixFilter to C

This commit is contained in:
2017-11-10 11:29:45 +01:00
parent 96e36f49e1
commit 80dad1b03a
4 changed files with 318 additions and 65 deletions

View File

@@ -320,6 +320,16 @@ namespace Matrix {
throws Matrix.Error;
}
[CCode (cheader_filename = "matrix-c-compacts.h")]
public class Filter : JsonCompact {
public string[] event_fields { get; set; }
public EventFormat event_format { get; set; default = Matrix.EventFormat.CLIENT; }
public FilterRules? presence_filter { get; set; default = null; }
public RoomFilter? room_filter { get; set; default = null; }
public override Json.Node? get_json_node()
throws Matrix.Error;
}
/* Utilities */
[CCode (cheader_filename = "utils.h", cname = "_matrix_g_enum_to_string")]
public string? _g_enum_value_to_nick(GLib.Type enum_type, int value, bool convert_dashes = true);