]> git.saurik.com Git - apple/mdnsresponder.git/blob - Clients/ExplorerPlugin/ExplorerBar.h
mDNSResponder-107.4.tar.gz
[apple/mdnsresponder.git] / Clients / ExplorerPlugin / ExplorerBar.h
1 /*
2 * Copyright (c) 2003-2004 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22
23 Change History (most recent first):
24
25 $Log: ExplorerBar.h,v $
26 Revision 1.2 2004/07/13 21:24:21 rpantos
27 Fix for <rdar://problem/3701120>.
28
29 Revision 1.1 2004/06/18 04:34:59 rpantos
30 Move to Clients from mDNSWindows
31
32 Revision 1.1 2004/01/30 03:01:56 bradley
33 Explorer Plugin to browse for DNS-SD advertised Web and FTP servers from within Internet Explorer.
34
35 */
36
37 #ifndef __EXPLORER_BAR__
38 #define __EXPLORER_BAR__
39
40 #include "StdAfx.h"
41
42 #include "ExplorerBarWindow.h"
43 #include "ExplorerPlugin.h"
44
45 //===========================================================================================================================
46 // ExplorerBar
47 //===========================================================================================================================
48
49 class ExplorerBar : public IDeskBand,
50 public IInputObject,
51 public IObjectWithSite,
52 public IPersistStream,
53 public IContextMenu
54 {
55 protected:
56
57 DWORD mRefCount;
58 IInputObjectSite * mSite;
59 IWebBrowser2 * mWebBrowser;
60 HWND mParentWindow;
61 BOOL mFocus;
62 DWORD mViewMode;
63 DWORD mBandID;
64 ExplorerBarWindow mWindow;
65
66 public:
67
68 ExplorerBar( void );
69 ~ExplorerBar( void );
70
71 // IUnknown methods
72
73 STDMETHODIMP QueryInterface( REFIID inID, LPVOID *outResult );
74 STDMETHODIMP_( DWORD ) AddRef( void );
75 STDMETHODIMP_( DWORD ) Release( void );
76
77 // IOleWindow methods
78
79 STDMETHOD( GetWindow )( HWND *outWindow );
80 STDMETHOD( ContextSensitiveHelp )( BOOL inEnterMode );
81
82 // IDockingWindow methods
83
84 STDMETHOD( ShowDW )( BOOL inShow );
85 STDMETHOD( CloseDW )( DWORD inReserved );
86 STDMETHOD( ResizeBorderDW )( LPCRECT inBorder, IUnknown *inPunkSite, BOOL inReserved );
87
88 // IDeskBand methods
89
90 STDMETHOD( GetBandInfo )( DWORD inBandID, DWORD inViewMode, DESKBANDINFO *outInfo );
91
92 // IInputObject methods
93
94 STDMETHOD( UIActivateIO )( BOOL inActivate, LPMSG inMsg );
95 STDMETHOD( HasFocusIO )( void );
96 STDMETHOD( TranslateAcceleratorIO )( LPMSG inMsg );
97
98 // IObjectWithSite methods
99
100 STDMETHOD( SetSite )( IUnknown *inPunkSite );
101 STDMETHOD( GetSite )( REFIID inID, LPVOID *outResult );
102
103 // IPersistStream methods
104
105 STDMETHOD( GetClassID )( LPCLSID outClassID );
106 STDMETHOD( IsDirty )( void );
107 STDMETHOD( Load )( LPSTREAM inStream );
108 STDMETHOD( Save )( LPSTREAM inStream, BOOL inClearDirty );
109 STDMETHOD( GetSizeMax )( ULARGE_INTEGER *outSizeMax );
110
111 // IContextMenu methods
112
113 STDMETHOD( QueryContextMenu )( HMENU hContextMenu, UINT iContextMenuFirstItem, UINT idCmdFirst, UINT idCmdLast, UINT uFlags );
114 STDMETHOD( GetCommandString )( UINT idCmd, UINT uType, UINT* pwReserved, LPSTR pszName, UINT cchMax );
115 STDMETHOD( InvokeCommand )( LPCMINVOKECOMMANDINFO lpici );
116
117 // Other
118
119 OSStatus SetupWindow( void );
120 OSStatus GoToURL( const CString &inURL );
121 };
122
123 #endif // __EXPLORER_BAR__