]> git.saurik.com Git - apple/mdnsresponder.git/blob - mDNSWindows/DNSServiceBrowser/WindowsCE/Sources/BrowserDialog.h
mDNSResponder-108.4.tar.gz
[apple/mdnsresponder.git] / mDNSWindows / DNSServiceBrowser / WindowsCE / Sources / BrowserDialog.h
1 /*
2 * Copyright (c) 2002-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: BrowserDialog.h,v $
26 Revision 1.2 2004/07/13 21:24:27 rpantos
27 Fix for <rdar://problem/3701120>.
28
29 Revision 1.1 2004/06/18 04:04:37 rpantos
30 Move up one level
31
32 Revision 1.4 2004/01/30 02:56:33 bradley
33 Updated to support full Unicode display. Added support for all services on www.dns-sd.org.
34
35 Revision 1.3 2003/10/14 03:28:50 bradley
36 Insert services in sorted order to make them easier to find. Defer service adds/removes to the main
37 thread to avoid potential problems with multi-threaded MFC message map access. Added some asserts.
38
39 Revision 1.2 2003/10/10 03:43:34 bradley
40 Added support for launching a web browser to go to the browsed web site on a single-tap.
41
42 Revision 1.1 2003/08/21 02:16:10 bradley
43 DNSServiceBrowser for HTTP services for Windows CE/PocketPC.
44
45 */
46
47 #if !defined(AFX_BROWSERDIALOG_H__DECC5C82_C1C6_4630_B8D5_E1DDE570A061__INCLUDED_)
48 #define AFX_BROWSERDIALOG_H__DECC5C82_C1C6_4630_B8D5_E1DDE570A061__INCLUDED_
49
50 #if _MSC_VER >= 1000
51 #pragma once
52 #endif // _MSC_VER >= 1000
53
54 #include "afxtempl.h"
55 #include "Resource.h"
56
57 #include "DNSServices.h"
58
59 //===========================================================================================================================
60 // BrowserDialog
61 //===========================================================================================================================
62
63 class BrowserDialog : public CDialog
64 {
65 public:
66
67 BrowserDialog( CWnd *inParent = NULL );
68
69 //{{AFX_DATA(BrowserDialog)
70 enum { IDD = IDD_APPLICATION_DIALOG };
71 CListCtrl mBrowserList;
72 //}}AFX_DATA
73
74 // ClassWizard generated virtual function overrides
75 //{{AFX_VIRTUAL(BrowserDialog)
76 protected:
77 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
78 //}}AFX_VIRTUAL
79
80 static void
81 OnBrowserCallBack(
82 void * inContext,
83 DNSBrowserRef inRef,
84 DNSStatus inStatusCode,
85 const DNSBrowserEvent * inEvent );
86
87 protected:
88
89 struct BrowserEntry
90 {
91 CString name;
92 CString ip;
93 CString text;
94 };
95
96 HICON mIcon;
97 DNSBrowserRef mBrowser;
98 CArray < BrowserEntry, BrowserEntry > mBrowserEntries;
99
100 // Generated message map functions
101 //{{AFX_MSG(BrowserDialog)
102 virtual BOOL OnInitDialog();
103 afx_msg void OnBrowserListDoubleClick(NMHDR* pNMHDR, LRESULT* pResult);
104 afx_msg LONG OnServiceAdd( WPARAM inWParam, LPARAM inLParam );
105 afx_msg LONG OnServiceRemove( WPARAM inWParam, LPARAM inLParam );
106 //}}AFX_MSG
107 DECLARE_MESSAGE_MAP()
108 };
109
110 //{{AFX_INSERT_LOCATION}}
111 // Microsoft eMbedded Visual C++ will insert additional declarations immediately before the previous line.
112
113 #endif // !defined(AFX_BROWSERDIALOG_H__DECC5C82_C1C6_4630_B8D5_E1DDE570A061__INCLUDED_)