Mike Lockwood | 16864ba | 2010-05-11 17:16:59 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2010 The Android Open Source Project |
| 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 | #ifndef _MTP_STORAGE_H |
| 18 | #define _MTP_STORAGE_H |
| 19 | |
| 20 | #include "mtp.h" |
| 21 | |
Mike Lockwood | 7850ef9 | 2010-05-14 10:10:36 -0400 | [diff] [blame] | 22 | namespace android { |
| 23 | |
Mike Lockwood | 16864ba | 2010-05-11 17:16:59 -0400 | [diff] [blame] | 24 | class MtpDatabase; |
| 25 | class SqliteStatement; |
| 26 | |
| 27 | class MtpStorage { |
| 28 | |
| 29 | private: |
| 30 | MtpStorageID mStorageID; |
| 31 | const char* mFilePath; |
| 32 | MtpDatabase* mDatabase; |
| 33 | uint64_t mMaxCapacity; |
| 34 | |
| 35 | public: |
| 36 | MtpStorage(MtpStorageID id, const char* filePath, MtpDatabase* db); |
| 37 | virtual ~MtpStorage(); |
| 38 | |
| 39 | inline MtpStorageID getStorageID() const { return mStorageID; } |
| 40 | int getType() const; |
| 41 | int getFileSystemType() const; |
| 42 | int getAccessCapability() const; |
| 43 | uint64_t getMaxCapacity(); |
| 44 | uint64_t getFreeSpace(); |
| 45 | const char* getDescription() const; |
| 46 | inline const char* getPath() const { return mFilePath; } |
| 47 | |
| 48 | bool scanFiles(); |
Mike Lockwood | 16864ba | 2010-05-11 17:16:59 -0400 | [diff] [blame] | 49 | }; |
| 50 | |
Mike Lockwood | 7850ef9 | 2010-05-14 10:10:36 -0400 | [diff] [blame] | 51 | }; // namespace android |
| 52 | |
Mike Lockwood | 16864ba | 2010-05-11 17:16:59 -0400 | [diff] [blame] | 53 | #endif // _MTP_STORAGE_H |