Initialize Tizen 2.3
[framework/web/wrt-plugins-common.git] / src_wearable / modules / API / StorageEvent / IStorageEvent.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        IStorageEvent.h
19  * @author      Andrzej Surdej (a.surdej@samsung.com)
20  * @version     0.1
21  * @brief       Storage event interfece
22  */
23
24 #ifndef WRTDEVICEAPIS_COMMONS_STORAGE_EVENT_INTERFACE_H
25 #define WRTDEVICEAPIS_COMMONS_STORAGE_EVENT_INTERFACE_H
26
27 #include <dpl/optional_typedefs.h>
28 #include <dpl/shared_ptr.h>
29 #include <LocalStorage/ILocalStorage.h>
30
31 namespace WrtDeviceApis {
32 namespace StorageEvent {
33 namespace Api {
34 class IStorageEvent
35 {
36   public:
37
38     virtual std::string getKey() const = 0;
39     virtual DPL::OptionalString getOldValue() const = 0;
40     virtual DPL::OptionalString getNewValue() const = 0;
41     virtual std::string getUrl() const = 0;
42     virtual LocalStorage::Api::ILocalStoragePtr getStorageArea() const = 0;
43
44     virtual void setKey(const std::string &inKey) = 0;
45     virtual void setOldValue(const std::string &inValue) = 0;
46     virtual void setNewValue(const std::string &inValue) = 0;
47     virtual void setUrl(const std::string &inUrl) = 0;
48     virtual void setStorageArea(
49         const LocalStorage::Api::ILocalStoragePtr &inStorageArea) = 0;
50 };
51
52 typedef DPL::SharedPtr<IStorageEvent> IStorageEventPtr;
53 } // Api
54 } // StorageEvent
55 } // WrtDeviceApis
56
57 #endif // WRTDEVICEAPIS_COMMONS_STORAGE_EVENT_INTERFACE_H