• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
18 #if !defined(AFX_BROWSERDIALOG_H__DECC5C82_C1C6_4630_B8D5_E1DDE570A061__INCLUDED_)
19 #define AFX_BROWSERDIALOG_H__DECC5C82_C1C6_4630_B8D5_E1DDE570A061__INCLUDED_
20 
21 #if _MSC_VER >= 1000
22 #pragma once
23 #endif // _MSC_VER >= 1000
24 
25 #include	"afxtempl.h"
26 #include	"Resource.h"
27 
28 #include	"DNSServices.h"
29 
30 //===========================================================================================================================
31 //	BrowserDialog
32 //===========================================================================================================================
33 
34 class	BrowserDialog : public CDialog
35 {
36 	public:
37 
38 		BrowserDialog( CWnd *inParent = NULL );
39 
40 		//{{AFX_DATA(BrowserDialog)
41 		enum { IDD = IDD_APPLICATION_DIALOG };
42 		CListCtrl	mBrowserList;
43 		//}}AFX_DATA
44 
45 		// ClassWizard generated virtual function overrides
46 		//{{AFX_VIRTUAL(BrowserDialog)
47 		protected:
48 		virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
49 		//}}AFX_VIRTUAL
50 
51 		static void
52 			OnBrowserCallBack(
53 				void *					inContext,
54 				DNSBrowserRef			inRef,
55 				DNSStatus				inStatusCode,
56 				const DNSBrowserEvent *	inEvent );
57 
58 	protected:
59 
60 		struct	BrowserEntry
61 		{
62 			CString		name;
63 			CString		ip;
64 			CString		text;
65 		};
66 
67 		HICON										mIcon;
68 		DNSBrowserRef								mBrowser;
69 		CArray < BrowserEntry, BrowserEntry >		mBrowserEntries;
70 
71 		// Generated message map functions
72 		//{{AFX_MSG(BrowserDialog)
73 		virtual BOOL OnInitDialog();
74 		afx_msg void OnBrowserListDoubleClick(NMHDR* pNMHDR, LRESULT* pResult);
75 		afx_msg LONG OnServiceAdd( WPARAM inWParam, LPARAM inLParam );
76 		afx_msg LONG OnServiceRemove( WPARAM inWParam, LPARAM inLParam );
77 		//}}AFX_MSG
78 		DECLARE_MESSAGE_MAP()
79 };
80 
81 //{{AFX_INSERT_LOCATION}}
82 // Microsoft eMbedded Visual C++ will insert additional declarations immediately before the previous line.
83 
84 #endif // !defined(AFX_BROWSERDIALOG_H__DECC5C82_C1C6_4630_B8D5_E1DDE570A061__INCLUDED_)
85