Fix all mis-used types about large file support
[platform/core/security/ode.git] / server / block-device.h
index 095da51..13e6546 100644 (file)
 
 namespace ode {
 
-class Block {
-public:
-       template <typename OffsetType, typename LengthType>
-       Block(OffsetType offset, LengthType len) : physicalOffset(offset), length(len) {}
-       ~Block() {}
-
-       unsigned long long physicalOffset;
-       unsigned long long length;
-};
-
 class BlockDevice final {
 public:
        typedef std::unordered_map<std::string, std::string> DeviceList;
@@ -58,11 +48,11 @@ public:
        int open(int flags);
        void close(int descriptor);
 
-       int discard(const Block &block);
-       int secDiscard(const Block &block);
+       int discard(off_t offset, off_t length);
+       int secDiscard(off_t offset, off_t length);
 
        const std::string &getName() const;
-       int getSize();
+       blksize_t getBlockSize();
 
 private:
        void createDeviceList();
@@ -70,7 +60,7 @@ private:
 
 private:
        std::string name;
-       int blockSize;
+       blksize_t blockSize;
 
        DeviceList deviceList;
 };