Ejemplo n.º 1
0
        public string[] searchUIDs(string expr, string [] sub)
        {
            CamelException ex = new CamelException();
            Util.UIDArray uids = new Util.UIDArray(sub);
            IntPtr o = camel_folder_search_by_uids(cobject, expr, ref uids, ref ex);

            if (ex.id != 0)
                throw new Camel.Exception(ex);

            uids = new Util.UIDArray(o);
            camel_folder_search_free(cobject, o);

            return uids.uids;
        }
Ejemplo n.º 2
0
 static extern IntPtr camel_folder_get_message(IntPtr o, string uid, ref CamelException ex);
Ejemplo n.º 3
0
 public Exception(CamelException ex)
 {
     id = (Type)ex.id;
     desc = ex.desc;
 }
Ejemplo n.º 4
0
        public MimeMessage getMessage(string uid)
        {
            CamelException ex = new CamelException();
            IntPtr o = camel_folder_get_message(cobject, uid, ref ex);

            if (ex.id != 0)
                throw new Camel.Exception(ex);

            return (MimeMessage)fromCamel(o);
        }
Ejemplo n.º 5
0
        public URL(string uri)
        {
            CamelException ex = new CamelException();

            cobject = camel_url_new(uri, ref ex);
            if (ex.id != 0)
                throw new Exception(ex);
        }
Ejemplo n.º 6
0
 static extern IntPtr camel_url_new(string url, ref CamelException ex);
Ejemplo n.º 7
0
 static extern IntPtr camel_store_get_folder(IntPtr o, string name, int flags, ref CamelException ex);
Ejemplo n.º 8
0
        public Camel.Object getObject(int type)
        {
            IntPtr o;
            Camel.Object co;
            CamelException ex = new CamelException();

            o = camel_object_get_ptr(cobject, ref ex, type);
            if (ex.id != 0)
                throw new Camel.Exception(ex);

            co = fromCamel(o);
            camel_object_free(cobject, type, o);

            return co;
        }
Ejemplo n.º 9
0
        public Service getService(string uri, Provider.Type type)
        {
            IntPtr s;
            CamelException ex = new CamelException();

            s = camel_session_get_service(cobject, uri, (int)type, ref ex);
            if (ex.id != 0)
                throw new Camel.Exception(ex);

            return (Service)fromCamel(s);
        }
Ejemplo n.º 10
0
 static extern IntPtr camel_session_get_service_connected(IntPtr o, string uri, int type, ref CamelException ex);
Ejemplo n.º 11
0
 static extern IntPtr camel_object_get_ptr(IntPtr raw, ref CamelException ex, int tag);
Ejemplo n.º 12
0
 static extern int camel_object_get_int(IntPtr raw, ref CamelException ex, int tag);
Ejemplo n.º 13
0
        // maybe we want an indexer class to get properties?
        // e.g. name = folder.properties[Folder.Tag.NAME]
        public String getString(int type)
        {
            String s;
            IntPtr o;
            CamelException ex = new CamelException();

            o = camel_object_get_ptr(cobject, ref ex, type);
            if (ex.id != 0)
                throw new Camel.Exception(ex);

            s = Marshal.PtrToStringAuto(o);
            camel_object_free(cobject, type, o);

            return s;
        }
Ejemplo n.º 14
0
 static extern IntPtr camel_folder_search_by_expression(IntPtr o, string expr, ref CamelException ex);
Ejemplo n.º 15
0
        Folder getFolder(string name, int flags)
        {
            IntPtr s;
            CamelException ex = new CamelException();

            s = camel_store_get_folder(cobject, name, flags, ref ex);
            if (ex.id != 0)
                throw new Camel.Exception(ex);

            return (Folder)fromCamel(s);
        }
Ejemplo n.º 16
0
 static extern IntPtr camel_folder_search_by_uids(IntPtr o, string expr, ref Util.UIDArray uids, ref CamelException ex);
Ejemplo n.º 17
0
        public int getInt(int type)
        {
            int r;
            CamelException ex = new CamelException();

            r = camel_object_get_int(cobject, ref ex, type);
            if (ex.id != 0)
                throw new Camel.Exception(ex);

            return r;
        }