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 kUserRightFullRights = 0xFFFFFFFFFFFFFFFFULL;
106 static const unsigned long long kUserRightDefaultGroupRights =
107 kUserRightReceiveLogUpdates | kUserRightReceiveLogTraffic | kUserRightReceiveChunksTrafficUpdatesForChunksBelogingToOthers |
108 kUserRightReceiveChunksTrafficUpdatesForOwnChunks | kUserRightReceiveChunksTrafficForChunksBelogingToOthers |
109 kUserRightReceiveChunksTraffic | kUserRightReceiveJobsTrafficUpdatedForJobsBelongingToOthers | kUserRightReceiveJobsTrafficUpdatesForOwnJobs |
110 kUserRightReceiveJobsTrafficUpdatesForOwnJobs | kUserRightReceiveJobsTrafficUpdatesForOwnJobs | kUserRightReceiveJobsTraffic |
111 kUserRightReceiveCpuTrafficUpdates | kUserRightReceiveCpuTraffic | kUserRightArchiveJobsBelogingToSelf | kUserRightWebLoginEnabled |
112 kUserRightLoginEnabled | kUserRightChangeOwnPassword | kUserRightSendJobs | kUserRightJobsDeleteSelf | kUserRightJobsManageSelf;
116 std::string accountName;
118 std::string allowedPools;
119 std::string allowedTemplates;
120 std::string emailAddress;
121 std::string encodedPassword;
122 unsigned long long allowedRights;
123 unsigned long long forbiddenRights;
124 int allowedInstances;
126 bool constrainToHomeFolder;
127 std::string substitutionPaths;
134 virtual void setId(
long _id);
135 virtual void setAccountName(
const std::string& _accountName);
136 virtual void setGroups(
const std::string& _groups);
137 virtual void setEncodedPassword(
const std::string& _encodedPassword);
138 virtual void setAllowedPools(
const std::string& _allowedPools);
139 virtual void setAllowedTemplates(
const std::string& _allowedTemplates);
140 virtual void setAllowedRights(
unsigned long long _primaryRightsMask);
141 virtual void setForbiddenRights(
unsigned long long _primaryRightsMask);
142 virtual void setAllowedInstances(
int _allowedInstances);
143 virtual void setHomeFolderID(
long _homeFolderID);
144 virtual void setConstrainToHomeFolder(
bool _contrainToHomeFolder);
145 virtual void setSubstitutionPaths(
const std::string& _substitutionPaths);
146 virtual void setEMailAddress(
const std::string& _emailAddress);
147 virtual void setIsLdap(
bool _isLDAP);
149 virtual long getId();
150 virtual std::string getAccountName();
151 virtual std::string getGroups();
152 virtual std::string getAllowedPools();
153 virtual std::string getAllowedTemplates();
154 virtual int getAllowedInstances();
155 virtual long getHomeFolderID();
156 virtual bool getConstrainToHomeFolder();
157 virtual std::string getSubstitutionPaths();
158 virtual unsigned long long getAllowedRights();
159 virtual unsigned long long getForbiddenRights();
160 virtual std::string getEMailAddress();
161 virtual bool getIsLdap();
162 virtual std::string getEncodedPassword();
164 virtual bool Unmarshall(std::vector<std::string>& items);
165 virtual std::string Marshall();