xref: /haiku/src/apps/cortex/InfoView/ConnectionInfoView.h (revision 19ae20e67e91fc09cc9fc5c0e60e21e24e7a53eb)
1*c284bb0fSMatt Madia /*
2*c284bb0fSMatt Madia  * Copyright (c) 1999-2000, Eric Moon.
3*c284bb0fSMatt Madia  * All rights reserved.
4*c284bb0fSMatt Madia  *
5*c284bb0fSMatt Madia  * Redistribution and use in source and binary forms, with or without
6*c284bb0fSMatt Madia  * modification, are permitted provided that the following conditions
7*c284bb0fSMatt Madia  * are met:
8*c284bb0fSMatt Madia  *
9*c284bb0fSMatt Madia  * 1. Redistributions of source code must retain the above copyright
10*c284bb0fSMatt Madia  *    notice, this list of conditions, and the following disclaimer.
11*c284bb0fSMatt Madia  *
12*c284bb0fSMatt Madia  * 2. Redistributions in binary form must reproduce the above copyright
13*c284bb0fSMatt Madia  *    notice, this list of conditions, and the following disclaimer in the
14*c284bb0fSMatt Madia  *    documentation and/or other materials provided with the distribution.
15*c284bb0fSMatt Madia  *
16*c284bb0fSMatt Madia  * 3. The name of the author may not be used to endorse or promote products
17*c284bb0fSMatt Madia  *    derived from this software without specific prior written permission.
18*c284bb0fSMatt Madia  *
19*c284bb0fSMatt Madia  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
20*c284bb0fSMatt Madia  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21*c284bb0fSMatt Madia  * OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22*c284bb0fSMatt Madia  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
23*c284bb0fSMatt Madia  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24*c284bb0fSMatt Madia  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25*c284bb0fSMatt Madia  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
26*c284bb0fSMatt Madia  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
27*c284bb0fSMatt Madia  * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28*c284bb0fSMatt Madia  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29*c284bb0fSMatt Madia  */
30*c284bb0fSMatt Madia 
31*c284bb0fSMatt Madia 
32a0795c6fSMarcus Overhagen // ConnectionInfoView.h (Cortex/InfoView)
33a0795c6fSMarcus Overhagen //
34a0795c6fSMarcus Overhagen // * PURPOSE
35a0795c6fSMarcus Overhagen //   Display connection-specific info in the InfoWindow.
36a0795c6fSMarcus Overhagen //   This is: source, destination and format.
37a0795c6fSMarcus Overhagen //
38a0795c6fSMarcus Overhagen // * HISTORY
39a0795c6fSMarcus Overhagen //   c.lenz		5nov99		Begun
40a0795c6fSMarcus Overhagen //
41a0795c6fSMarcus Overhagen 
42a0795c6fSMarcus Overhagen #ifndef __ConnectionInfoView_H__
43a0795c6fSMarcus Overhagen #define __ConnectionInfoView_H__
44a0795c6fSMarcus Overhagen 
45a0795c6fSMarcus Overhagen #include "InfoView.h"
46a0795c6fSMarcus Overhagen 
47a0795c6fSMarcus Overhagen #include <MediaDefs.h>
48a0795c6fSMarcus Overhagen 
49a0795c6fSMarcus Overhagen #include "cortex_defs.h"
50a0795c6fSMarcus Overhagen __BEGIN_CORTEX_NAMESPACE
51a0795c6fSMarcus Overhagen 
52a0795c6fSMarcus Overhagen // NodeManager
53a0795c6fSMarcus Overhagen class Connection;
54a0795c6fSMarcus Overhagen 
55a0795c6fSMarcus Overhagen class ConnectionInfoView : public InfoView
56a0795c6fSMarcus Overhagen {
57a0795c6fSMarcus Overhagen 
58a0795c6fSMarcus Overhagen public:					// *** ctor/dtor
59a0795c6fSMarcus Overhagen 
60a0795c6fSMarcus Overhagen 						ConnectionInfoView(
61a0795c6fSMarcus Overhagen 							const Connection &connection);
62a0795c6fSMarcus Overhagen 
63a0795c6fSMarcus Overhagen 	virtual				~ConnectionInfoView();
64a0795c6fSMarcus Overhagen 
65a0795c6fSMarcus Overhagen private:				// *** internal operations
66a0795c6fSMarcus Overhagen 
67a0795c6fSMarcus Overhagen 	// adds media_format related fields to the view
68a0795c6fSMarcus Overhagen 	// (wildcard-aware)
69a0795c6fSMarcus Overhagen 	void				_addFormatFields(
70a0795c6fSMarcus Overhagen 							const media_format &format);
71a0795c6fSMarcus Overhagen 
72a0795c6fSMarcus Overhagen public:					// *** BView impl
73a0795c6fSMarcus Overhagen 
74a0795c6fSMarcus Overhagen 	// notify InfoWindowManager
75a0795c6fSMarcus Overhagen 	virtual void		DetachedFromWindow();
76a0795c6fSMarcus Overhagen 
77a0795c6fSMarcus Overhagen private:				// *** data members
78a0795c6fSMarcus Overhagen 
79a0795c6fSMarcus Overhagen 	media_source		m_source;
80a0795c6fSMarcus Overhagen 
81a0795c6fSMarcus Overhagen 	media_destination	m_destination;
82a0795c6fSMarcus Overhagen };
83a0795c6fSMarcus Overhagen 
84a0795c6fSMarcus Overhagen __END_CORTEX_NAMESPACE
85a0795c6fSMarcus Overhagen #endif /* __ConnectionInfoView_H__ */
86