1 // Licensed under the Apache License, Version 2.0 2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license 3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. 4 // All files in the project carrying such notice may not be copied, modified, or distributed 5 // except according to those terms. 6 //! Url History Interfaces 7 use ctypes::c_void; 8 use shared::guiddef::REFIID; 9 use shared::minwindef::{BOOL, DWORD, FILETIME, ULONG}; 10 use shared::wtypesbase::LPCOLESTR; 11 use um::docobj::{IOleCommandTarget, IOleCommandTargetVtbl}; 12 use um::unknwnbase::{IUnknown, IUnknownVtbl}; 13 use um::winnt::{HRESULT, LPWSTR}; 14 pub const STATURL_QUERYFLAG_ISCACHED: DWORD = 0x00010000; 15 pub const STATURL_QUERYFLAG_NOURL: DWORD = 0x00020000; 16 pub const STATURL_QUERYFLAG_NOTITLE: DWORD = 0x00040000; 17 pub const STATURL_QUERYFLAG_TOPLEVEL: DWORD = 0x00080000; 18 pub const STATURLFLAG_ISCACHED: DWORD = 0x00000001; 19 pub const STATURLFLAG_ISTOPLEVEL: DWORD = 0x00000002; 20 ENUM!{enum ADDURL_FLAG { 21 ADDURL_FIRST = 0, 22 ADDURL_ADDTOHISTORYANDCACHE = 0, 23 ADDURL_ADDTOCACHE = 1, 24 ADDURL_Max = 2147483647, 25 }} 26 pub type LPENUMSTATURL = *mut IEnumSTATURL; 27 STRUCT!{struct STATURL { 28 cbSize: DWORD, 29 pwcsUrl: LPWSTR, 30 pwcsTitle: LPWSTR, 31 ftLastVisited: FILETIME, 32 ftLastUpdated: FILETIME, 33 ftExpires: FILETIME, 34 dwFlags: DWORD, 35 }} 36 pub type LPSTATURL = *mut STATURL; 37 RIDL!{#[uuid(0x3c374a42, 0xbae4, 0x11cf, 0xbf, 0x7d, 0x00, 0xaa, 0x00, 0x69, 0x46, 0xee)] 38 interface IEnumSTATURL(IEnumSTATURLVtbl): IUnknown(IUnknownVtbl) { 39 fn Next( 40 celt: ULONG, 41 rgelt: LPSTATURL, 42 pceltFetched: *mut ULONG, 43 ) -> HRESULT, 44 fn Skip( 45 celt: ULONG, 46 ) -> HRESULT, 47 fn Reset() -> HRESULT, 48 fn Clone( 49 ppenum: *mut *mut IEnumSTATURL, 50 ) -> HRESULT, 51 fn SetFilter( 52 poszFilter: LPCOLESTR, 53 dwFlags: DWORD, 54 ) -> HRESULT, 55 }} 56 pub type LPURLHISTORYSTG = *mut IUrlHistoryStg; 57 RIDL!{#[uuid(0x3c374a41, 0xbae4, 0x11cf, 0xbf, 0x7d, 0x00, 0xaa, 0x00, 0x69, 0x46, 0xee)] 58 interface IUrlHistoryStg(IUrlHistoryStgVtbl): IUnknown(IUnknownVtbl) { 59 fn AddUrl( 60 pocsUrl: LPCOLESTR, 61 ) -> HRESULT, 62 fn DeleteUrl( 63 pocsUrl: LPCOLESTR, 64 dwFlags: DWORD, 65 ) -> HRESULT, 66 fn QueryUrl( 67 pocsUrl: LPCOLESTR, 68 dwFlags: DWORD, 69 lpSTATURL: LPSTATURL, 70 ) -> HRESULT, 71 fn BindToObject( 72 pocsUrl: LPCOLESTR, 73 riid: REFIID, 74 ppvOut: *mut *mut c_void, 75 ) -> HRESULT, 76 fn EnumUrls( 77 ppEnum: *mut *mut IEnumSTATURL, 78 ) -> HRESULT, 79 }} 80 pub type LPURLHISTORYSTG2 = *mut IUrlHistoryStg2; 81 RIDL!{#[uuid(0xafa0dc11, 0xc313, 0x11d0, 0x83, 0x1a, 0x00, 0xc0, 0x4f, 0xd5, 0xae, 0x38)] 82 interface IUrlHistoryStg2(IUrlHistoryStg2Vtbl): IUrlHistoryStg(IUrlHistoryStgVtbl) { 83 fn AddUrlAndNotify( 84 pocsUrl: LPCOLESTR, 85 pocsTitle: LPCOLESTR, 86 dwFlags: DWORD, 87 fWriteHistory: BOOL, 88 poctNotify: *mut IOleCommandTarget, 89 punkISFolder: *mut IUnknown, 90 ) -> HRESULT, 91 fn ClearHistory() -> HRESULT, 92 }} 93 pub type LPURLHISTORYNOTIFY = *mut IUrlHistoryNotify; 94 RIDL!{#[uuid(0xbc40bec1, 0xc493, 0x11d0, 0x83, 0x1b, 0x00, 0xc0, 0x4f, 0xd5, 0xae, 0x38)] 95 interface IUrlHistoryNotify(IUrlHistoryNotifyVtbl): 96 IOleCommandTarget(IOleCommandTargetVtbl) {} 97 } 98