tizen beta release
[platform/framework/web/wrt-plugins-common.git] / src / modules / API / StorageEvent / StorageEvent.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *    Licensed under the Apache License, Version 2.0 (the "License");
5  *    you may not use this file except in compliance with the License.
6  *    You may obtain a copy of the License at
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *    Unless required by applicable law or agreed to in writing, software
11  *    distributed under the License is distributed on an "AS IS" BASIS,
12  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *    See the License for the specific language governing permissions and
14  *    limitations under the License.
15  */
16 /**
17  *
18  * @file        StorageEvent.h
19  * @author      Andrzej Surdej (a.surdej@samsung.com)
20  * @version     0.1
21  * @brief       Storage event class
22  */
23
24 #ifndef WRTDEVICEAPIS_STORAGEEVENT_STORAGE_EVENT_H
25 #define WRTDEVICEAPIS_STORAGEEVENT_STORAGE_EVENT_H
26
27 #include <dpl/optional_typedefs.h>
28 #include "IStorageEvent.h"
29
30 namespace WrtDeviceApis {
31 namespace StorageEvent {
32 namespace Api {
33
34 class StorageEvent : public IStorageEvent
35 {
36   public :
37
38     StorageEvent();
39     explicit StorageEvent(
40             const LocalStorage::Api::ILocalStoragePtr &storageArea);
41
42     std::string getKey() const;
43     DPL::OptionalString getOldValue() const;
44     DPL::OptionalString getNewValue() const;
45     std::string getUrl() const;
46     LocalStorage::Api::ILocalStoragePtr getStorageArea() const;
47
48     void setKey(const std::string &inKey);
49     void setOldValue(const std::string &inValue);
50     void setNewValue(const std::string &inValue);
51     void setUrl(const std::string &inUrl);
52     void setStorageArea(
53             const LocalStorage::Api::ILocalStoragePtr &inStorageArea);
54
55   private :
56     std::string m_key;
57     DPL::OptionalString m_oldValue;
58     DPL::OptionalString m_newValue;
59     std::string m_url;
60     LocalStorage::Api::ILocalStoragePtr m_storageArea;
61 };
62
63 } // Api
64 } // StorageEvent
65 } // WrtDeviceApis
66
67 #endif // WRTDEVICEAPIS_STORAGEEVENT_STORAGE_EVENT_H