epoc32/include/mw/epos_poslandmarkserialization.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h) This is the epoc32/include tree with the "platform" subtrees removed, and all but a selected few mbg and rsg files removed.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     1
/*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     2
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     3
* All rights reserved.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     4
* This component and the accompanying materials are made available
4
837f303aceeb Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents: 2
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
2
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     6
* which accompanies this distribution, and is available
4
837f303aceeb Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents: 2
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
2
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     8
*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     9
* Initial Contributors:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    10
* Nokia Corporation - initial contribution.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    11
*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    12
* Contributors:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    13
*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    14
* Description:  PosLandmarkSerialization class definition
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    15
*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    16
*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    17
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    18
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    19
#ifndef __EPOS_POSLANDMARKSERIALIZATION_H
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    20
#define __EPOS_POSLANDMARKSERIALIZATION_H
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    21
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    22
#include <e32base.h>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    23
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    24
class CPosLandmark;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    25
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    26
/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    27
 *  This class contains helper methods for landmark serialization.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    28
 *  A landmark can be packed into a buffer with PackL method and unpacked
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    29
 *  back with UnpackL method.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    30
 *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    31
 *  @lib eposlandmarks.lib
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    32
 *  @since S60 3.1
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    33
 */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    34
class PosLandmarkSerialization
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    35
    {
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    36
    public:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    37
        /** Packs landmark object into a buffer.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    38
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    39
         *  All the data is preserved when packing. Database information is not stored.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    40
         *  Packed landmark can be unpacked with @ref UnpackL method.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    41
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    42
         *  @param aLandmark The landmark to be packed.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    43
         *  @return The buffer with the landmark data packed.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    44
         *          Ownership is transferred to the client.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    45
         */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    46
        IMPORT_C static HBufC8* PackL( const CPosLandmark& aLandmark );
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    47
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    48
        /** Unpacks a landmark object, packed with @ref PackL method, from buffer.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    49
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    50
         *  All the data is preserved when packing, and restored exactly
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    51
         *  when unpacking. It means that landmark ID and
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    52
         *  category IDs are valid only for the database, this landmark was read from.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    53
         *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    54
         *  @param aBuffer The buffer containing landmark.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    55
         *  @return The landmark unpacked. Ownership is transferred to client.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    56
         *  @leave KErrCorrupt if buffer does not contain valid landmark package.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    57
         */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    58
        IMPORT_C static CPosLandmark* UnpackL( const TDesC8& aBuffer );
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    59
    };
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    60
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    61
#endif // __EPOS_POSLANDMARKSERIALIZATION_H