phoneengine/phonecntfinder2/tsrc/mocks/qcontactdetail.h
author William Roberts <williamr@symbian.org>
Fri, 11 Jun 2010 16:24:06 +0100
branchGCC_SURGE
changeset 38 35db4fa135f4
parent 21 92ab7f8d0eab
permissions -rw-r--r--
Branch for GCC_SURGE fixes

/*
* 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 QCONTACTDETAIL_H
#define QCONTACTDETAIL_H

#include "qtcontactsglobal.h"

#include <QString>


class QContactDetail
{
public:
    QContactDetail();
	QContactDetail(const QString& definitionName);
    virtual ~QContactDetail();
	QContactDetail(const QContactDetail& other);
	QContactDetail& operator=(const QContactDetail& other);
    QString value(const QString& key) const;
	QString definitionName() const;
public: //for testing 
	void setValue(const QString& value);
	


private:
    QString mValue;
	QString mDefinition;

};



#define Q_DECLARE_CUSTOM_CONTACT_DETAIL(className, definitionNameString) \
    className() : QContactDetail(DefinitionName) {}\
    Q_DECLARE_LATIN1_LITERAL(DefinitionName, definitionNameString);

#define Q_IMPLEMENT_CUSTOM_CONTACT_DETAIL(className, definitionNameString) \
    Q_DEFINE_LATIN1_LITERAL(className::DefinitionName, definitionNameString)
	
#endif //qcontactdetail