2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 * @author Grzegorz Krawczyk (g.krawczyk@samsung.com)
22 #ifndef WRT_PLUGINS_WRT_CAMERA_INTERFACE_H_
23 #define WRT_PLUGINS_WRT_CAMERA_INTERFACE_H_
27 #include <dpl/shared_ptr.h>
29 namespace WrtDeviceApis {
35 typedef int CameraPendingOperation;
36 typedef void (*SetPendingOperationCb)(CameraPendingOperation,
39 typedef void* CameraPreviewNode;
40 typedef void (*CameraCaptureSuccessCb)(const char* filename, void* data);
41 typedef void (*CameraPreviewSuccessCb)(CameraPreviewNode node, void* data);
42 typedef void (*CameraErrorCb)(int errorCode, void*);
45 virtual void createPreviewNode(CameraPreviewSuccessCb successCallback,
46 CameraErrorCb errorCallback,
47 SetPendingOperationCb setPendingOperationCb,
50 virtual void captureImage(const std::string& filename,
52 CameraCaptureSuccessCb successCallback,
53 CameraErrorCb errorCallback,
54 SetPendingOperationCb setPendingOperationCb,
57 virtual void startVideoCapture(const std::string& filename,
59 CameraCaptureSuccessCb successCallback,
60 CameraErrorCb errorCallback,
61 SetPendingOperationCb setPendingOperationCb,
64 virtual void stopVideoCapture() = 0;
66 virtual void cancelAsyncOperation(
67 const IWrtCamera::CameraPendingOperation& pendingOperation) = 0;
72 virtual ~IWrtCamera(){}
75 typedef DPL::SharedPtr<IWrtCamera> IWrtCameraPtr;
78 } // WrtDeviceApisCommon