Muster SDK  8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
MGroup.h
Go to the documentation of this file.
1 /*****************************************************************************
2  **
3  ** Header file for Muster API Group object
4  **
5  ** Name : MGroup.h
6  ** Author : Leonardo Bernardini
7  ** Version : 1.0, Sat Mar 2nd 2013
8  **
9  ** Copyright 2000-2014, 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 MGROUP_H
19 #define MGROUP_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 
42 // Disable STL Export warning, member is private, we don't need direct access from the DLL client
43 #if defined(_WIN32)
44 #pragma warning(disable: 4251)
45 #endif // _WIN32
46 
47 #include <string>
48 #include <list>
49 #include <vector>
50 
51 namespace MClientLib {
52 
57  private:
58 
59  std::string groupName;
60  std::string allowedPools;
61  std::string allowedTemplates;
62  unsigned long long allowedRights;
63  int allowedInstances;
64  bool enableHomeFolder;
65  bool constrainToHomeFolder;
66  std::string substitutionPaths; // User level assigned paths
67  bool isLdap;
68  long id;
69  public:
70  MGroup();
71  virtual ~MGroup();
72 
73  virtual void setId(long _id);
74  virtual void setGroupName(const std::string& _groupName);
75  virtual void setAllowedPools(const std::string& _allowedPools);
76  virtual void setAllowedTemplates(const std::string& _allowedTemplates);
77  virtual void setAllowedRights(unsigned long long _primaryRightsMask);
78  virtual void setAllowedInstances(int _allowedInstances);
79  virtual void setEnableHomeFolder(bool _enableHomeFolder);
80  virtual void setConstrainToHomeFolder(bool _contrainToHomeFolder);
81  virtual void setSubstitutionPaths(const std::string& _substitutionPaths);
82  virtual void setIsLdap(bool isLdap);
83 
84  virtual long getId();
85  virtual std::string getGroupName();
86  virtual std::string getAllowedPools();
87  virtual std::string getAllowedTemplates();
88  virtual unsigned long long getAllowedRights();
89  virtual int getAllowedInstances();
90  virtual bool getEnableHomeFolder();
91  virtual bool getConstrainToHomeFolder();
92  virtual std::string getSubstitutionPaths();
93  virtual bool getIsLdap();
94 
95  virtual bool Unmarshall(std::vector<std::string>& items);
96  virtual std::string Marshall();
97  };
98 
99 
100 }
101 
102 #endif