xref: /haiku/src/apps/patchbay/EndpointInfo.h (revision e81a954787e50e56a7f06f72705b7859b6ab06d1)
1 /* EndpointInfo.h
2  * --------------
3  * A simple structure that describes a MIDI object.
4  * Currently, it only contains icon data associated with the object.
5  *
6  * Copyright 2013, Haiku, Inc. All rights reserved.
7  * Distributed under the terms of the MIT License.
8  *
9  * Revisions by Pete Goodeve
10  *
11  * Copyright 1999, Be Incorporated.   All Rights Reserved.
12  * This file may be used under the terms of the Be Sample Code License.
13  */
14 #ifndef ENDPOINTINFO_H
15 #define ENDPOINTINFO_H
16 
17 #include <Mime.h> /* for icon_size */
18 #include <GraphicsDefs.h> /* for color_space */
19 
20 class BMidiEndpoint;
21 
22 extern const uint8 LARGE_ICON_SIZE;
23 extern const uint8 MINI_ICON_SIZE;
24 extern const icon_size DISPLAY_ICON_SIZE;
25 extern const color_space ICON_COLOR_SPACE;
26 
27 class EndpointInfo
28 {
29 public:
30 	EndpointInfo();
31 	EndpointInfo(int32 id);
32 	EndpointInfo(const EndpointInfo& info);
33 	EndpointInfo& operator=(const EndpointInfo& info);
34 	~EndpointInfo();
35 
36 	int32 ID() const
37 	{
38 		return fId;
39 	}
40 	const BBitmap* Icon() const
41 	{
42 		return fIcon;
43 	}
44 	void UpdateProperties(const BMessage* props);
45 
46 private:
47 	int32 fId;
48 	BBitmap* fIcon;
49 };
50 
51 #endif /* ENDPOINTINFO_H */
52