xref: /haiku/src/add-ons/media/media-add-ons/usb_webcam/addons/quickcam/QuickCamDevice.cpp (revision 302f62604763c95777d6d04cca456e876f471c4f)
1 #include "QuickCamDevice.h"
2 
3 #include <usb/USBDevice.h>
4 
5 const usb_named_support_descriptor kSupportedDevices[] = {
6 {{ 0, 0, 0, 0x046d, 0x0840 }, "Logitech", "QuickCam Express"},
7 {{ 0, 0, 0, 0x046d, 0x0850 }, "Logitech", "QuickCam Express LEGO"},
8 {{ 0, 0, 0, 0x046d, 0xd001 }, "Logitech", "QuickCam Express"}, // Alan's
9 {{ 0, 0, 0, 0, 0}, NULL, NULL }
10 };
11 
12 
13 // -----------------------------------------------------------------------------
14 QuickCamDevice::QuickCamDevice(CamDeviceAddon &_addon, BUSBDevice* _device)
15           :CamDevice(_addon, _device)
16 {
17 	fInitStatus = B_OK;
18 }
19 
20 // -----------------------------------------------------------------------------
21 QuickCamDevice::~QuickCamDevice()
22 {
23 
24 }
25 
26 // -----------------------------------------------------------------------------
27 QuickCamDeviceAddon::QuickCamDeviceAddon(WebCamMediaAddOn* webcam)
28 	: CamDeviceAddon(webcam)
29 {
30 	SetSupportedDevices(kSupportedDevices);
31 }
32 
33 // -----------------------------------------------------------------------------
34 QuickCamDeviceAddon::~QuickCamDeviceAddon()
35 {
36 }
37 
38 // -----------------------------------------------------------------------------
39 const char *
40 QuickCamDeviceAddon::BrandName()
41 {
42 	return "QuickCam";
43 }
44 
45 // -----------------------------------------------------------------------------
46 QuickCamDevice *
47 QuickCamDeviceAddon::Instantiate(CamRoster &roster, BUSBDevice *from)
48 {
49 	return new QuickCamDevice(*this, from);
50 }
51 
52 extern "C" status_t
53 B_WEBCAM_MKINTFUNC(quickcam)
54 (WebCamMediaAddOn* webcam, CamDeviceAddon **addon)
55 {
56 	*addon = new QuickCamDeviceAddon(webcam);
57 	return B_OK;
58 }
59