epoc32/include/mw/EPos_CPosLandmark.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
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.
williamr@4
     1
/*
williamr@4
     2
* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). 
williamr@4
     3
* All rights reserved.
williamr@4
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of "Eclipse Public License v1.0"
williamr@4
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@4
     8
*
williamr@4
     9
* Initial Contributors:
williamr@4
    10
* Nokia Corporation - initial contribution.
williamr@4
    11
*
williamr@4
    12
* Contributors:
williamr@4
    13
*
williamr@4
    14
* Description:  CPosLandmark class
williamr@4
    15
*
williamr@4
    16
*/
williamr@4
    17
williamr@4
    18
williamr@4
    19
#ifndef CPOSLANDMARK_H
williamr@4
    20
#define CPOSLANDMARK_H
williamr@4
    21
williamr@4
    22
#include <e32base.h>
williamr@4
    23
#include <lbsfields.h>
williamr@4
    24
#include <badesca.h>
williamr@4
    25
williamr@4
    26
#include "EPos_Landmarks.h"
williamr@4
    27
williamr@4
    28
class TLocality;
williamr@4
    29
williamr@4
    30
williamr@4
    31
/**
williamr@4
    32
*  This is a container class for a landmark.
williamr@4
    33
*
williamr@4
    34
*  A landmark is principally a location with a name.
williamr@4
    35
*
williamr@4
    36
*  The landmark object can either be created by a client or retrieved from
williamr@4
    37
*  @ref CPosLandmarkDatabase.
williamr@4
    38
*
williamr@4
    39
*  A landmark consists of a number of landmark attributes, e.g. landmark name,
williamr@4
    40
*  landmark position, coverage area, etc.
williamr@4
    41
*
williamr@4
    42
*  A landmark may also contain generic position fields. These position fields
williamr@4
    43
*  are defined in LbsFieldIds.h. Only text fields are supported.If the client 
williamr@4
    44
*  wants to store a non-text field, the value must first be converted to a 
williamr@4
    45
*  textual representation.
williamr@4
    46
*  EPositionPlaceId position field added in extension of TPositionFieldId to support Place id
williamr@4
    47
*  EPositionTimeStamp position field added in extension of TPositionFieldId to support TimeStamp
williamr@4
    48
*
williamr@4
    49
*  CPosLandmark contains functions for setting and getting landmark attributes
williamr@4
    50
*  and position fields.
williamr@4
    51
*
williamr@4
    52
*  Note: CPosLandmark is only a local representation of the landmark. To
williamr@4
    53
*  update the database, call @ref CPosLandmarkDatabase::UpdateLandmarkL (or
williamr@4
    54
*  @ref CPosLandmarkDatabase::AddLandmarkL for a new landmark).
williamr@4
    55
*
williamr@4
    56
*  @lib eposlandmarks.lib
williamr@4
    57
*  @since S60 3.0
williamr@4
    58
*/
williamr@4
    59
class CPosLandmark : public CBase
williamr@4
    60
    {
williamr@4
    61
    public:
williamr@4
    62
williamr@4
    63
        /**
williamr@4
    64
        *  Bitmap for specifying a group of landmark attributes. Bit values are
williamr@4
    65
        *  defined by @ref _TAttributes.
williamr@4
    66
        */
williamr@4
    67
        typedef TUint32 TAttributes;
williamr@4
    68
williamr@4
    69
        /**
williamr@4
    70
        *  Specifies a landmark attribute such as landmark name or landmark
williamr@4
    71
        *  position.
williamr@4
    72
        */
williamr@4
    73
        enum _TAttributes
williamr@4
    74
            {
williamr@4
    75
						/**
williamr@4
    76
            * No attribute specified. 
williamr@4
    77
						*/
williamr@4
    78
            ENoAttribute        = 0x0000  ,
williamr@4
    79
						/**
williamr@4
    80
            * The name of the landmark.
williamr@4
    81
            */
williamr@4
    82
            ELandmarkName       = 0x0001  ,
williamr@4
    83
						/**
williamr@4
    84
            * The position of the landmark. 
williamr@4
    85
						*/
williamr@4
    86
            EPosition           = 0x0002  ,
williamr@4
    87
						/**
williamr@4
    88
            * The landmark coverage radius. 
williamr@4
    89
						*/
williamr@4
    90
            ECoverageRadius     = 0x0004  ,
williamr@4
    91
            /**
williamr@4
    92
            * The categories of the landmark. 
williamr@4
    93
						*/
williamr@4
    94
            ECategoryInfo       = 0x0008  ,
williamr@4
    95
            /**
williamr@4
    96
            * The icon that represents the landmark in a UI. 
williamr@4
    97
            */
williamr@4
    98
            EIcon               = 0x0010  ,
williamr@4
    99
            /**
williamr@4
   100
            * A description of the landmark. 
williamr@4
   101
            */
williamr@4
   102
            EDescription        = 0x0020  ,
williamr@4
   103
            /**
williamr@4
   104
            * PlaceId for the landmark
williamr@4
   105
            */    
williamr@4
   106
            EPlaceId						= 0x0040  ,
williamr@4
   107
            /**
williamr@4
   108
            * Timestamp associated with the landmark
williamr@4
   109
            */
williamr@4
   110
            ETimeStamp					= 0x0080  ,
williamr@4
   111
            /*
williamr@4
   112
            * All landmark attributes. 
williamr@4
   113
            */
williamr@4
   114
            EAllAttributes      = 0xFFFF  
williamr@4
   115
            };
williamr@4
   116
williamr@4
   117
    public:
williamr@4
   118
williamr@4
   119
        /**
williamr@4
   120
        * Two-phased constructor.
williamr@4
   121
        *
williamr@4
   122
        * @returns A new instance of this class.
williamr@4
   123
        */
williamr@4
   124
        IMPORT_C static CPosLandmark* NewLC();
williamr@4
   125
williamr@4
   126
        /**
williamr@4
   127
        * Two-phased constructor.
williamr@4
   128
        *
williamr@4
   129
        * @returns A new instance of this class.
williamr@4
   130
        */
williamr@4
   131
        IMPORT_C static CPosLandmark* NewL();
williamr@4
   132
williamr@4
   133
        /**
williamr@4
   134
        * Two-phased copy constructor.
williamr@4
   135
        *
williamr@4
   136
        * @param[in] aLandmark The landmark to copy.
williamr@4
   137
        * @returns A copy of the specified landmark object.
williamr@4
   138
        */
williamr@4
   139
        IMPORT_C static CPosLandmark* NewLC(
williamr@4
   140
               const CPosLandmark&  aLandmark
williamr@4
   141
        );
williamr@4
   142
williamr@4
   143
        /**
williamr@4
   144
        * Two-phased copy constructor.
williamr@4
   145
        *
williamr@4
   146
        * @param[in] aLandmark The landmark to copy.
williamr@4
   147
        * @returns A copy of the specified landmark object.
williamr@4
   148
        */
williamr@4
   149
        IMPORT_C static CPosLandmark* NewL(
williamr@4
   150
               const CPosLandmark&  aLandmark
williamr@4
   151
        );
williamr@4
   152
williamr@4
   153
        /**
williamr@4
   154
        * Destructor.
williamr@4
   155
        */
williamr@4
   156
        virtual ~CPosLandmark();
williamr@4
   157
williamr@4
   158
    public:
williamr@4
   159
williamr@4
   160
        /**
williamr@4
   161
        * Reads the ID of the landmark entry in the database.
williamr@4
   162
        *
williamr@4
   163
        * @returns The ID of the landmark entry in the database, or
williamr@4
   164
        *   @p KPosLmNullItemId if the landmark has not been added to the
williamr@4
   165
        *   database yet.
williamr@4
   166
        */
williamr@4
   167
        IMPORT_C TPosLmItemId LandmarkId() const;
williamr@4
   168
williamr@4
   169
        /**
williamr@4
   170
        * Checks if the landmark is partial.
williamr@4
   171
        *
williamr@4
   172
        * A client can read partial information about a landmark from the
williamr@4
   173
        * database. This function checks if only partial information is
williamr@4
   174
        * included in the landmark object. Partial landmark can not be used
williamr@4
   175
        * with @ref CPosLandmarkDatabase::UpdateLandmarkL().
williamr@4
   176
        *
williamr@4
   177
        * For more about partial landmarks, see
williamr@4
   178
        * @ref CPosLandmarkDatabase::ReadPartialLandmarkLC().
williamr@4
   179
        *
williamr@4
   180
        * @returns @p EFalse if the landmark contains all the landmark
williamr@4
   181
        *   information, otherwise @p ETrue.
williamr@4
   182
        */
williamr@4
   183
        IMPORT_C TBool IsPartial() const;
williamr@4
   184
williamr@4
   185
        /**
williamr@4
   186
        * Reads the name of the landmark.
williamr@4
   187
        *
williamr@4
   188
        * This function returns error code @p KErrNotFound if the landmark
williamr@4
   189
        * name is not set in this landmark object. This will be the case if
williamr@4
   190
        * the landmark is read from the database using partial read and
williamr@4
   191
        * landmark name is excluded. Note that if a landmark is fully read
williamr@4
   192
        * from the database, the landmark name will always be included. If no
williamr@4
   193
        * name has been set for the landmark in the database, it will
williamr@4
   194
        * have an empty name string "".
williamr@4
   195
        *
williamr@4
   196
        * @param[out] aLandmarkName On return contains the landmark name.
williamr@4
   197
        * @returns @p KErrNone if successful, @p KErrNotFound if the landmark
williamr@4
   198
        *   name is not specified.
williamr@4
   199
        */
williamr@4
   200
        IMPORT_C TInt GetLandmarkName(
williamr@4
   201
               TPtrC&  aLandmarkName
williamr@4
   202
        ) const;
williamr@4
   203
williamr@4
   204
        /**
williamr@4
   205
        * Sets the name of the landmark.
williamr@4
   206
        *
williamr@4
   207
        * If no name is set for the landmark when it is written to the database,
williamr@4
   208
        * the landmark in the database will have an empty name string "".
williamr@4
   209
        *
williamr@4
   210
        * @param[in] aLandmarkName The landmark name.
williamr@4
   211
        *
williamr@4
   212
        * @leave KErrArgument If the name of the landmark is longer than
williamr@4
   213
        * @p KPosLmMaxTextFieldLength
williamr@4
   214
        */
williamr@4
   215
        IMPORT_C void SetLandmarkNameL(
williamr@4
   216
               const TDesC&  aLandmarkName
williamr@4
   217
        );
williamr@4
   218
williamr@4
   219
        /**
williamr@4
   220
        * Reads the landmark position.
williamr@4
   221
        *
williamr@4
   222
        * @param[out] aPosition On return contains the landmark position.
williamr@4
   223
        * @returns @p KErrNone if successful, @p KErrNotFound if the landmark
williamr@4
   224
        *   position is not set.
williamr@4
   225
        */
williamr@4
   226
        IMPORT_C TInt GetPosition(
williamr@4
   227
               TLocality&  aPosition
williamr@4
   228
        ) const;
williamr@4
   229
williamr@4
   230
        /**
williamr@4
   231
        * Sets the landmark position.
williamr@4
   232
        *
williamr@4
   233
        * Latitude and longitude must be set in the position.
williamr@4
   234
        *
williamr@4
   235
        * Only WGS 84 coordinates are allowed. @p KPositionDatumWgs84 must be set as datum.
williamr@4
   236
        *
williamr@4
   237
        * @param[in] aPosition The landmark position.
williamr@4
   238
        *
williamr@4
   239
        * @leave KErrArgument Latitude and/or longitude is not set or other datum 
williamr@4
   240
        *   than @p KPositionDatumWgs84 is used in @p aPosition.
williamr@4
   241
        */
williamr@4
   242
        IMPORT_C void SetPositionL(
williamr@4
   243
               const TLocality& aPosition
williamr@4
   244
        );
williamr@4
   245
williamr@4
   246
        /**
williamr@4
   247
        * Reads the landmark coverage radius.
williamr@4
   248
        *
williamr@4
   249
        * Coverage radius is set if the landmark is big, e.g. a city. It
williamr@4
   250
        * defines the size of the area which the landmark represents.
williamr@4
   251
        *
williamr@4
   252
        * @param[out] aCoverageRadius On return contains the coverage radius.
williamr@4
   253
        * @returns @p KErrNone if successful, @p KErrNotFound if the landmark
williamr@4
   254
        *   coverage radius is not set.
williamr@4
   255
        */
williamr@4
   256
        IMPORT_C TInt GetCoverageRadius(
williamr@4
   257
               TReal32&  aCoverageRadius
williamr@4
   258
        ) const;
williamr@4
   259
williamr@4
   260
        /**
williamr@4
   261
        * Sets the landmark coverage radius.
williamr@4
   262
        *
williamr@4
   263
        * Coverage radius is set if the landmark is big, e.g. a city. It
williamr@4
   264
        * defines the size of the area which the landmark represents.
williamr@4
   265
        *
williamr@4
   266
        * If coverage radius is set to NaN, then the coverage radius will be
williamr@4
   267
        * removed.
williamr@4
   268
        *
williamr@4
   269
        * @param aCoverageRadius The coverage radius.
williamr@4
   270
        */
williamr@4
   271
        IMPORT_C void SetCoverageRadius(
williamr@4
   272
               TReal32  aCoverageRadius
williamr@4
   273
        );
williamr@4
   274
williamr@4
   275
        /**
williamr@4
   276
        * Adds a category to the landmark.
williamr@4
   277
        *
williamr@4
   278
        * If the specified category has already been added, nothing happens.
williamr@4
   279
        *
williamr@4
   280
        * @param aCategoryId The category to add.
williamr@4
   281
        */
williamr@4
   282
        IMPORT_C void AddCategoryL(
williamr@4
   283
               TPosLmItemId  aCategoryId
williamr@4
   284
        );
williamr@4
   285
williamr@4
   286
        /**
williamr@4
   287
        * Removes a category from the landmark.
williamr@4
   288
        *
williamr@4
   289
        * If the specified category is not in the landmark, nothing happens.
williamr@4
   290
        *
williamr@4
   291
        * @param aCategoryId The category to remove
williamr@4
   292
        */
williamr@4
   293
        IMPORT_C void RemoveCategory(
williamr@4
   294
               TPosLmItemId  aCategoryId
williamr@4
   295
        );
williamr@4
   296
williamr@4
   297
        /**
williamr@4
   298
        * Retrieves the database item IDs for the categories contained in this
williamr@4
   299
        * landmark.
williamr@4
   300
        *
williamr@4
   301
        * @param[out] aCategoryIdArray On return contains the list of this 
williamr@4
   302
        *   landmark's categories.
williamr@4
   303
        */
williamr@4
   304
        IMPORT_C void GetCategoriesL(
williamr@4
   305
               RArray<TPosLmItemId>&  aCategoryIdArray
williamr@4
   306
        ) const;
williamr@4
   307
williamr@4
   308
        /**
williamr@4
   309
        * Checks if the landmark contains a specific position field.
williamr@4
   310
        *
williamr@4
   311
        * @param aFieldId The position field.
williamr@4
   312
        * @returns @p ETrue if the landmark contains the field, otherwise
williamr@4
   313
        *   @p EFalse.
williamr@4
   314
        */
williamr@4
   315
        IMPORT_C TBool IsPositionFieldAvailable(
williamr@4
   316
               TPositionFieldId aFieldId
williamr@4
   317
        ) const;
williamr@4
   318
williamr@4
   319
        /**
williamr@4
   320
        * Returns the number of position fields set in the landmark.
williamr@4
   321
        *
williamr@4
   322
        * @returns The number of position fields set in the landmark.
williamr@4
   323
        */
williamr@4
   324
        IMPORT_C TUint NumOfAvailablePositionFields() const;
williamr@4
   325
williamr@4
   326
        /**
williamr@4
   327
        * Returns the first position field contained in the landmark.
williamr@4
   328
        *
williamr@4
   329
        * This function is used to initiate iteration over the position fields.
williamr@4
   330
        * @ref NextPositionFieldId() is called to continue the iteration.
williamr@4
   331
        *
williamr@4
   332
        * @returns The first position field contained by the landmark, or
williamr@4
   333
        *   @p EPositionFieldNone if there are no position fields in the
williamr@4
   334
        *   landmark.
williamr@4
   335
        */
williamr@4
   336
        IMPORT_C TPositionFieldId FirstPositionFieldId() const;
williamr@4
   337
williamr@4
   338
        /**
williamr@4
   339
        * Returns the next position field contained in the landmark.
williamr@4
   340
        *
williamr@4
   341
        * This function is used to iterate the position fields in the landmark.
williamr@4
   342
        * @ref FirstPositionFieldId() is called to get the first ID. This ID is
williamr@4
   343
        * passed to @ref NextPositionFieldId() to obtain the second ID, etc.
williamr@4
   344
        *
williamr@4
   345
        * If the client specifies an ID which is not contained in the landmark,
williamr@4
   346
        * this function will panic with code @p EPosInvalidPositionFieldId. It
williamr@4
   347
        * is therefore important that the client does not remove the current
williamr@4
   348
        * field while iterating. If the client still removes the current field,
williamr@4
   349
        * the client must pass the previous field.
williamr@4
   350
        *
williamr@4
   351
        * @param aFieldId The last position field which was read.
williamr@4
   352
        * @returns The next position field contained by the landmark, or
williamr@4
   353
        *   @p EPositionFieldNone if there are no more position fields in the
williamr@4
   354
        *   landmark.
williamr@4
   355
        *
williamr@4
   356
        * @panic "Landmarks Client"-EPosInvalidPositionFieldId Client specified a field ID,
williamr@4
   357
        *   which is not contained in the landmark.
williamr@4
   358
        */
williamr@4
   359
        IMPORT_C TPositionFieldId NextPositionFieldId(
williamr@4
   360
               TPositionFieldId aFieldId
williamr@4
   361
        ) const;
williamr@4
   362
williamr@4
   363
        /**
williamr@4
   364
        * Reads the value of a position field.
williamr@4
   365
        *
williamr@4
   366
        * @param[in] aFieldId The position field to read.
williamr@4
   367
        * @param[out] aFieldValue On return contains the value of the position field.
williamr@4
   368
        * @returns @p KErrNone if successful, @p KErrNotFound if the landmark
williamr@4
   369
        *   does not contain the specified position field.
williamr@4
   370
        */
williamr@4
   371
        IMPORT_C TInt GetPositionField(
williamr@4
   372
               TPositionFieldId aFieldId,
williamr@4
   373
               TPtrC& aFieldValue
williamr@4
   374
        ) const;
williamr@4
   375
williamr@4
   376
        /**
williamr@4
   377
        * Sets a position field in the landmark.
williamr@4
   378
        *
williamr@4
   379
        * @param[in] aFieldId The position field to set.
williamr@4
   380
        * @param[in] aFieldValue The new value for the position field.
williamr@4
   381
        *
williamr@4
   382
        * @leave KErrArgument If the position field text is longer than
williamr@4
   383
        *   @p KPosLmMaxTextFieldLength.
williamr@4
   384
        */
williamr@4
   385
        IMPORT_C void SetPositionFieldL(
williamr@4
   386
               TPositionFieldId aFieldId,
williamr@4
   387
               const TDesC& aFieldValue
williamr@4
   388
        );
williamr@4
   389
williamr@4
   390
        /**
williamr@4
   391
        * Removes a position field from the landmark.
williamr@4
   392
        *
williamr@4
   393
        * If the specified position field is not contained in the landmark,
williamr@4
   394
        * nothing will happen.
williamr@4
   395
        *
williamr@4
   396
        * @param aFieldId The position field to remove.
williamr@4
   397
        */
williamr@4
   398
        IMPORT_C void RemovePositionField(
williamr@4
   399
               TPositionFieldId  aFieldId
williamr@4
   400
        );
williamr@4
   401
williamr@4
   402
        /**
williamr@4
   403
        * Associates the landmark with an icon.
williamr@4
   404
        *
williamr@4
   405
        * Icons are found in icon files. To set an icon, the client
williamr@4
   406
        * must specify the name of the icon file and the index of the
williamr@4
   407
        * icon within the file.
williamr@4
   408
        *
williamr@4
   409
        * The landmark is not affected if the icon file is changed or
williamr@4
   410
        * removed. It only contains a link to the icon.
williamr@4
   411
        *
williamr@4
   412
        * @param[in] aIconFileName The full icon file name.
williamr@4
   413
        * @param[in] aIconIndex The index of the icon within the icon file.
williamr@4
   414
        * @param[in] aIconMaskIndex The index of the icon mask within the
williamr@4
   415
        *   icon file.
williamr@4
   416
        *
williamr@4
   417
        * @leave KErrArgument The icon file name is longer than @p KMaxFileName.
williamr@4
   418
        *
williamr@4
   419
        * @panic "Landmarks Client"-EPosLmInvalidArgument The icon index is negative or
williamr@4
   420
        *   the icon mask index is negative and not equal to @p KPosLmIconMaskNotUsed.
williamr@4
   421
        */
williamr@4
   422
        IMPORT_C void SetIconL(
williamr@4
   423
               const TDesC&  aIconFileName,
williamr@4
   424
               TInt  aIconIndex,
williamr@4
   425
               TInt  aIconMaskIndex
williamr@4
   426
        );
williamr@4
   427
williamr@4
   428
        /**
williamr@4
   429
        * Returns the link to the icon associated with the landmark.
williamr@4
   430
        *
williamr@4
   431
        * Icons are found in icon files. It is referenced by the name of
williamr@4
   432
        * the icon file and the index of the icon within the file.
williamr@4
   433
        *
williamr@4
   434
        * The landmark is not affected if the icon file is changed or
williamr@4
   435
        * removed. It only contains a link to the icon. This means that the
williamr@4
   436
        * link could be invalid.
williamr@4
   437
        *
williamr@4
   438
        * @param[out] aIconFileName The full icon file name.
williamr@4
   439
        * @param[out] aIconIndex The index of the icon within the icon file.
williamr@4
   440
        * @param[out] aIconMaskIndex The index of the icon mask within the
williamr@4
   441
        *   icon file. If no icon mask index is defined @p KPosLmIconMaskNotUsed
williamr@4
   442
        *   is returned.
williamr@4
   443
        *
williamr@4
   444
        * @returns @p KErrNone if successful, @p KErrNotFound if the icon is
williamr@4
   445
        *   not set.
williamr@4
   446
        */
williamr@4
   447
        IMPORT_C TInt GetIcon(
williamr@4
   448
               TPtrC& aIconFileName,
williamr@4
   449
               TInt&  aIconIndex,
williamr@4
   450
               TInt&  aIconMaskIndex
williamr@4
   451
        ) const;
williamr@4
   452
williamr@4
   453
        /**
williamr@4
   454
        * Reads the description of the landmark.
williamr@4
   455
        *
williamr@4
   456
        * This function returns error code @p KErrNotFound if the landmark
williamr@4
   457
        * description is not set in this landmark object. This will be the case
williamr@4
   458
        * if the landmark is read from the database using partial read and
williamr@4
   459
        * landmark description is excluded. Note that if a landmark is fully
williamr@4
   460
        * read from the database, the landmark description is always
williamr@4
   461
        * included. If no description has been set for the landmark in
williamr@4
   462
        * the database, it is set to an empty string "".
williamr@4
   463
        *
williamr@4
   464
        * @param[out] aLandmarkDescription On return contains the landmark description.
williamr@4
   465
        * @returns @p KErrNone if successful, @p KErrNotFound if the landmark
williamr@4
   466
        *   description is not specified.
williamr@4
   467
        */
williamr@4
   468
        IMPORT_C TInt GetLandmarkDescription(
williamr@4
   469
               TPtrC&  aLandmarkDescription
williamr@4
   470
        ) const;
williamr@4
   471
williamr@4
   472
        /**
williamr@4
   473
        * Sets a description for the landmark.
williamr@4
   474
        *
williamr@4
   475
        * If no description is set for the landmark when it is written to the
williamr@4
   476
        * database, the landmark in the database will have an empty description
williamr@4
   477
        * string "".
williamr@4
   478
        *
williamr@4
   479
        * @param[in] aLandmarkDescription The landmark description.
williamr@4
   480
        *
williamr@4
   481
        * @leave KErrArgument The name of the landmark is longer than
williamr@4
   482
        *   @p KPosLmMaxDescriptionLength.
williamr@4
   483
        */
williamr@4
   484
        IMPORT_C void SetLandmarkDescriptionL(
williamr@4
   485
               const TDesC&  aLandmarkDescription
williamr@4
   486
        );
williamr@4
   487
williamr@4
   488
        /**
williamr@4
   489
        * Removes landmark attributes from the landmark.
williamr@4
   490
        *
williamr@4
   491
        * @param aAttributes A bitmap specifying which landmark attributes to
williamr@4
   492
        *   remove.
williamr@4
   493
        */
williamr@4
   494
        IMPORT_C void RemoveLandmarkAttributes(
williamr@4
   495
               TAttributes  aAttributes
williamr@4
   496
        );
williamr@4
   497
williamr@4
   498
        /**
williamr@4
   499
        * @internal */
williamr@4
   500
        /*
williamr@4
   501
        * Sets the partial update flag to the landmark.
williamr@4
   502
        * This flag is used to indicate if only partial information is included
williamr@4
   503
        * in the landmark object.
williamr@4
   504
        *
williamr@4
   505
        * @param aPartial @p EFalse if the landmark contains all the landmark
williamr@4
   506
        *   information, otherwise @p ETrue.
williamr@4
   507
        */
williamr@4
   508
        void SetPartialL(
williamr@4
   509
               TBool aPartial
williamr@4
   510
        );
williamr@4
   511
williamr@4
   512
        /**
williamr@4
   513
        * @internal */
williamr@4
   514
        /*
williamr@4
   515
        * Sets the landmark ID to the landmark.
williamr@4
   516
        *
williamr@4
   517
        * @param aId The landmark ID to set.
williamr@4
   518
        */
williamr@4
   519
        void SetLandmarkIdL(
williamr@4
   520
               TPosLmItemId aId
williamr@4
   521
        );
williamr@4
   522
				
williamr@4
   523
				/**
williamr@4
   524
				* Sets the PlaceId for the landmark
williamr@4
   525
				* @param[in]  aPId The place id of the landmark
williamr@4
   526
				* @leave  Symbian error codes
williamr@4
   527
				*/
williamr@4
   528
				IMPORT_C void SetPlaceIdL( const TDesC& aPId );
williamr@4
   529
				
williamr@4
   530
				/**
williamr@4
   531
				* Gets the PlaceId of the landmark
williamr@4
   532
				* @param[out] aPId On return contains the place id of the landmark
williamr@4
   533
				* @return KErrNone if successful , else KErrNotFound if PlaceId is 
williamr@4
   534
				*					not specified.
williamr@4
   535
				*/
williamr@4
   536
				IMPORT_C TInt GetPlaceId( TPtrC& aPId ) const;
williamr@4
   537
				
williamr@4
   538
				/**
williamr@4
   539
				* Sets the timestamp of the landmark.
williamr@4
   540
				* @param[in] aTimeStamp Timestamp of the landmark(Full date & time)
williamr@4
   541
				* @leave KErrArgument If the full date & time have not been specified.
williamr@4
   542
				*/
williamr@4
   543
				IMPORT_C void SetTimeStampL( const TTime aTimeStamp );
williamr@4
   544
				
williamr@4
   545
				/**
williamr@4
   546
				* Gets the timestamp of the landmark
williamr@4
   547
				* @param[out] aTimeStamp On return contains the timestamp of the landamrk
williamr@4
   548
				* @return KErrNone if successful , else KErrNotFound if TimeStamp is 
williamr@4
   549
				*					not specified.
williamr@4
   550
				*/
williamr@4
   551
				IMPORT_C TInt GetTimeStamp( TTime& aTimeStamp )const;
williamr@4
   552
williamr@4
   553
    private:
williamr@4
   554
williamr@4
   555
        // C++ constructor.
williamr@4
   556
        CPosLandmark();
williamr@4
   557
williamr@4
   558
        // Prohibit copy constructor
williamr@4
   559
        CPosLandmark(const CPosLandmark&);
williamr@4
   560
williamr@4
   561
        // Prohibit assigment operator
williamr@4
   562
        CPosLandmark& operator= (const CPosLandmark&);
williamr@4
   563
williamr@4
   564
        void ConstructL();
williamr@4
   565
        void ConstructL(const CPosLandmark& aLandmark);
williamr@4
   566
williamr@4
   567
    private:
williamr@4
   568
williamr@4
   569
        // Landmark ID
williamr@4
   570
        TPosLmItemId iId;
williamr@4
   571
williamr@4
   572
        // Partial landmark flag
williamr@4
   573
        TBool iIsPartial;
williamr@4
   574
williamr@4
   575
        // Landmark name
williamr@4
   576
        HBufC* iLandmarkName;
williamr@4
   577
williamr@4
   578
        // Landmark position information
williamr@4
   579
        TLocality* iPosition;
williamr@4
   580
williamr@4
   581
        // Landmark coverage radius
williamr@4
   582
        TReal32 iCoverageRadius;
williamr@4
   583
williamr@4
   584
        // Landmark categories
williamr@4
   585
        RArray<TPosLmItemId> iCategoryArray;
williamr@4
   586
williamr@4
   587
        // Landmark position field IDs
williamr@4
   588
        RArray<TUint> iPositionFieldIds;
williamr@4
   589
williamr@4
   590
        // Landmark position field strings
williamr@4
   591
        CDesCArray* iPositionFieldStrings;
williamr@4
   592
williamr@4
   593
        // Landmark icon filename
williamr@4
   594
        HBufC* iIconFileName;
williamr@4
   595
williamr@4
   596
        // Landmark icon index
williamr@4
   597
        TInt iIconIndex;
williamr@4
   598
williamr@4
   599
        // Landmark icon mask index
williamr@4
   600
        TInt iIconMaskIndex;
williamr@4
   601
williamr@4
   602
        // Landmark description
williamr@4
   603
        HBufC* iLandmarkDescription;
williamr@4
   604
    };
williamr@4
   605
williamr@4
   606
#endif      // CPOSLANDMARK_H
williamr@4
   607
williamr@4
   608