]> git.saurik.com Git - apple/mdnsresponder.git/blob - Clients/ExplorerPlugin/ExplorerBar.h
988f8c3977d400612949a9966baf030cfea28a33
[apple/mdnsresponder.git] / Clients / ExplorerPlugin / ExplorerBar.h
1 /* -*- Mode: C; tab-width: 4 -*-
2 *
3 * Copyright (c) 2003-2004 Apple Computer, Inc. All rights reserved.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16
17 Change History (most recent first):
18
19 $Log: ExplorerBar.h,v $
20 Revision 1.4 2009/03/30 18:46:13 herscher
21 <rdar://problem/5925472> Current Bonjour code does not compile on Windows
22 <rdar://problem/5187308> Move build train to Visual Studio 2005
23
24 Revision 1.3 2006/08/14 23:24:00 cheshire
25 Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0
26
27 Revision 1.2 2004/07/13 21:24:21 rpantos
28 Fix for <rdar://problem/3701120>.
29
30 Revision 1.1 2004/06/18 04:34:59 rpantos
31 Move to Clients from mDNSWindows
32
33 Revision 1.1 2004/01/30 03:01:56 bradley
34 Explorer Plugin to browse for DNS-SD advertised Web and FTP servers from within Internet Explorer.
35
36 */
37
38 #ifndef __EXPLORER_BAR__
39 #define __EXPLORER_BAR__
40
41 #include "StdAfx.h"
42
43 #include "ExplorerBarWindow.h"
44 #include "ExplorerPlugin.h"
45
46 //===========================================================================================================================
47 // ExplorerBar
48 //===========================================================================================================================
49
50 class ExplorerBar : public IDeskBand,
51 public IInputObject,
52 public IObjectWithSite,
53 public IPersistStream,
54 public IContextMenu
55 {
56 protected:
57
58 DWORD mRefCount;
59 IInputObjectSite * mSite;
60 IWebBrowser2 * mWebBrowser;
61 HWND mParentWindow;
62 BOOL mFocus;
63 DWORD mViewMode;
64 DWORD mBandID;
65 ExplorerBarWindow mWindow;
66
67 public:
68
69 ExplorerBar( void );
70 ~ExplorerBar( void );
71
72 // IUnknown methods
73
74 STDMETHODIMP QueryInterface( REFIID inID, LPVOID *outResult );
75 STDMETHODIMP_( DWORD ) AddRef( void );
76 STDMETHODIMP_( DWORD ) Release( void );
77
78 // IOleWindow methods
79
80 STDMETHOD( GetWindow )( HWND *outWindow );
81 STDMETHOD( ContextSensitiveHelp )( BOOL inEnterMode );
82
83 // IDockingWindow methods
84
85 STDMETHOD( ShowDW )( BOOL inShow );
86 STDMETHOD( CloseDW )( DWORD inReserved );
87 STDMETHOD( ResizeBorderDW )( LPCRECT inBorder, IUnknown *inPunkSite, BOOL inReserved );
88
89 // IDeskBand methods
90
91 STDMETHOD( GetBandInfo )( DWORD inBandID, DWORD inViewMode, DESKBANDINFO *outInfo );
92
93 // IInputObject methods
94
95 STDMETHOD( UIActivateIO )( BOOL inActivate, LPMSG inMsg );
96 STDMETHOD( HasFocusIO )( void );
97 STDMETHOD( TranslateAcceleratorIO )( LPMSG inMsg );
98
99 // IObjectWithSite methods
100
101 STDMETHOD( SetSite )( IUnknown *inPunkSite );
102 STDMETHOD( GetSite )( REFIID inID, LPVOID *outResult );
103
104 // IPersistStream methods
105
106 STDMETHOD( GetClassID )( LPCLSID outClassID );
107 STDMETHOD( IsDirty )( void );
108 STDMETHOD( Load )( LPSTREAM inStream );
109 STDMETHOD( Save )( LPSTREAM inStream, BOOL inClearDirty );
110 STDMETHOD( GetSizeMax )( ULARGE_INTEGER *outSizeMax );
111
112 // IContextMenu methods
113
114 STDMETHOD( QueryContextMenu )( HMENU hContextMenu, UINT iContextMenuFirstItem, UINT idCmdFirst, UINT idCmdLast, UINT uFlags );
115 STDMETHOD( GetCommandString )( UINT_PTR idCmd, UINT uType, UINT* pwReserved, LPSTR pszName, UINT cchMax );
116 STDMETHOD( InvokeCommand )( LPCMINVOKECOMMANDINFO lpici );
117
118 // Other
119
120 OSStatus SetupWindow( void );
121 OSStatus GoToURL( const CString &inURL );
122 };
123
124 #endif // __EXPLORER_BAR__