93e5a4b575d570505c7d516d3719d2249bd12946
[platform/core/location/maps-plugin-here.git] / inc / engine / tilefetcher / TileFetcherReply.h
1 /*
2  * Copyright (C) 2013 HERE Global B.V. All rights reserved.
3  * This software, including documentation, is protected by copyright controlled by
4  * HERE Global B.V. (“Software”). All rights are reserved. Copying, including reproducing,
5  * storing, adapting or translating, any or all of this material requires the prior
6  * written consent of HERE Global B.V. You may use this
7  * Software in accordance with the terms and conditions defined in the
8  * HERE Location Platform Services Terms and Conditions, available at
9  * http://developer.here.com/terms-conditions-base
10  *
11  * As an additional permission to the above, you may distribute Software,
12  * in object code format as part of an Application, according to, and subject to, terms and
13  * conditions defined in the Tizen Software Development kit (“SDK”) License Agreement.
14  * You may distribute such object code format Application under terms of your choice,
15  * provided that the header and source files of the Software have not been modified.
16  */
17
18 #ifndef TILEFETCHERREPLY_H
19 #define TILEFETCHERREPLY_H
20
21 #include <tr1/memory>
22
23 #include "common/HereMaps_global.h"
24 #include "common/BaseReply.h"
25 #include "common/TileKey.h"
26
27 #include "maps/GeoTile.h"
28
29 #ifndef TIZEN_MIGRATION
30 namespace Tizen{ namespace Graphics{ class Bitmap; } }
31 #endif
32
33 HERE_MAPS_BEGIN_NAMESPACE
34
35 /**
36  * This class encapsulates a reply to a request for a map tile. 
37  * 
38  * \ingroup tilefetcher
39  */
40 class TileFetcherReply : public BaseReply
41 {
42 public:
43     /** 
44      * This method is a constructor that initialize the class instance, using
45      * an object that specifies the map tile row, column, zoom level, map
46      * language and map type.
47      * 
48      * @param rKey A constant reference to a tile key object.
49      */
50     TileFetcherReply(const TileKey& rKey);
51
52     /**
53      * This method is the (virtual) destructor.
54      */
55     virtual ~TileFetcherReply();
56
57     /**
58      * This method retrieves the map tile as a bitmap from the reply to the
59      * query.
60      * 
61      * @return A bitmap that contains the map tile.
62      */
63     DrawableBitmapPtr GetTile() const;
64
65     /**
66      * This method retrieves an object specifying the map tile
67      * row, column and zoom level.
68      * 
69      * @return A constant reference to an object that contains the map tile row,
70      *        column, zoom level, map language and map type.
71      */
72     const TileKey& GetKey() const;
73
74 private:
75     HERE_MAPS_NO_COPY_NO_ASSIGN(TileFetcherReply);
76     friend class TestTileFetcher;
77
78     virtual bool OnDataReceived(const unsigned char* pBuffer, size_t uSize);
79
80     class TileFetcherReplyImpl;
81     TileFetcherReplyImpl* m_pImpl;
82 };
83
84 HERE_MAPS_END_NAMESPACE
85
86 #endif