winapi_ui_automation/um/
urlhist.rs

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
7use ctypes::c_void;
8use shared::guiddef::REFIID;
9use shared::minwindef::{BOOL, DWORD, FILETIME, ULONG};
10use shared::wtypesbase::LPCOLESTR;
11use um::docobj::{IOleCommandTarget, IOleCommandTargetVtbl};
12use um::unknwnbase::{IUnknown, IUnknownVtbl};
13use um::winnt::{HRESULT, LPWSTR};
14pub const STATURL_QUERYFLAG_ISCACHED: DWORD = 0x00010000;
15pub const STATURL_QUERYFLAG_NOURL: DWORD = 0x00020000;
16pub const STATURL_QUERYFLAG_NOTITLE: DWORD = 0x00040000;
17pub const STATURL_QUERYFLAG_TOPLEVEL: DWORD = 0x00080000;
18pub const STATURLFLAG_ISCACHED: DWORD = 0x00000001;
19pub const STATURLFLAG_ISTOPLEVEL: DWORD = 0x00000002;
20ENUM!{enum ADDURL_FLAG {
21    ADDURL_FIRST = 0,
22    ADDURL_ADDTOHISTORYANDCACHE = 0,
23    ADDURL_ADDTOCACHE = 1,
24    ADDURL_Max = 2147483647,
25}}
26pub type LPENUMSTATURL = *mut IEnumSTATURL;
27STRUCT!{struct STATURL {
28    cbSize: DWORD,
29    pwcsUrl: LPWSTR,
30    pwcsTitle: LPWSTR,
31    ftLastVisited: FILETIME,
32    ftLastUpdated: FILETIME,
33    ftExpires: FILETIME,
34    dwFlags: DWORD,
35}}
36pub type LPSTATURL = *mut STATURL;
37RIDL!{#[uuid(0x3c374a42, 0xbae4, 0x11cf, 0xbf, 0x7d, 0x00, 0xaa, 0x00, 0x69, 0x46, 0xee)]
38interface 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}}
56pub type LPURLHISTORYSTG = *mut IUrlHistoryStg;
57RIDL!{#[uuid(0x3c374a41, 0xbae4, 0x11cf, 0xbf, 0x7d, 0x00, 0xaa, 0x00, 0x69, 0x46, 0xee)]
58interface 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}}
80pub type LPURLHISTORYSTG2 = *mut IUrlHistoryStg2;
81RIDL!{#[uuid(0xafa0dc11, 0xc313, 0x11d0, 0x83, 0x1a, 0x00, 0xc0, 0x4f, 0xd5, 0xae, 0x38)]
82interface 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}}
93pub type LPURLHISTORYNOTIFY = *mut IUrlHistoryNotify;
94RIDL!{#[uuid(0xbc40bec1, 0xc493, 0x11d0, 0x83, 0x1b, 0x00, 0xc0, 0x4f, 0xd5, 0xae, 0x38)]
95interface IUrlHistoryNotify(IUrlHistoryNotifyVtbl):
96    IOleCommandTarget(IOleCommandTargetVtbl) {}
97}