1 #ifndef _CAM_ROSTER_H 2 #define _CAM_ROSTER_H 3 4 #include <image.h> 5 #include <List.h> 6 #include <Locker.h> 7 8 #include "CamDevice.h" 9 10 class WebCamMediaAddOn; 11 class CamDeviceAddon; 12 13 class CamRoster : public BUSBRoster 14 { 15 public: 16 CamRoster(WebCamMediaAddOn* _addon); 17 virtual ~CamRoster(); 18 virtual status_t DeviceAdded(BUSBDevice* _device); 19 virtual void DeviceRemoved(BUSBDevice* _device); 20 21 uint32 CountCameras(); 22 bool Lock(); 23 void Unlock(); 24 // those must be called with Lock() 25 CamDevice* CameraAt(int32 index); 26 27 28 29 private: 30 status_t LoadInternalAddons(); 31 status_t LoadExternalAddons(); 32 33 BLocker fLocker; 34 WebCamMediaAddOn* fAddon; 35 BList fCamerasAddons; 36 BList fCameras; 37 }; 38 39 #endif 40