1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef DOM_CAMERA_DOMCAMERACAPABILITIES_H
6 #define DOM_CAMERA_DOMCAMERACAPABILITIES_H
8 #include "ICameraControl.h"
10 #include "CameraCommon.h"
14 typedef nsresult (*ParseItemAndAddFunc
)(JSContext
* aCx
, JS::Handle
<JSObject
*> aArray
,
15 uint32_t aIndex
, const char* aStart
, char** aEnd
);
17 class DOMCameraCapabilities MOZ_FINAL
: public nsICameraCapabilities
21 NS_DECL_NSICAMERACAPABILITIES
23 DOMCameraCapabilities(ICameraControl
* aCamera
)
26 DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__
, __LINE__
, this);
29 nsresult
ParameterListToNewArray(
31 JS::MutableHandle
<JSObject
*> aArray
,
33 ParseItemAndAddFunc aParseItemAndAdd
35 nsresult
StringListToNewObject(JSContext
* aCx
, JS::Value
* aArray
, uint32_t aKey
);
36 nsresult
DimensionListToNewObject(JSContext
* aCx
, JS::Value
* aArray
, uint32_t aKey
);
39 DOMCameraCapabilities(const DOMCameraCapabilities
&) MOZ_DELETE
;
40 DOMCameraCapabilities
& operator=(const DOMCameraCapabilities
&) MOZ_DELETE
;
43 /* additional members */
44 ~DOMCameraCapabilities()
47 DOM_CAMERA_LOGT("%s:%d : this=%p, mCamera=%p\n", __func__
, __LINE__
, this, mCamera
.get());
50 nsRefPtr
<ICameraControl
> mCamera
;
53 } // namespace mozilla
55 #endif // DOM_CAMERA_DOMCAMERACAPABILITIES_H