logsui/logsapp/tsrc/ut_logsapp/logsengine_stub/logscall.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 14 May 2010 15:52:41 +0300
changeset 2 7119b73b84d6
parent 0 4a5361db8937
child 9 68f3171a5819
permissions -rw-r--r--
Revision: 201017 Kit: 201019

/*
* 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 <xqservicerequest.h>
#include <hbaction.h>
#include <hblineedit.h>
#include <hblabel.h>
#include <QVariant>
#include <QObject>
#include "logsevent.h"
//#include "logseventdata.h"
#include <logsexport.h>
#include <QList>
/**
 * LogsCall can be used to  make a call
 * from logs model.
 */
class LogsCall
{
  
public:
    
    enum CallType {
        TypeLogsCallNotAvailable = 0,
        TypeLogsVoiceCall,
 	   	TypeLogsVideoCall,
 	    TypeLogsVoIPCall
 	};
    
public: 
 		
    explicit LogsCall(LogsEvent& aEvent);
    explicit LogsCall(); // Stub constructor
    
    ~LogsCall();
 		
    QList<LogsCall::CallType> allowedCallTypes();
    
    LogsCall::CallType defaultCallType();
    
    static void callToNumber(LogsCall::CallType callType, const QString& number,
    	unsigned int serviceId=0);
    
    bool isAllowedCallType();
    
public slots:

    void call(LogsCall::CallType aCallType);
    void initiateCallback();
        
private: //data 
    QString mNumber;
    CallType mDefaultCall;
    LogsEvent::LogsEventType mEventType;
    
public: // test data & methods
    int mTestLastCallType;
    
    static bool isCallToNumberCalled();
    static QString lastCalledFunction();
    static void resetTestData();
    
};
                  
#endif // LOGSCALL_H