MDrive.h
1 /*****************************************************************************
2  **
3  ** Header file for Muster API Drive object
4  **
5  ** Name : MDrive.h
6  ** Author : Leonardo Bernardini
7 ** Version : Alpha 9.0 Wed May 17th 2017
8  **
9  ** Copyright 2000-2017, Virtual Vertex
10  ** All Rights Reserved.
11  **
12  ** This file contains UNPUBLISHED PROPRIETARY SOURCE CODE.
13  ** The contents of this file may not be disclosed to third parties, copied
14  ** or duplicated in any form, in whole or in part, without the prior written
15  ** permission of the author.
16  **
17  *****************************************************************************/
18 #ifndef MDRIVE_H
19 #define MDRIVE_H
20 
21 #ifdef WIN32
22 // Windows definitions
23 #ifdef MCLIENTLIB_EXPORTS
24 #define MCLIENTLIB_API __declspec(dllexport)
25 #else
26 #define MCLIENTLIB_API __declspec(dllimport)
27 #endif
28 #else
29 
30 #ifndef MCLIENTLIB_EXPORTS
31 #ifdef LINUX
32 #define MCLIENTLIB_API
33 #else
34 #define MCLIENTLIB_API
35 #endif
36 #else
37 #define MCLIENTLIB_API
38 #endif
39 #endif
40 
41 #if defined(_WIN32)
42 #pragma warning(disable: 4251)
43 #endif // _WIN32
44 
45 #include <string>
46 #include <vector>
47 
48 namespace MClientLib {
49 
59  class MCLIENTLIB_API MDrive {
60  public:
61 
62  private:
63  std::string mountPoint;
64  std::string name;
65  unsigned long long int mountPointTotalSize;
66  unsigned long long int mountPointFreeSpace;
67 
68  public:
69  MDrive();
70  ~MDrive();
72  std::string getMountPoint();
73  std::string getName();
74  unsigned long long int getMountPointTotalSize();
75  unsigned long long int getMountPointFreeSpace();
77  void setMountPoint(const std::string& mountPoint);
78  void setName(const std::string& name);
79  void setMountPointTotalSize(unsigned long long int totalSize);
80  void setMountPointFreeSpace(unsigned long long int freeSpace);
83  static void GetMountPaths(std::vector<MClientLib::MDrive>* );
84  bool Unmarshall(const std::vector<std::string>& items);
85  bool Unmarshall(const char* data);
86  std::string Marshall();
87  static std::string MarshallDrivesList(std::vector<MClientLib::MDrive>*);
88  static std::vector<MClientLib::MDrive> UnmarshallDrivesList(const std::string& data);
91  };
92 
94 }
95 
96 #endif
Class holding a drive status data.
Definition: MDrive.h:59