2 * Copyright (c) 2002-2003 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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
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.
21 * @APPLE_LICENSE_HEADER_END@
23 Change History (most recent first):
25 $Log: ChooserDialog.h,v $
26 Revision 1.1 2003/08/21 02:06:47 bradley
27 Moved Rendezvous Browser for non-Windows CE into Windows sub-folder.
29 Revision 1.4 2003/08/12 19:56:28 cheshire
32 Revision 1.3 2003/07/02 21:20:06 cheshire
33 <rdar://problem/3313413> Update copyright notices, etc., in source code comments
35 Revision 1.2 2002/09/21 20:44:55 zarzycki
38 Revision 1.1 2002/09/20 06:12:52 bradley
39 Rendezvous Browser for Windows
43 #if !defined(AFX_CHOOSERDIALOG_H__AC258704_B307_4901_9F98_A0AC022FD8AC__INCLUDED_)
44 #define AFX_CHOOSERDIALOG_H__AC258704_B307_4901_9F98_A0AC022FD8AC__INCLUDED_
48 #endif // _MSC_VER > 1000
57 #include "DNSServices.h"
59 //===========================================================================================================================
61 //===========================================================================================================================
63 struct ServiceInstanceInfo
73 struct ServiceTypeInfo
75 std::string serviceType
;
76 std::string description
;
77 std::string urlScheme
;
80 //===========================================================================================================================
82 //===========================================================================================================================
84 class ChooserDialog
: public CDialog
88 ChooserDialog(CWnd
* pParent
= NULL
);
89 virtual ~ChooserDialog( void );
91 //{{AFX_DATA(ChooserDialog)
92 enum { IDD
= IDD_CHOOSER_DIALOG
};
93 CListCtrl mServiceList
;
94 CListCtrl mDomainList
;
95 CListCtrl mChooserList
;
98 // ClassWizard generated virtual function overrides
99 //{{AFX_VIRTUAL(ChooserDialog)
101 virtual BOOL
PreTranslateMessage(MSG
* pMsg
);
103 virtual void DoDataExchange(CDataExchange
* pDX
); // DDX/DDV support
104 virtual void PostNcDestroy();
109 typedef std::vector
< ServiceInstanceInfo
> ServiceInstanceVector
;
110 typedef std::vector
< ServiceTypeInfo
> ServiceTypeVector
;
112 HACCEL mMenuAcceleratorTable
;
113 DNSBrowserRef mBrowser
;
114 BOOL mIsServiceBrowsing
;
115 ServiceInstanceVector mServiceInstances
;
116 ServiceTypeVector mServiceTypes
;
120 void PopulateServicesList( void );
121 void UpdateInfoDisplay( void );
123 void StartBrowsing( const char *inType
, const char *inDomain
);
124 void StopBrowsing( void );
128 //{{AFX_MSG(ChooserDialog)
129 virtual BOOL
OnInitDialog();
130 afx_msg
void OnSysCommand(UINT nID
, LPARAM lParam
);
131 afx_msg
void OnDomainListChanged(NMHDR
* pNMHDR
, LRESULT
* pResult
);
132 afx_msg
void OnServiceListChanged(NMHDR
* pNMHDR
, LRESULT
* pResult
);
133 afx_msg
void OnChooserListChanged(NMHDR
* pNMHDR
, LRESULT
* pResult
);
134 afx_msg
void OnChooserListDoubleClick(NMHDR
* pNMHDR
, LRESULT
* pResult
);
135 afx_msg
void OnAbout();
136 afx_msg
void OnInitMenuPopup(CMenu
* pPopupMenu
, UINT nIndex
, BOOL bSysMenu
);
137 afx_msg
void OnActivate(UINT nState
, CWnd
* pWndOther
, BOOL bMinimized
);
138 afx_msg
void OnFileClose();
139 virtual void OnCancel();
140 afx_msg
void OnExit();
141 afx_msg
void OnClose();
142 afx_msg
void OnNcDestroy();
144 afx_msg LONG
OnDomainAdd( WPARAM inWParam
, LPARAM inLParam
);
145 afx_msg LONG
OnDomainRemove( WPARAM inWParam
, LPARAM inLParam
);
146 afx_msg LONG
OnServiceAdd( WPARAM inWParam
, LPARAM inLParam
);
147 afx_msg LONG
OnServiceRemove( WPARAM inWParam
, LPARAM inLParam
);
148 afx_msg LONG
OnResolve( WPARAM inWParam
, LPARAM inLParam
);
149 DECLARE_MESSAGE_MAP()
152 //{{AFX_INSERT_LOCATION}}
153 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
155 #endif // !defined(AFX_CHOOSERDIALOG_H__AC258704_B307_4901_9F98_A0AC022FD8AC__INCLUDED_)