diff -r 8b2d6d0384b0 -r d9aefe59d544 camerauis/cameraxui/cxui/inc/cxuiserviceprovider.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/camerauis/cameraxui/cxui/inc/cxuiserviceprovider.h Fri Apr 16 14:51:30 2010 +0300 @@ -0,0 +1,81 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +#ifndef CXUISERVICEPROVIDER_H_ +#define CXUISERVICEPROVIDER_H_ + + +#include +#include "cxeerror.h" +#include "cxenamespace.h" + + +class CxeEngine; + +class CxuiServiceProvider : public XQServiceProvider +{ + +Q_OBJECT + +public: + + static void create(CxeEngine* engine); + static CxuiServiceProvider* instance(); + static void destroy(); + static bool isCameraEmbedded(); + + Cxe::CameraMode requestedMode(); + + bool allowModeSwitching(); + bool allowQualityChange(); + bool allowCameraSwitching(); + +public slots: + + /* + * Mode: image = 0, video = 1 + * Parameters: + * + * camera_index: int: primary = 0, secondary = 1 + * quality: int: 0 = default, 1 = lowest, 2 = highest + * allow_mode_switch: bool + * allow_camera_switch: bool + * allow_quality_change: bool + */ + void capture(int mode, const QVariantMap ¶meters); + + void sendFilenameToClientAndExit(QString filename = ""); + +private: + + CxuiServiceProvider(CxeEngine *engine); + ~CxuiServiceProvider(); + + bool readParameters(const QVariantMap& parameters); + + static CxuiServiceProvider *mInstance; + int mRequestIndex; + CxeEngine *mEngine; + Cxe::CameraMode mRequestedMode; + int mCameraIndex; + int mQuality; + bool mAllowModeSwitching; + bool mAllowQualityChange; + bool mAllowCameraSwitching; + +}; + +#endif /* CXUISERVICEPROVIDER_H_ */