[DllImport("ecal")] static extern unsafe bool e_cal_get_object_list_as_comp(IntPtr raw, string query, out IntPtr objects, out IntPtr error); public unsafe bool GetObjectListAsComp(string query, out IntPtr objects) { IntPtr error = IntPtr.Zero; bool raw_ret = e_cal_get_object_list_as_comp(Handle, query, out objects, out error); bool ret = raw_ret; if (error != IntPtr.Zero) throw new GLib.GException (error); return ret; } public Evolution.CalComponent[] GetItems (string query) { IntPtr ecal_objects = IntPtr.Zero; bool ret; if (query != null && query.Length > 0) ret = GetObjectListAsComp (query, out ecal_objects); else ret = GetObjectListAsComp ("#t", out ecal_objects); if (!ret) return null; return CalUtil.ECalToCalComponentArray (ecal_objects, this); } public Evolution.CalComponent[] GetItems () { return GetItems (null); } public Evolution.CalComponent[] GetItemsOccurInRange (System.DateTime start_date_time, System.DateTime end_date_time) { return (GetItems (CalUtil.GetQueryStringForTimeRange (start_date_time, end_date_time))); } [DllImport("ecal")] static extern unsafe bool e_cal_get_query(IntPtr raw, string sexp, out IntPtr query, out IntPtr error); public Evolution.CalView GetCalView (string sexp) { Evolution.CalView ret; IntPtr calviewHandle; IntPtr error = IntPtr.Zero; bool raw_ret = e_cal_get_query (Handle, sexp, out calviewHandle, out error); if (error != IntPtr.Zero) throw new GLib.GException (error); if (raw_ret == false || calviewHandle == (IntPtr)0) return null; ret = (Evolution.CalView) GLib.Object.GetObject(calviewHandle); return ret; } [DllImport("evolutionglue")] static extern bool e_cal_glue_ecal_get_changes (IntPtr raw, string change_id, out IntPtr newitems, out IntPtr updated, out IntPtr removed, out IntPtr error); public bool GetChanges (string change_id, out CalComponent[] newitems, out CalComponent[] updated, out string[] removed) { IntPtr error = IntPtr.Zero; IntPtr added = IntPtr.Zero; IntPtr modified = IntPtr.Zero; IntPtr deleted = IntPtr.Zero; bool raw_ret = e_cal_glue_ecal_get_changes (Handle, change_id, out added, out modified, out deleted, out error); if (error != IntPtr.Zero) throw new GLib.GException (error); if (raw_ret == false) { newitems = new CalComponent [0]; updated = new CalComponent [0]; removed = new string [0]; return raw_ret; } newitems = CalUtil.ECalToCalComponentArray (added, this); updated = CalUtil.ECalToCalComponentArray (modified, this); removed = CalUtil.GSListToStringArray (deleted, true); return raw_ret; }