2 // Tizen Web Device API
3 // Copyright (c) 2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 #ifndef __TIZEN_SYSTEMINFO_SYSTEMINFO_STORAGE_UNIT_H__
19 #define __TIZEN_SYSTEMINFO_SYSTEMINFO_STORAGE_UNIT_H__
24 #include "SystemInfoProperty.h"
27 namespace SystemInfo {
30 const std::string TYPE_UNKNOWN = "UNKNOWN";
31 const std::string TYPE_INTERNAL = "INTERNAL";
32 const std::string TYPE_USB_HOST = "USB_HOST";
33 const std::string TYPE_MMC = "MMC";
42 class SystemInfoStorageUnit;
43 typedef std::shared_ptr<SystemInfoStorageUnit> SystemInfoStorageUnitPtr;
44 typedef std::vector<SystemInfoStorageUnitPtr> UnitsPtrVector;
46 class SystemInfoStorageUnit: public SystemInfoProperty {
48 SystemInfoStorageUnit();
49 virtual ~SystemInfoStorageUnit();
51 StorageType getType() const;
52 unsigned long long getCapacity() const;
53 unsigned long long getAvailableCapacity() const;
54 bool isRemovable() const;
56 void setType(StorageType type);
57 void setCapacity(unsigned long long capacity);
58 void setAvailableCapacity(unsigned long long av_capacity);
59 void setIsRemovable(bool is_removable);
61 static std::string typeToString(StorageType type);
63 bool operator==(const SystemInfoStorageUnit& other);
64 bool operator!=(const SystemInfoStorageUnit& other);
68 unsigned long long m_capacity;
69 unsigned long long m_available_capacity;
77 #endif //__TIZEN_SYSTEMINFO_SYSTEMINFO_STORAGE_UNIT_H__