' ########################################################################################
' Microsoft Windows
' File: ChanMgr.inc
' Library name: CHANNELMGR
' Version: 1.0, Locale ID = 0
' Library GUID: {4804F2E0-D16E-11D0-802B-00C04FD75D13}
' Contents: Microsoft Channel Manager 1.0
' 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_ChanMgr_PBI)
#DEFINE PBX_ChanMgr_PBI
%EQUATE `CHANMGR_INC = 1
'/* header files for imported files */
#INCLUDE ONCE "Legacy/COM/Unknwn.inc"
$CLSID_ChannelMgr = GUID$("{B3CDAE90-D170-11D0-802B-00C04FD75D13}")
' ########################################################################################
' Interface name = IChannelMgr
' IID = 85BD8E82-0FBA-11D1-90C3-00C04FC2F568
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IChannelMgr_INTERFACE_DEFINED)
 %IChannelMgr_INTERFACE_DEFINED = 1
' // Size = 28 bytes
TYPE CHANNELSHORTCUTINFO DWORD
 cbSize AS DWORD
 pszTitle AS WSTRINGZ PTR
 pszURL AS WSTRINGZ PTR
 pszLogo AS WSTRINGZ PTR
 pszIcon AS WSTRINGZ PTR
 pszWideLogo AS WSTRINGZ PTR
 bIsSoftware AS LONG
END TYPE
' // Size = 24 bytes
TYPE CHANNELCATEGORYINFO DWORD
 cbSize AS DWORD
 pszTitle AS WSTRINGZ PTR
 pszURL AS WSTRINGZ PTR
 pszLogo AS WSTRINGZ PTR
 pszIcon AS WSTRINGZ PTR
 pszWideLogo AS WSTRINGZ PTR
END TYPE
' enum CHANNELENUMFLAGS
%EQUATE `CHANENUM_CHANNELFOLDER = &H1
%EQUATE `CHANENUM_SOFTUPDATEFOLDER = &H2
%EQUATE `CHANENUM_DESKTOPFOLDER = &H4
%EQUATE `CHANENUM_TITLE = &H10000
%EQUATE `CHANENUM_PATH = &H20000
%EQUATE `CHANENUM_URL = &H40000
%EQUATE `CHANENUM_SUBSCRIBESTATE = &H80000
%EQUATE `CHANENUM_ALLFOLDERS = %CHANENUM_CHANNELFOLDER OR %CHANENUM_SOFTUPDATEFOLDER OR %CHANENUM_DESKTOPFOLDER
%EQUATE `CHANENUM_ALLDATA = %CHANENUM_TITLE OR %CHANENUM_PATH OR %CHANENUM_URL OR %CHANENUM_SUBSCRIBESTATE
%EQUATE `CHANENUM_ALL = %CHANENUM_CHANNELFOLDER OR %CHANENUM_SOFTUPDATEFOLDER OR %CHANENUM_DESKTOPFOLDER OR %CHANENUM_TITLE OR %CHANENUM_PATH OR %CHANENUM_URL OR %CHANENUM_SUBSCRIBESTATE
$IID_IChannelMgr = GUID$("{85BD8E82-0FBA-11D1-90C3-00C04FC2F568}")
INTERFACE IChannelMgr $IID_IChannelMgr
 INHERIT IUnknown
 ' =====================================================================================
 METHOD AddChannelShortcut ( ' VTable offset = 12
 BYREF pChannelInfo AS CHANNELSHORTCUTINFO
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteChannelShortcut ( ' VTable offset = 16
 BYREF pszTitle AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD AddCategory ( ' VTable offset = 20
 BYREF pCategoryInfo AS CHANNELCATEGORYINFO
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteCategory ( ' VTable offset = 24
 BYREF pszTitle AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD EnumChannels ( ' VTable offset = 28
 BYVAL dwEnumFlags AS DWORD
 , BYREF pszURL AS WSTRINGZ
 , BYREF pIEnumChannels AS IEnumChannels
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IChannelMgr_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IEnumChannels
' IID = A4C65425-0F82-11D1-90C3-00C04FC2F568
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IEnumChannels_INTERFACE_DEFINED)
 %IEnumChannels_INTERFACE_DEFINED = 1
' enum SUBSCRIPTIONSTATE
%EQUATE `SUBSTATE_NOTSUBSCRIBED = 0
%EQUATE `SUBSTATE_PARTIALSUBSCRIPTION = %SUBSTATE_NOTSUBSCRIBED + 1
%EQUATE `SUBSTATE_FULLSUBSCRIPTION = %SUBSTATE_PARTIALSUBSCRIPTION + 1
' // Size = 16 bytes
TYPE CHANNELENUMINFO DWORD
 pszTitle AS WSTRINGZ PTR
 pszPath AS WSTRINGZ PTR
 pszURL AS WSTRINGZ PTR
 stSubscriptionState AS LONG ' SUBSCRIPTIONSTATE
END TYPE
$IID_IEnumChannels = GUID$("{A4C65425-0F82-11D1-90C3-00C04FC2F568}")
INTERFACE IEnumChannels $IID_IEnumChannels
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Next ( ' VTable offset = 12
 BYVAL celt AS DWORD
 , BYREF rgChanInf AS CHANNELENUMINFO
 , 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 IEnumChannels
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IEnumChannels_INTERFACE_DEFINED__ */
#ENDIF
