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