Exemplo n.º 1
0
 public void Dispose()
 {
     if (_self != null)
     {
         Release();
         _self = null;
     }
     GC.SuppressFinalize(this);
 }
Exemplo n.º 2
0
        public static int eof(cef_zip_reader_t *self)
        {
            eof_delegate d;
            var          p = self->_eof;

            if (p == _pe)
            {
                d = _de;
            }
            else
            {
                d = (eof_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(eof_delegate));
                if (_pe == IntPtr.Zero)
                {
                    _de = d; _pe = p;
                }
            }
            return(d(self));
        }
Exemplo n.º 3
0
        public static long tell(cef_zip_reader_t *self)
        {
            tell_delegate d;
            var           p = self->_tell;

            if (p == _pd)
            {
                d = _dd;
            }
            else
            {
                d = (tell_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(tell_delegate));
                if (_pd == IntPtr.Zero)
                {
                    _dd = d; _pd = p;
                }
            }
            return(d(self));
        }
Exemplo n.º 4
0
        public static int read_file(cef_zip_reader_t *self, void *buffer, UIntPtr bufferSize)
        {
            read_file_delegate d;
            var p = self->_read_file;

            if (p == _pc)
            {
                d = _dc;
            }
            else
            {
                d = (read_file_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(read_file_delegate));
                if (_pc == IntPtr.Zero)
                {
                    _dc = d; _pc = p;
                }
            }
            return(d(self, buffer, bufferSize));
        }
Exemplo n.º 5
0
        public static int get_refct(cef_zip_reader_t *self)
        {
            get_refct_delegate d;
            var p = self->_base._get_refct;

            if (p == _p2)
            {
                d = _d2;
            }
            else
            {
                d = (get_refct_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_refct_delegate));
                if (_p2 == IntPtr.Zero)
                {
                    _d2 = d; _p2 = p;
                }
            }
            return(d(self));
        }
Exemplo n.º 6
0
        public static int open_file(cef_zip_reader_t *self, cef_string_t *password)
        {
            open_file_delegate d;
            var p = self->_open_file;

            if (p == _pa)
            {
                d = _da;
            }
            else
            {
                d = (open_file_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(open_file_delegate));
                if (_pa == IntPtr.Zero)
                {
                    _da = d; _pa = p;
                }
            }
            return(d(self, password));
        }
Exemplo n.º 7
0
        public static int get_file_last_modified(cef_zip_reader_t *self)
        {
            get_file_last_modified_delegate d;
            var p = self->_get_file_last_modified;

            if (p == _p9)
            {
                d = _d9;
            }
            else
            {
                d = (get_file_last_modified_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_file_last_modified_delegate));
                if (_p9 == IntPtr.Zero)
                {
                    _d9 = d; _p9 = p;
                }
            }
            return(d(self));
        }
Exemplo n.º 8
0
        public static long get_file_size(cef_zip_reader_t *self)
        {
            get_file_size_delegate d;
            var p = self->_get_file_size;

            if (p == _p8)
            {
                d = _d8;
            }
            else
            {
                d = (get_file_size_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_file_size_delegate));
                if (_p8 == IntPtr.Zero)
                {
                    _d8 = d; _p8 = p;
                }
            }
            return(d(self));
        }
Exemplo n.º 9
0
        public static cef_string_userfree *get_file_name(cef_zip_reader_t *self)
        {
            get_file_name_delegate d;
            var p = self->_get_file_name;

            if (p == _p7)
            {
                d = _d7;
            }
            else
            {
                d = (get_file_name_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_file_name_delegate));
                if (_p7 == IntPtr.Zero)
                {
                    _d7 = d; _p7 = p;
                }
            }
            return(d(self));
        }
Exemplo n.º 10
0
        public static int move_to_file(cef_zip_reader_t *self, cef_string_t *fileName, int caseSensitive)
        {
            move_to_file_delegate d;
            var p = self->_move_to_file;

            if (p == _p5)
            {
                d = _d5;
            }
            else
            {
                d = (move_to_file_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(move_to_file_delegate));
                if (_p5 == IntPtr.Zero)
                {
                    _d5 = d; _p5 = p;
                }
            }
            return(d(self, fileName, caseSensitive));
        }
Exemplo n.º 11
0
        public static int move_to_next_file(cef_zip_reader_t *self)
        {
            move_to_next_file_delegate d;
            var p = self->_move_to_next_file;

            if (p == _p4)
            {
                d = _d4;
            }
            else
            {
                d = (move_to_next_file_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(move_to_next_file_delegate));
                if (_p4 == IntPtr.Zero)
                {
                    _d4 = d; _p4 = p;
                }
            }
            return(d(self));
        }
Exemplo n.º 12
0
        public static int add_ref(cef_zip_reader_t *self)
        {
            add_ref_delegate d;
            var p = self->_base._add_ref;

            if (p == _p0)
            {
                d = _d0;
            }
            else
            {
                d = (add_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_ref_delegate));
                if (_p0 == IntPtr.Zero)
                {
                    _d0 = d; _p0 = p;
                }
            }
            return(d(self));
        }
Exemplo n.º 13
0
        public static int close_file(cef_zip_reader_t *self)
        {
            close_file_delegate d;
            var p = self->_close_file;

            if (p == _pb)
            {
                d = _db;
            }
            else
            {
                d = (close_file_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(close_file_delegate));
                if (_pb == IntPtr.Zero)
                {
                    _db = d; _pb = p;
                }
            }
            return(d(self));
        }
Exemplo n.º 14
0
        public static int release(cef_zip_reader_t *self)
        {
            release_delegate d;
            var p = self->_base._release;

            if (p == _p1)
            {
                d = _d1;
            }
            else
            {
                d = (release_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(release_delegate));
                if (_p1 == IntPtr.Zero)
                {
                    _d1 = d; _p1 = p;
                }
            }
            return(d(self));
        }
Exemplo n.º 15
0
 internal static CefZipReader FromNative(cef_zip_reader_t *ptr)
 {
     return(new CefZipReader(ptr));
 }
Exemplo n.º 16
0
 private CefZipReader(cef_zip_reader_t* ptr)
 {
     if (ptr == null) throw new ArgumentNullException("ptr");
     _self = ptr;
 }
Exemplo n.º 17
0
 public CefZipReader(cef_zip_reader_t *instance)
     : base((cef_base_ref_counted_t *)instance)
 {
 }