diff -r 1a2a00e78665 -r 7feec50967db homescreensrv_plat/contentstorage_api/caentry.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreensrv_plat/contentstorage_api/caentry.h Tue Mar 23 23:17:02 2010 +0200 @@ -0,0 +1,95 @@ +/* + * 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: caentry.h + * + */ + +#ifndef CAENTRY_H +#define CAENTRY_H + +#include +#include +#include + +#include "caclient_global.h" +#include "cadefs.h" +#include "caicondescription.h" + +CA_CLIENT_TEST_CLASS( TestCaClient ) + +class CaObjectAdapter; + +class CaEntryPrivate; + +class CACLIENT_EXPORT CaEntry +{ + /*! + * This class is not intended to be derived. + */ + +public: + + explicit CaEntry(EntryRole entryRole = ItemEntryRole); + + virtual ~CaEntry(); + + int id() const; + + QString text() const; + void setText(const QString &text); + + QString description() const; + void setDescription(const QString &text); + + CaIconDescription iconDescription() const; + void setIconDescription(const CaIconDescription &iconDescription); + + EntryFlags flags() const; + void setFlags(EntryFlags flags); + + QString entryTypeName() const; + void setEntryTypeName(const QString &entryTypeName); + + QMap attributes() const; + + QString attribute(const QString &name) const; + void setAttribute(const QString &name, const QString &value); + + QPixmap makeIcon(const QSize &size = QSize(70, 70)) const; + + EntryRole role() const; + + CaEntry(const CaEntry &entry); + CaEntry &operator=(const CaEntry &entry); + +private: + + void setId(int id); + +private: + /*! + * A special kind of pointer, supporting sharing data, to a private + * implementation. + */ + QSharedDataPointer m_d; + + friend class CaEntryPrivate; + friend class ::CaObjectAdapter; + + CA_CLIENT_TEST_FRIEND_CLASS( TestCaClient ) + +}; + + +#endif // CAENTRY_H