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