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