23 #ifdef MCLIENTLIB_EXPORTS
24 #define MCLIENTLIB_API __declspec(dllexport)
26 #define MCLIENTLIB_API __declspec(dllimport)
30 #ifndef MCLIENTLIB_EXPORTS
32 #define MCLIENTLIB_API
34 #define MCLIENTLIB_API
37 #define MCLIENTLIB_API
44 #pragma warning(disable: 4251)
51 namespace MClientLib {
58 static const unsigned long long kUserRightJobsManageSelf = 0x01ULL;
59 static const unsigned long long kUserRightJobsManageOthers = 0x02ULL;
60 static const unsigned long long kUserRightJobsChangePriority = 0x04ULL;
61 static const unsigned long long kUserRightJobsDeleteSelf = 0x08ULL;
62 static const unsigned long long kUserRightJobsDeleteOthers = 0x10ULL;
63 static const unsigned long long kUserRightJobsLockSelf = 0x20ULL;
64 static const unsigned long long kUserRightJobsLockOthers = 0x40ULL;
65 static const unsigned long long kUserRightNodesChangeStatus = 0x80ULL;
66 static const unsigned long long kUserRightNodesManageProcesses = 0x100ULL;
67 static const unsigned long long kUserRightNodesSetNotes = 0x200ULL;
68 static const unsigned long long kUserRightNodesManageLog = 0x400ULL;
69 static const unsigned long long kUserRightNodesManageExclusions = 0x800ULL;
70 static const unsigned long long kUserRightNodesSoftRestart = 0x2000ULL;
71 static const unsigned long long kUserRightNodesSendEvents = 0x4000ULL;
72 static const unsigned long long kUserRightNodesChangePriority = 0x8000ULL;
73 static const unsigned long long kUserRightNodesChangeConfig = 0x10000ULL;
74 static const unsigned long long kUserRightDispatcherChangeConfigs = 0x20000ULL;
75 static const unsigned long long kUserRightDispatcherChangeStatus = 0x30000ULL;
76 static const unsigned long long kUserRightDispatcherSoftRestart = 0x80000ULL;
77 static const unsigned long long kUserRightSendJobs = 0x100000ULL;
78 static const unsigned long long kUserRightClearLog = 0x200000ULL;
79 static const unsigned long long kUserRightChangeOwnPassword = 0x400000ULL;
80 static const unsigned long long kUserRightLoginEnabled = 0x800000ULL;
81 static const unsigned long long kUserRightWebLoginEnabled = 0x1000000ULL;
82 static const unsigned long long kUserRightManageJobsHistory = 0x2000000ULL;
83 static const unsigned long long kUserRightImportQueue = 0x4000000ULL;
84 static const unsigned long long kUserRightIsAdmin = 0x10000000ULL;
85 static const unsigned long long kUserRightArchiveJobsBelogingToSelf = 0x20000000ULL;
86 static const unsigned long long kUserRightArchiveJobsBelogingToOthers = 0x40000000ULL;
87 static const unsigned long long kUserRightExportQueue = 0x80000000ULL;
88 static const unsigned long long kUserRightReceiveCpuTraffic = 0x100000000ULL;
89 static const unsigned long long kUserRightReceiveCpuTrafficUpdates = 0x200000000ULL;
90 static const unsigned long long kUserRightReceiveJobsTraffic = 0x400000000ULL;
91 static const unsigned long long kUserRightReceiveJobsTrafficUpdatesForOwnJobs = 0x800000000ULL;
92 static const unsigned long long kUserRightReceiveJobsTrafficUpdatedForJobsBelongingToOthers = 0x1000000000ULL;
93 static const unsigned long long kUserRightReceiveChunksTraffic = 0x2000000000ULL;
94 static const unsigned long long kUserRightReceiveChunksTrafficForChunksBelogingToOthers = 0x4000000000ULL;
95 static const unsigned long long kUserRightReceiveChunksTrafficUpdatesForOwnChunks = 0x8000000000ULL;
96 static const unsigned long long kUserRightReceiveChunksTrafficUpdatesForChunksBelogingToOthers = 0x10000000000ULL;
97 static const unsigned long long kUserRightReceiveLogTraffic = 0x20000000000ULL;
98 static const unsigned long long kUserRightReceiveLogUpdates = 0x80000000000ULL;
99 static const unsigned long long kUserRightConfigureRepositories = 0x100000000000ULL;
100 static const unsigned long long kUserRightConfigureAccounts = 0x200000000000ULL;
101 static const unsigned long long kUserRightConfigurePools = 0x400000000000ULL;
102 static const unsigned long long kUserRightConfigureMails = 0x800000000000ULL;
103 static const unsigned long long kUserRightConfigureTemplates = 0x1000000000000ULL;
104 static const unsigned long long kUserRightSubmitScripts = 0x2000000000000ULL;
105 static const unsigned long long kUserRightFullRights = 0xFFFFFFFFFFFFFFFFULL;
107 static const unsigned long long kUserRightDefaultGroupRights =
108 kUserRightReceiveLogUpdates | kUserRightReceiveLogTraffic | kUserRightReceiveChunksTrafficUpdatesForChunksBelogingToOthers |
109 kUserRightReceiveChunksTrafficUpdatesForOwnChunks | kUserRightReceiveChunksTrafficForChunksBelogingToOthers |
110 kUserRightReceiveChunksTraffic | kUserRightReceiveJobsTrafficUpdatedForJobsBelongingToOthers | kUserRightReceiveJobsTrafficUpdatesForOwnJobs |
111 kUserRightReceiveJobsTrafficUpdatesForOwnJobs | kUserRightReceiveJobsTrafficUpdatesForOwnJobs | kUserRightReceiveJobsTraffic |
112 kUserRightReceiveCpuTrafficUpdates | kUserRightReceiveCpuTraffic | kUserRightArchiveJobsBelogingToSelf | kUserRightWebLoginEnabled |
113 kUserRightLoginEnabled | kUserRightChangeOwnPassword | kUserRightSendJobs | kUserRightJobsDeleteSelf | kUserRightJobsManageSelf ;
117 std::string accountName;
119 std::string allowedPools;
120 std::string allowedTemplates;
121 std::string emailAddress;
122 std::string encodedPassword;
123 unsigned long long allowedRights;
124 unsigned long long forbiddenRights;
125 int allowedInstances;
127 bool constrainToHomeFolder;
128 std::string substitutionPaths;
135 virtual void setId(
long _id);
136 virtual void setAccountName(
const std::string& _accountName);
137 virtual void setGroups(
const std::string& _groups);
138 virtual void setEncodedPassword(
const std::string& _encodedPassword);
139 virtual void setAllowedPools(
const std::string& _allowedPools);
140 virtual void setAllowedTemplates(
const std::string& _allowedTemplates);
141 virtual void setAllowedRights(
unsigned long long _rightsMask);
142 virtual void setForbiddenRights(
unsigned long long _rightsMask);
143 virtual void setAllowedInstances(
int _allowedInstances);
144 virtual void setHomeFolderID(
long _homeFolderID);
145 virtual void setConstrainToHomeFolder(
bool _contrainToHomeFolder);
146 virtual void setSubstitutionPaths(
const std::string& _substitutionPaths);
147 virtual void setEMailAddress(
const std::string& _emailAddress);
148 virtual void setIsLdap(
bool _isLDAP);
150 virtual long getId();
151 virtual std::string getAccountName();
152 virtual std::string getGroups();
153 virtual std::string getAllowedPools();
154 virtual std::string getAllowedTemplates();
155 virtual int getAllowedInstances();
156 virtual long getHomeFolderID();
157 virtual bool getConstrainToHomeFolder();
158 virtual std::string getSubstitutionPaths();
159 virtual unsigned long long getAllowedRights();
160 virtual unsigned long long getForbiddenRights();
161 virtual std::string getEMailAddress();
162 virtual bool getIsLdap();
163 virtual std::string getEncodedPassword();
165 virtual bool Unmarshall(
const std::vector<std::string>& items);
166 virtual std::string Marshall();
168 void castedRelease();