xref: /haiku/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVAddOn.h (revision b55a57da7173b9af0432bd3e148d03f06161d036)
1 /*
2  * FireWire DV media addon for Haiku
3  *
4  * Copyright (c) 2008, JiSheng Zhang (jszhang3@mail.ustc.edu.cn)
5  * Distributed under the terms of the MIT License.
6  *
7  * Based on DVB media addon
8  * Copyright (c) 2004-2007 Marcus Overhagen <marcus@overhagen.de>
9  */
10 
11 #ifndef _FIREWIRE_DV_ADDON_H_
12 #define _FIREWIRE_DV_ADDON_H_
13 
14 #include <MediaAddOn.h>
15 #include <ObjectList.h>
16 
17 class FireWireCard;
18 struct device_info;
19 
20 class FireWireDVAddOn : public BMediaAddOn
21 {
22 public:
23 			FireWireDVAddOn(image_id id);
24 			~FireWireDVAddOn();
25 
26 	status_t	InitCheck(const char** out_failure_text);
27 
28 	int32		CountFlavors();
29 
30 	status_t	GetFlavorAt(int32 n, const flavor_info** out_info);
31 
32 	BMediaNode*	InstantiateNodeFor(const flavor_info* info,
33 				BMessage* config, status_t* out_error);
34 
35 	bool		WantsAutoStart();
36 	status_t	AutoStart(int index, BMediaNode** outNode,
37 				int32* outInternalID, bool* outHasMore);
38 
39 protected:
40 	void		ScanFolder(const char* path);
41 	void		AddDevice(FireWireCard* card, const char* path);
42 	void		FreeDeviceList();
43 
44 protected:
45 	BObjectList<device_info>	fDeviceList;
46 };
47 
48 #endif
49