2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: PosLandmarkSerialization class definition
19 #ifndef __EPOS_POSLANDMARKSERIALIZATION_H
20 #define __EPOS_POSLANDMARKSERIALIZATION_H
27 * This class contains helper methods for landmark serialization.
28 * A landmark can be packed into a buffer with PackL method and unpacked
29 * back with UnpackL method.
31 * @lib eposlandmarks.lib
34 class PosLandmarkSerialization
37 /** Packs landmark object into a buffer.
39 * All the data is preserved when packing. Database information is not stored.
40 * Packed landmark can be unpacked with @ref UnpackL method.
42 * @param aLandmark The landmark to be packed.
43 * @return The buffer with the landmark data packed.
44 * Ownership is transferred to the client.
46 IMPORT_C static HBufC8* PackL( const CPosLandmark& aLandmark );
48 /** Unpacks a landmark object, packed with @ref PackL method, from buffer.
50 * All the data is preserved when packing, and restored exactly
51 * when unpacking. It means that landmark ID and
52 * category IDs are valid only for the database, this landmark was read from.
54 * @param aBuffer The buffer containing landmark.
55 * @return The landmark unpacked. Ownership is transferred to client.
56 * @leave KErrCorrupt if buffer does not contain valid landmark package.
58 IMPORT_C static CPosLandmark* UnpackL( const TDesC8& aBuffer );
61 #endif // __EPOS_POSLANDMARKSERIALIZATION_H