diff -r 000000000000 -r 4a5361db8937 logsui/logsengine/inc/logscall.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/logsui/logsengine/inc/logscall.h Tue May 04 12:39:37 2010 +0300 @@ -0,0 +1,83 @@ +/* +* 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 LOGSCALL_H +#define LOGSCALL_H + +#include +#include +#include + +#include "logsevent.h" + + +/** + * LogsCall can be used to make a call + * from logs model. + */ +class LogsCall : public QObject +{ + Q_OBJECT + +public: + + enum CallType { + TypeLogsCallNotAvailable = 0, + TypeLogsVoiceCall, + TypeLogsVideoCall, + TypeLogsVoIPCall + }; + +public: + + explicit LogsCall(LogsEvent& aEvent); + explicit LogsCall(unsigned int contactId, const QString& number); + + LOGSENGINE_EXPORT ~LogsCall(); + + LOGSENGINE_EXPORT QList allowedCallTypes(); + + LOGSENGINE_EXPORT LogsCall::CallType defaultCallType(); + + LOGSENGINE_EXPORT static void callToNumber(LogsCall::CallType callType, const QString& number, + unsigned int serviceId = 0); + + bool isAllowedCallType(); + +public slots: + + LOGSENGINE_EXPORT void call(LogsCall::CallType callType); + LOGSENGINE_EXPORT void initiateCallback(); + +private: + + static void createcall(QString service, QString type, QString num, bool sync); + static void createCallWithService(QString service, QString type, QString num, + bool sync, unsigned int serviceId ); + +private: //data + + QList mCalls; + CallType mDefaultCall; + QString mNumber; + unsigned int mServiceId; + +private: + friend class UT_LogsCall; + +}; + +#endif // LOGSCALL_H