2 * Copyright (c) 2002-2004 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
23 * @APPLE_LICENSE_HEADER_END@
25 Change History (most recent first):
27 $Log: ChooserDialog.h,v $
28 Revision 1.3 2004/01/30 02:56:32 bradley
29 Updated to support full Unicode display. Added support for all services on www.dns-sd.org.
31 Revision 1.2 2003/10/31 12:18:30 bradley
32 Added display of the resolved host name. Show separate TXT record entries on separate lines.
34 Revision 1.1 2003/08/21 02:06:47 bradley
35 Moved Rendezvous Browser for non-Windows CE into Windows sub-folder.
37 Revision 1.4 2003/08/12 19:56:28 cheshire
40 Revision 1.3 2003/07/02 21:20:06 cheshire
41 <rdar://problem/3313413> Update copyright notices, etc., in source code comments
43 Revision 1.2 2002/09/21 20:44:55 zarzycki
46 Revision 1.1 2002/09/20 06:12:52 bradley
47 Rendezvous Browser for Windows
51 #if !defined(AFX_CHOOSERDIALOG_H__AC258704_B307_4901_9F98_A0AC022FD8AC__INCLUDED_)
52 #define AFX_CHOOSERDIALOG_H__AC258704_B307_4901_9F98_A0AC022FD8AC__INCLUDED_
56 #endif // _MSC_VER > 1000
65 #include "DNSServices.h"
67 //===========================================================================================================================
69 //===========================================================================================================================
71 struct ServiceInstanceInfo
82 struct ServiceTypeInfo
84 std::string serviceType
;
85 std::string description
;
86 std::string urlScheme
;
89 //===========================================================================================================================
91 //===========================================================================================================================
93 class ChooserDialog
: public CDialog
97 ChooserDialog(CWnd
* pParent
= NULL
);
98 virtual ~ChooserDialog( void );
100 //{{AFX_DATA(ChooserDialog)
101 enum { IDD
= IDD_CHOOSER_DIALOG
};
102 CListCtrl mServiceList
;
103 CListCtrl mDomainList
;
104 CListCtrl mChooserList
;
107 // ClassWizard generated virtual function overrides
108 //{{AFX_VIRTUAL(ChooserDialog)
110 virtual BOOL
PreTranslateMessage(MSG
* pMsg
);
112 virtual void DoDataExchange(CDataExchange
* pDX
); // DDX/DDV support
113 virtual void PostNcDestroy();
118 typedef std::vector
< ServiceInstanceInfo
> ServiceInstanceVector
;
119 typedef std::vector
< ServiceTypeInfo
> ServiceTypeVector
;
121 HACCEL mMenuAcceleratorTable
;
122 DNSBrowserRef mBrowser
;
123 BOOL mIsServiceBrowsing
;
124 ServiceInstanceVector mServiceInstances
;
125 ServiceTypeVector mServiceTypes
;
129 void PopulateServicesList( void );
130 void UpdateInfoDisplay( void );
132 void StartBrowsing( const char *inType
, const char *inDomain
);
133 void StopBrowsing( void );
137 //{{AFX_MSG(ChooserDialog)
138 virtual BOOL
OnInitDialog();
139 afx_msg
void OnSysCommand(UINT nID
, LPARAM lParam
);
140 afx_msg
void OnDomainListChanged(NMHDR
* pNMHDR
, LRESULT
* pResult
);
141 afx_msg
void OnServiceListChanged(NMHDR
* pNMHDR
, LRESULT
* pResult
);
142 afx_msg
void OnChooserListChanged(NMHDR
* pNMHDR
, LRESULT
* pResult
);
143 afx_msg
void OnChooserListDoubleClick(NMHDR
* pNMHDR
, LRESULT
* pResult
);
144 afx_msg
void OnAbout();
145 afx_msg
void OnInitMenuPopup(CMenu
* pPopupMenu
, UINT nIndex
, BOOL bSysMenu
);
146 afx_msg
void OnActivate(UINT nState
, CWnd
* pWndOther
, BOOL bMinimized
);
147 afx_msg
void OnFileClose();
148 virtual void OnCancel();
149 afx_msg
void OnExit();
150 afx_msg
void OnClose();
151 afx_msg
void OnNcDestroy();
153 afx_msg LONG
OnDomainAdd( WPARAM inWParam
, LPARAM inLParam
);
154 afx_msg LONG
OnDomainRemove( WPARAM inWParam
, LPARAM inLParam
);
155 afx_msg LONG
OnServiceAdd( WPARAM inWParam
, LPARAM inLParam
);
156 afx_msg LONG
OnServiceRemove( WPARAM inWParam
, LPARAM inLParam
);
157 afx_msg LONG
OnResolve( WPARAM inWParam
, LPARAM inLParam
);
158 DECLARE_MESSAGE_MAP()
161 //{{AFX_INSERT_LOCATION}}
162 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
164 #endif // !defined(AFX_CHOOSERDIALOG_H__AC258704_B307_4901_9F98_A0AC022FD8AC__INCLUDED_)