' ########################################################################################
' Microsoft Windows
' File: UrlHist.inc
' Contents: The IUrlHistory interfaces provide functionality to manage Microsoft Internet
' Explorer history information.
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_UrlHist_PBI)
#DEFINE PBX_UrlHist_PBI
%EQUATE `URLHIST_INC = 1
'/* header files for imported files */
#INCLUDE ONCE "Legacy/COM/ObjIdl.inc"
#INCLUDE ONCE "Legacy/COM/OleIdl.inc"
#INCLUDE ONCE "Legacy/COM/OAIdl.inc"
#INCLUDE ONCE "Legacy/System/DocObj.inc"
'//=--------------------------------------------------------------------------=
'// UrlHist.h
'//=--------------------------------------------------------------------------=
'// (C) Copyright Microsoft Corporation. All Rights Reserved.
'//
'// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
'// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
'// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
'// PARTICULAR PURPOSE.
'//=--------------------------------------------------------------------------=
'//---------------------------------------------------------------------------=
'// Url History Interfaces.
%EQUATE `STATURL_QUERYFLAG_ISCACHED = &H00010000
%EQUATE `STATURL_QUERYFLAG_NOURL = &H00020000
%EQUATE `STATURL_QUERYFLAG_NOTITLE = &H00040000
%EQUATE `STATURL_QUERYFLAG_TOPLEVEL = &H00080000
%EQUATE `STATURLFLAG_ISCACHED = &H00000001
%EQUATE `STATURLFLAG_ISTOPLEVEL = &H00000002
' ADDURL_FLAG enum
%EQUATE `ADDURL_FIRST = 0
%EQUATE `ADDURL_ADDTOHISTORYANDCACHE = 0
%EQUATE `ADDURL_ADDTOCACHE = 1
%EQUATE `ADDURL_Max = 2147483647&
'////////////////////////////////////////////////////////////////////////////
'// Interface Definitions
' ########################################################################################
' IEnumSTATURL interface
' IID = 3C374A42-BAE4-11CF-BF7D-00AA006946EE
' Inherited interface = IUnknown
' This interface enumerates the items in the history cache.
' ########################################################################################
#IF NOT %DEF(%IEnumSTATURL_INTERFACE_DEFINED)
 %IEnumSTATURL_INTERFACE_DEFINED = 1
' // Size = 40 bytes
TYPE STATURL DWORD
 cbSize AS DWORD ' DWORD cbSize
 pwcsUrl AS WSTRINGZ PTR ' LPWSTR pwcsUrl
 pwcsTitle AS WSTRINGZ PTR ' LPWSTR pwcsTitle
 ftLastVisited AS FILETIME ' FILETIME ftLastVisited
 ftLastUpdated AS FILETIME ' FILETIME ftLastUpdated
 ftExpires AS FILETIME ' FILETIME ftExpires
 dwFlags AS DWORD ' DWORD dwFlags
END TYPE
$IID_IEnumSTATURL = GUID$("{3C374A42-BAE4-11CF-BF7D-00AA006946EE}")
INTERFACE IEnumSTATURL $IID_IEnumSTATURL
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Next ( ' VTable offset = 12
 BYVAL celt AS DWORD
 , BYREF rgelt AS STATURL
 , BYREF pceltFetched AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Skip ( ' VTable offset = 16
 BYVAL celt AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Reset ( ' VTable offset = 20
 ) AS LONG
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 24
 BYREF ppenum AS IEnumSTATURL
 ) AS LONG
 ' =====================================================================================
 METHOD SetFilter ( ' VTable offset = 28
 BYREF poszFilter AS WSTRINGZ
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IEnumSTATURL_INTERFACE_DEFINED__ */
' ########################################################################################
' IUrlHistoryStg interface
' IID = 3C374A41-BAE4-11CF-BF7D-00AA006946EE
' Inherited interface = IUnknown
' This interface manages Microsoft Internet Explorer history for the current user.
' ########################################################################################
#IF NOT %DEF(%IUrlHistoryStg_INTERFACE_DEFINED)
 %IUrlHistoryStg_INTERFACE_DEFINED = 1
$IID_IUrlHistoryStg = GUID$("{3C374A41-BAE4-11CF-BF7D-00AA006946EE}")
INTERFACE IUrlHistoryStg $IID_IUrlHistoryStg
 INHERIT IUnknown
 ' =====================================================================================
 METHOD AddUrl ( ' VTable offset = 12
 BYREF pocsUrl AS WSTRINGZ
 , BYREF pocsTitle AS WSTRINGZ
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteUrl ( ' VTable offset = 16
 BYREF pocsUrl AS WSTRINGZ
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD QueryUrl ( ' VTable offset = 20
 BYREF pocsUrl AS WSTRINGZ
 , BYVAL dwFlags AS DWORD
 , BYREF lpSTATURL AS STATURL
 ) AS LONG
 ' =====================================================================================
 METHOD BindToObject ( ' VTable offset = 24
 BYREF pocsUrl AS WSTRINGZ
 , BYREF riid AS GUID
 , BYREF ppvOut AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EnumUrls ( ' VTable offset = 28
 BYREF ppEnum AS IEnumSTATURL
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IUrlHistoryStg_INTERFACE_DEFINED__ */
' ########################################################################################
' IUrlHistoryStg2 interface
' IID = AFA0DC11-C313-11d0-831A-00C04FD5AE38
' Inherited interface = IUrlHistoryStg
' This interface provides additional features for managing the user's history.
' ########################################################################################
#IF NOT %DEF(%IUrlHistoryStg2_INTERFACE_DEFINED)
 %IUrlHistoryStg2_INTERFACE_DEFINED = 1
$IID_IUrlHistoryStg2 = GUID$("{AFA0DC11-C313-11d0-831A-00C04FD5AE38}")
INTERFACE IUrlHistoryStg2 $IID_IUrlHistoryStg2
 INHERIT IUnknown
 ' =====================================================================================
 METHOD AddUrl ( ' VTable offset = 12
 BYREF pocsUrl AS WSTRINGZ
 , BYREF pocsTitle AS WSTRINGZ
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteUrl ( ' VTable offset = 16
 BYREF pocsUrl AS WSTRINGZ
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD QueryUrl ( ' VTable offset = 20
 BYREF pocsUrl AS WSTRINGZ
 , BYVAL dwFlags AS DWORD
 , BYREF lpSTATURL AS STATURL
 ) AS LONG
 ' =====================================================================================
 METHOD BindToObject ( ' VTable offset = 24
 BYREF pocsUrl AS WSTRINGZ
 , BYREF riid AS GUID
 , BYREF ppvOut AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EnumUrls ( ' VTable offset = 28
 BYREF ppEnum AS IEnumSTATURL
 ) AS LONG
 ' =====================================================================================
 METHOD AddUrlAndNotify ( ' VTable offset = 32
 BYREF pocsUrl AS WSTRINGZ
 , BYREF pocsTitle AS WSTRINGZ
 , BYVAL dwFlags AS DWORD
 , BYVAL fWriteHistory AS LONG
 , BYVAL poctNotify AS IOleCommandTarget
 , BYVAL punkISFolder AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD ClearHistory ( ' VTable offset = 36
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IUrlHistoryStg2_INTERFACE_DEFINED__ */
' ########################################################################################
' IUrlHistoryNotify interface
' IID = BC40BEC1-C493-11d0-831B-00C04FD5AE38
' Inherited interface = IOleCommandTarget
' This interface is a remapping of the IOleCommandTarget interface.
' ########################################################################################
#IF NOT %DEF(%IUrlHistoryNotify_INTERFACE_DEFINED)
 %IUrlHistoryNotify_INTERFACE_DEFINED = 1
$IID_IUrlHistoryNotify = GUID$("{BC40BEC1-C493-11d0-831B-00C04FD5AE38}")
INTERFACE IUrlHistoryNotify $IID_IUrlHistoryNotify
 INHERIT IUnknown
 ' =====================================================================================
 METHOD QueryStatus ( ' VTable offset = 12
 BYREF pguidCmdGroup AS GUID
 , BYVAL cCmds AS DWORD
 , BYREF prgCmds AS OLECMD
 , BYREF pCmdText AS OLECMDTEXT
 ) AS LONG
 ' =====================================================================================
 METHOD Exec ( ' VTable offset = 16
 BYREF pguidCmdGroup AS GUID
 , BYVAL nCmdID AS DWORD
 , BYVAL nCmdExecOpt AS DWORD
 , BYREF pvaIn AS VARIANT
 , BYREF pvaOut AS VARIANT
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IUrlHistoryNotify_INTERFACE_DEFINED__ */
#ENDIF
