applayerpluginsandutils/bookmarksupport/src/bkmrkattachment.h
changeset 0 b16258d2340f
equal deleted inserted replaced
-1:000000000000 0:b16258d2340f
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Classes for manipulating bookmarks and bookmark folders.
       
    15 // @internalComponent
       
    16 // 
       
    17 //
       
    18 
       
    19 #ifndef __BKMRKATTACHMENT_H__
       
    20 #define __BKMRKATTACHMENT_H__
       
    21 
       
    22 #include <centralrepository.h>
       
    23 #include <bookmarkdef.h>
       
    24 #include "repository.h"
       
    25 
       
    26 /**
       
    27 Internal representation of a bookmark attachment. Currently the only attachments are icons.
       
    28 An attachment is made up of 8bit raw data plus and ID
       
    29 */
       
    30 class CBkmrkAttachment: public CRepositoryAccessor
       
    31 	{
       
    32 public:
       
    33 	static CBkmrkAttachment* NewL(CRepository& aRepository, const TDesC8& aData);
       
    34 	~CBkmrkAttachment();
       
    35 
       
    36 	Bookmark::TAttachmentId Id() const;
       
    37 	void SetIdL();
       
    38 
       
    39 	TInt Size() const;
       
    40 	const TDesC8& Data() const;
       
    41 	void SetDataL(const TDesC8& aData);
       
    42 
       
    43 	// From MRepositoryAccessor
       
    44 	TUint32 IndexBase();
       
    45 	void SetIdFromIndexBase(TUint32 aIndexBase);
       
    46 	void TransSaveL();
       
    47 	void TransNewL();
       
    48 	void TransLoadL();
       
    49 	void TransRemoveL();
       
    50 
       
    51 private:
       
    52 	// From MRepositoryAccessor
       
    53 	CBkmrkAttachment();
       
    54 	void ConstructL(CRepository& aRepository, const TDesC8& aData);
       
    55 
       
    56 private:
       
    57 	Bookmark::TAttachmentId iId;
       
    58 	HBufC8* 				iData;
       
    59 	};
       
    60 
       
    61 #endif //__BKMRKATTACHMENT_H__