blob: b13b9263713c862e9ab1482d85363fee72784ac4 [file] [log] [blame]
Mike Lockwood16864ba2010-05-11 17:16:59 -04001/*
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 Lockwood7850ef92010-05-14 10:10:36 -040022namespace android {
23
Mike Lockwood16864ba2010-05-11 17:16:59 -040024class MtpDatabase;
Mike Lockwood16864ba2010-05-11 17:16:59 -040025
26class MtpStorage {
27
28private:
29 MtpStorageID mStorageID;
30 const char* mFilePath;
31 MtpDatabase* mDatabase;
32 uint64_t mMaxCapacity;
33
34public:
35 MtpStorage(MtpStorageID id, const char* filePath, MtpDatabase* db);
36 virtual ~MtpStorage();
37
38 inline MtpStorageID getStorageID() const { return mStorageID; }
39 int getType() const;
40 int getFileSystemType() const;
41 int getAccessCapability() const;
42 uint64_t getMaxCapacity();
43 uint64_t getFreeSpace();
44 const char* getDescription() const;
45 inline const char* getPath() const { return mFilePath; }
Mike Lockwood16864ba2010-05-11 17:16:59 -040046};
47
Mike Lockwood7850ef92010-05-14 10:10:36 -040048}; // namespace android
49
Mike Lockwood16864ba2010-05-11 17:16:59 -040050#endif // _MTP_STORAGE_H