1.1 --- a/epoc32/include/mw/epos_poslmcategoryserialization.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/mw/epos_poslmcategoryserialization.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,61 @@
1.4 -epos_poslmcategoryserialization.h
1.5 +/*
1.6 +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description: PosLmCategorySerialization class definition
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +#ifndef __EPOS_POSCATEGORYSERIALIZATION_H_
1.24 +#define __EPOS_POSCATEGORYSERIALIZATION_H_
1.25 +
1.26 +#include <e32base.h>
1.27 +
1.28 +class CPosLandmarkCategory;
1.29 +
1.30 +/**
1.31 + * This class contains helper methods for landmark category serialization.
1.32 + * A landmark category can be packed into a buffer with PackL method and unpacked
1.33 + * back with UnpackL method.
1.34 + *
1.35 + * @lib eposlandmarks.lib
1.36 + * @since S60 3.1
1.37 + */
1.38 +class PosLmCategorySerialization
1.39 + {
1.40 + public:
1.41 + /** Packs category object into a buffer.
1.42 + *
1.43 + * All the data is preserved when packing. Database information is not stored.
1.44 + * Packed category can be unpacked with @ref UnpackL method.
1.45 + *
1.46 + * @param aCategory The category to be packed.
1.47 + * @return The buffer with the category data packed.
1.48 + * Ownership is transferred to the client.
1.49 + */
1.50 + IMPORT_C static HBufC8* PackL( const CPosLandmarkCategory& aCategory );
1.51 +
1.52 + /** Unpacks a category object, packed with @ref PackL method, from buffer.
1.53 + *
1.54 + * All the data is preserved when packing, and restored exactly
1.55 + * when unpacking. It means that category ID is valid only for the database,
1.56 + * this category was read from.
1.57 + *
1.58 + * @param aBuffer The buffer containing category.
1.59 + * @return The category unpacked. Ownership is transferred to client.
1.60 + * @leave KErrCorrupt if buffer does not contain valid category package.
1.61 + */
1.62 + IMPORT_C static CPosLandmarkCategory* UnpackL( const TDesC8& aBuffer );
1.63 + };
1.64 +
1.65 +#endif // __EPOS_POSCATEGORYSERIALIZATION_H_