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 "nsCycleCollectionParticipant.h"
9 #include "ICameraControl.h"
10 #include "nsAutoPtr.h"
11 #include "CameraCommon.h"
15 typedef nsresult (*ParseItemAndAddFunc
)(JSContext
* aCx
, JSObject
* aArray
, uint32_t aIndex
, const char* aStart
, char** aEnd
);
17 class DOMCameraCapabilities MOZ_FINAL
: public nsICameraCapabilities
20 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
21 NS_DECL_CYCLE_COLLECTION_CLASS(DOMCameraCapabilities
)
22 NS_DECL_NSICAMERACAPABILITIES
24 DOMCameraCapabilities(ICameraControl
* aCamera
)
27 DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__
, __LINE__
, this);
30 nsresult
ParameterListToNewArray(
34 ParseItemAndAddFunc aParseItemAndAdd
36 nsresult
StringListToNewObject(JSContext
* aCx
, JS::Value
* aArray
, uint32_t aKey
);
37 nsresult
DimensionListToNewObject(JSContext
* aCx
, JS::Value
* aArray
, uint32_t aKey
);
40 DOMCameraCapabilities(const DOMCameraCapabilities
&) MOZ_DELETE
;
41 DOMCameraCapabilities
& operator=(const DOMCameraCapabilities
&) MOZ_DELETE
;
44 /* additional members */
45 ~DOMCameraCapabilities()
48 DOM_CAMERA_LOGT("%s:%d : this=%p, mCamera=%p\n", __func__
, __LINE__
, this, mCamera
.get());
51 nsRefPtr
<ICameraControl
> mCamera
;
54 } // namespace mozilla
56 #endif // DOM_CAMERA_DOMCAMERACAPABILITIES_H