/Servidor/Win32/Debug/proxy/objectivec_ios42/Proxy/DSAdmin.m

https://bitbucket.org/danielsantb/aula-datasnap-e-aurelius · Objective C · 719 lines · 451 code · 138 blank · 130 comment · 1 complexity · c79885a0a344de5c723df3ba73164c49 MD5 · raw file

  1. //*******************************************************
  2. //
  3. // Delphi DataSnap Framework
  4. //
  5. // Copyright(c) 1995-2011 Embarcadero Technologies, Inc.
  6. //
  7. //*******************************************************
  8. #import "DSAdmin.h"
  9. #import "DSRESTParameterMetaData.h"
  10. @implementation DSAdmin
  11. @synthesize Connection;
  12. -(id) initWithConnection:(DSRESTConnection *) aConnection {
  13. self = [self init];
  14. if (self) {
  15. self.Connection =aConnection ;
  16. }
  17. return self;
  18. }
  19. -(id) getDSAdmin_GetPlatformName {
  20. return [NSArray arrayWithObjects:
  21. [DSRESTParameterMetaData parameterWithName: @"" withDirection:ReturnValue withDBXType:WideStringType withTypeName:@"string"],
  22. nil];
  23. }
  24. -(id) getDSAdmin_ClearResources {
  25. return [NSArray arrayWithObjects:
  26. [DSRESTParameterMetaData parameterWithName: @"" withDirection:ReturnValue withDBXType:BooleanType withTypeName:@"Boolean"],
  27. nil];
  28. }
  29. -(id) getDSAdmin_FindPackages {
  30. return [NSArray arrayWithObjects:
  31. [DSRESTParameterMetaData parameterWithName: @"" withDirection:ReturnValue withDBXType:TableType withTypeName:@"TDBXReader"],
  32. nil];
  33. }
  34. -(id) getDSAdmin_FindClasses {
  35. return [NSArray arrayWithObjects:
  36. [DSRESTParameterMetaData parameterWithName: @"PackageName" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  37. [DSRESTParameterMetaData parameterWithName: @"ClassPattern" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  38. [DSRESTParameterMetaData parameterWithName: @"" withDirection:ReturnValue withDBXType:TableType withTypeName:@"TDBXReader"],
  39. nil];
  40. }
  41. -(id) getDSAdmin_FindMethods {
  42. return [NSArray arrayWithObjects:
  43. [DSRESTParameterMetaData parameterWithName: @"PackageName" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  44. [DSRESTParameterMetaData parameterWithName: @"ClassPattern" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  45. [DSRESTParameterMetaData parameterWithName: @"MethodPattern" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  46. [DSRESTParameterMetaData parameterWithName: @"" withDirection:ReturnValue withDBXType:TableType withTypeName:@"TDBXReader"],
  47. nil];
  48. }
  49. -(id) getDSAdmin_CreateServerClasses {
  50. return [NSArray arrayWithObjects:
  51. [DSRESTParameterMetaData parameterWithName: @"ClassReader" withDirection:Input withDBXType:TableType withTypeName:@"TDBXReader"],
  52. nil];
  53. }
  54. -(id) getDSAdmin_DropServerClasses {
  55. return [NSArray arrayWithObjects:
  56. [DSRESTParameterMetaData parameterWithName: @"ClassReader" withDirection:Input withDBXType:TableType withTypeName:@"TDBXReader"],
  57. nil];
  58. }
  59. -(id) getDSAdmin_CreateServerMethods {
  60. return [NSArray arrayWithObjects:
  61. [DSRESTParameterMetaData parameterWithName: @"MethodReader" withDirection:Input withDBXType:TableType withTypeName:@"TDBXReader"],
  62. nil];
  63. }
  64. -(id) getDSAdmin_DropServerMethods {
  65. return [NSArray arrayWithObjects:
  66. [DSRESTParameterMetaData parameterWithName: @"MethodReader" withDirection:Input withDBXType:TableType withTypeName:@"TDBXReader"],
  67. nil];
  68. }
  69. -(id) getDSAdmin_GetServerClasses {
  70. return [NSArray arrayWithObjects:
  71. [DSRESTParameterMetaData parameterWithName: @"" withDirection:ReturnValue withDBXType:TableType withTypeName:@"TDBXReader"],
  72. nil];
  73. }
  74. -(id) getDSAdmin_ListClasses {
  75. return [NSArray arrayWithObjects:
  76. [DSRESTParameterMetaData parameterWithName: @"" withDirection:ReturnValue withDBXType:JsonValueType withTypeName:@"TJSONArray"],
  77. nil];
  78. }
  79. -(id) getDSAdmin_DescribeClass {
  80. return [NSArray arrayWithObjects:
  81. [DSRESTParameterMetaData parameterWithName: @"ClassName" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  82. [DSRESTParameterMetaData parameterWithName: @"" withDirection:ReturnValue withDBXType:JsonValueType withTypeName:@"TJSONObject"],
  83. nil];
  84. }
  85. -(id) getDSAdmin_ListMethods {
  86. return [NSArray arrayWithObjects:
  87. [DSRESTParameterMetaData parameterWithName: @"ClassName" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  88. [DSRESTParameterMetaData parameterWithName: @"" withDirection:ReturnValue withDBXType:JsonValueType withTypeName:@"TJSONArray"],
  89. nil];
  90. }
  91. -(id) getDSAdmin_DescribeMethod {
  92. return [NSArray arrayWithObjects:
  93. [DSRESTParameterMetaData parameterWithName: @"ServerMethodName" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  94. [DSRESTParameterMetaData parameterWithName: @"" withDirection:ReturnValue withDBXType:JsonValueType withTypeName:@"TJSONObject"],
  95. nil];
  96. }
  97. -(id) getDSAdmin_GetServerMethods {
  98. return [NSArray arrayWithObjects:
  99. [DSRESTParameterMetaData parameterWithName: @"" withDirection:ReturnValue withDBXType:TableType withTypeName:@"TDBXReader"],
  100. nil];
  101. }
  102. -(id) getDSAdmin_GetServerMethodParameters {
  103. return [NSArray arrayWithObjects:
  104. [DSRESTParameterMetaData parameterWithName: @"" withDirection:ReturnValue withDBXType:TableType withTypeName:@"TDBXReader"],
  105. nil];
  106. }
  107. -(id) getDSAdmin_GetDatabaseConnectionProperties {
  108. return [NSArray arrayWithObjects:
  109. [DSRESTParameterMetaData parameterWithName: @"" withDirection:ReturnValue withDBXType:TableType withTypeName:@"TDBXReader"],
  110. nil];
  111. }
  112. -(id) getDSAdmin_GetDSServerName {
  113. return [NSArray arrayWithObjects:
  114. [DSRESTParameterMetaData parameterWithName: @"" withDirection:ReturnValue withDBXType:WideStringType withTypeName:@"string"],
  115. nil];
  116. }
  117. -(id) getDSAdmin_ConsumeClientChannel {
  118. return [NSArray arrayWithObjects:
  119. [DSRESTParameterMetaData parameterWithName: @"ChannelName" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  120. [DSRESTParameterMetaData parameterWithName: @"ClientManagerId" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  121. [DSRESTParameterMetaData parameterWithName: @"CallbackId" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  122. [DSRESTParameterMetaData parameterWithName: @"ChannelNames" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  123. [DSRESTParameterMetaData parameterWithName: @"SecurityToken" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  124. [DSRESTParameterMetaData parameterWithName: @"ResponseData" withDirection:Input withDBXType:JsonValueType withTypeName:@"TJSONValue"],
  125. [DSRESTParameterMetaData parameterWithName: @"" withDirection:ReturnValue withDBXType:JsonValueType withTypeName:@"TJSONValue"],
  126. nil];
  127. }
  128. -(id) getDSAdmin_ConsumeClientChannelTimeout {
  129. return [NSArray arrayWithObjects:
  130. [DSRESTParameterMetaData parameterWithName: @"ChannelName" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  131. [DSRESTParameterMetaData parameterWithName: @"ClientManagerId" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  132. [DSRESTParameterMetaData parameterWithName: @"CallbackId" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  133. [DSRESTParameterMetaData parameterWithName: @"ChannelNames" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  134. [DSRESTParameterMetaData parameterWithName: @"SecurityToken" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  135. [DSRESTParameterMetaData parameterWithName: @"Timeout" withDirection:Input withDBXType:Int32Type withTypeName:@"Integer"],
  136. [DSRESTParameterMetaData parameterWithName: @"ResponseData" withDirection:Input withDBXType:JsonValueType withTypeName:@"TJSONValue"],
  137. [DSRESTParameterMetaData parameterWithName: @"" withDirection:ReturnValue withDBXType:JsonValueType withTypeName:@"TJSONValue"],
  138. nil];
  139. }
  140. -(id) getDSAdmin_CloseClientChannel {
  141. return [NSArray arrayWithObjects:
  142. [DSRESTParameterMetaData parameterWithName: @"ChannelId" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  143. [DSRESTParameterMetaData parameterWithName: @"SecurityToken" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  144. [DSRESTParameterMetaData parameterWithName: @"" withDirection:ReturnValue withDBXType:BooleanType withTypeName:@"Boolean"],
  145. nil];
  146. }
  147. -(id) getDSAdmin_RegisterClientCallbackServer {
  148. return [NSArray arrayWithObjects:
  149. [DSRESTParameterMetaData parameterWithName: @"ChannelId" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  150. [DSRESTParameterMetaData parameterWithName: @"CallbackId" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  151. [DSRESTParameterMetaData parameterWithName: @"ChannelNames" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  152. [DSRESTParameterMetaData parameterWithName: @"SecurityToken" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  153. [DSRESTParameterMetaData parameterWithName: @"" withDirection:ReturnValue withDBXType:BooleanType withTypeName:@"Boolean"],
  154. nil];
  155. }
  156. -(id) getDSAdmin_UnregisterClientCallback {
  157. return [NSArray arrayWithObjects:
  158. [DSRESTParameterMetaData parameterWithName: @"ChannelId" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  159. [DSRESTParameterMetaData parameterWithName: @"CallbackId" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  160. [DSRESTParameterMetaData parameterWithName: @"SecurityToken" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  161. [DSRESTParameterMetaData parameterWithName: @"" withDirection:ReturnValue withDBXType:BooleanType withTypeName:@"Boolean"],
  162. nil];
  163. }
  164. -(id) getDSAdmin_BroadcastToChannel {
  165. return [NSArray arrayWithObjects:
  166. [DSRESTParameterMetaData parameterWithName: @"ChannelName" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  167. [DSRESTParameterMetaData parameterWithName: @"Msg" withDirection:Input withDBXType:JsonValueType withTypeName:@"TJSONValue"],
  168. [DSRESTParameterMetaData parameterWithName: @"" withDirection:ReturnValue withDBXType:BooleanType withTypeName:@"Boolean"],
  169. nil];
  170. }
  171. -(id) getDSAdmin_BroadcastObjectToChannel {
  172. return [NSArray arrayWithObjects:
  173. [DSRESTParameterMetaData parameterWithName: @"ChannelName" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  174. [DSRESTParameterMetaData parameterWithName: @"Msg" withDirection:Input withDBXType:JsonValueType withTypeName:@"TObject"],
  175. [DSRESTParameterMetaData parameterWithName: @"" withDirection:ReturnValue withDBXType:BooleanType withTypeName:@"Boolean"],
  176. nil];
  177. }
  178. -(id) getDSAdmin_NotifyCallback {
  179. return [NSArray arrayWithObjects:
  180. [DSRESTParameterMetaData parameterWithName: @"ClientId" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  181. [DSRESTParameterMetaData parameterWithName: @"CallbackId" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  182. [DSRESTParameterMetaData parameterWithName: @"Msg" withDirection:Input withDBXType:JsonValueType withTypeName:@"TJSONValue"],
  183. [DSRESTParameterMetaData parameterWithName: @"Response" withDirection:Output withDBXType:JsonValueType withTypeName:@"TJSONValue"],
  184. [DSRESTParameterMetaData parameterWithName: @"" withDirection:ReturnValue withDBXType:BooleanType withTypeName:@"Boolean"],
  185. nil];
  186. }
  187. -(id) getDSAdmin_NotifyObject {
  188. return [NSArray arrayWithObjects:
  189. [DSRESTParameterMetaData parameterWithName: @"ClientId" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  190. [DSRESTParameterMetaData parameterWithName: @"CallbackId" withDirection:Input withDBXType:WideStringType withTypeName:@"string"],
  191. [DSRESTParameterMetaData parameterWithName: @"Msg" withDirection:Input withDBXType:JsonValueType withTypeName:@"TObject"],
  192. [DSRESTParameterMetaData parameterWithName: @"Response" withDirection:Output withDBXType:JsonValueType withTypeName:@"TObject"],
  193. [DSRESTParameterMetaData parameterWithName: @"" withDirection:ReturnValue withDBXType:BooleanType withTypeName:@"Boolean"],
  194. nil];
  195. }
  196. -(void) dealloc {
  197. [Connection release];
  198. [super dealloc];
  199. }
  200. /**
  201. * @return result - Type on server: string
  202. */
  203. -(NSString *) GetPlatformName{
  204. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  205. cmd.RequestType = GET;
  206. cmd.text= @"DSAdmin.GetPlatformName";
  207. [cmd prepare:[self getDSAdmin_GetPlatformName]];
  208. [Connection execute: cmd];
  209. return [[[cmd.parameters objectAtIndex:0]getValue]GetAsString];
  210. }
  211. /**
  212. * @return result - Type on server: Boolean
  213. */
  214. -(bool) ClearResources{
  215. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  216. cmd.RequestType = GET;
  217. cmd.text= @"DSAdmin.ClearResources";
  218. [cmd prepare:[self getDSAdmin_ClearResources]];
  219. [Connection execute: cmd];
  220. return [[[cmd.parameters objectAtIndex:0]getValue]GetAsBoolean];
  221. }
  222. /**
  223. * @return result - Type on server: TDBXReader
  224. */
  225. -(TDBXReader*) FindPackages{
  226. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  227. cmd.RequestType = GET;
  228. cmd.text= @"DSAdmin.FindPackages";
  229. [cmd prepare:[self getDSAdmin_FindPackages]];
  230. [Connection execute: cmd];
  231. return (TDBXReader*)[[[cmd.parameters objectAtIndex:0]getValue]GetAsTable];
  232. }
  233. /**
  234. * @param PackageName [in] - Type on server: string
  235. * @param ClassPattern [in] - Type on server: string
  236. * @return result - Type on server: TDBXReader
  237. */
  238. -(TDBXReader*) FindClasses: (NSString *) packagename withClassPattern: (NSString *) classpattern{
  239. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  240. cmd.RequestType = GET;
  241. cmd.text= @"DSAdmin.FindClasses";
  242. [cmd prepare:[self getDSAdmin_FindClasses]];
  243. [[[cmd.parameters objectAtIndex:0]getValue]SetAsString:packagename];
  244. [[[cmd.parameters objectAtIndex:1]getValue]SetAsString:classpattern];
  245. [Connection execute: cmd];
  246. return (TDBXReader*)[[[cmd.parameters objectAtIndex:2]getValue]GetAsTable];
  247. }
  248. /**
  249. * @param PackageName [in] - Type on server: string
  250. * @param ClassPattern [in] - Type on server: string
  251. * @param MethodPattern [in] - Type on server: string
  252. * @return result - Type on server: TDBXReader
  253. */
  254. -(TDBXReader*) FindMethods: (NSString *) packagename withClassPattern: (NSString *) classpattern withMethodPattern: (NSString *) methodpattern{
  255. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  256. cmd.RequestType = GET;
  257. cmd.text= @"DSAdmin.FindMethods";
  258. [cmd prepare:[self getDSAdmin_FindMethods]];
  259. [[[cmd.parameters objectAtIndex:0]getValue]SetAsString:packagename];
  260. [[[cmd.parameters objectAtIndex:1]getValue]SetAsString:classpattern];
  261. [[[cmd.parameters objectAtIndex:2]getValue]SetAsString:methodpattern];
  262. [Connection execute: cmd];
  263. return (TDBXReader*)[[[cmd.parameters objectAtIndex:3]getValue]GetAsTable];
  264. }
  265. /**
  266. * @param ClassReader [in] - Type on server: TDBXReader
  267. */
  268. -(void) CreateServerClasses: (TDBXReader*) classreader {
  269. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  270. cmd.RequestType = POST;
  271. cmd.text= @"DSAdmin.CreateServerClasses";
  272. [cmd prepare:[self getDSAdmin_CreateServerClasses]];
  273. [[[cmd.parameters objectAtIndex:0]getValue]SetAsTable:classreader];
  274. [Connection execute: cmd];
  275. }
  276. /**
  277. * @param ClassReader [in] - Type on server: TDBXReader
  278. */
  279. -(void) DropServerClasses: (TDBXReader*) classreader {
  280. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  281. cmd.RequestType = POST;
  282. cmd.text= @"DSAdmin.DropServerClasses";
  283. [cmd prepare:[self getDSAdmin_DropServerClasses]];
  284. [[[cmd.parameters objectAtIndex:0]getValue]SetAsTable:classreader];
  285. [Connection execute: cmd];
  286. }
  287. /**
  288. * @param MethodReader [in] - Type on server: TDBXReader
  289. */
  290. -(void) CreateServerMethods: (TDBXReader*) methodreader {
  291. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  292. cmd.RequestType = POST;
  293. cmd.text= @"DSAdmin.CreateServerMethods";
  294. [cmd prepare:[self getDSAdmin_CreateServerMethods]];
  295. [[[cmd.parameters objectAtIndex:0]getValue]SetAsTable:methodreader];
  296. [Connection execute: cmd];
  297. }
  298. /**
  299. * @param MethodReader [in] - Type on server: TDBXReader
  300. */
  301. -(void) DropServerMethods: (TDBXReader*) methodreader {
  302. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  303. cmd.RequestType = POST;
  304. cmd.text= @"DSAdmin.DropServerMethods";
  305. [cmd prepare:[self getDSAdmin_DropServerMethods]];
  306. [[[cmd.parameters objectAtIndex:0]getValue]SetAsTable:methodreader];
  307. [Connection execute: cmd];
  308. }
  309. /**
  310. * @return result - Type on server: TDBXReader
  311. */
  312. -(TDBXReader*) GetServerClasses{
  313. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  314. cmd.RequestType = GET;
  315. cmd.text= @"DSAdmin.GetServerClasses";
  316. [cmd prepare:[self getDSAdmin_GetServerClasses]];
  317. [Connection execute: cmd];
  318. return (TDBXReader*)[[[cmd.parameters objectAtIndex:0]getValue]GetAsTable];
  319. }
  320. /**
  321. * @return result - Type on server: TJSONArray
  322. */
  323. -(TJSONArray *) ListClasses{
  324. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  325. cmd.RequestType = GET;
  326. cmd.text= @"DSAdmin.ListClasses";
  327. [cmd prepare:[self getDSAdmin_ListClasses]];
  328. [Connection execute: cmd];
  329. return (TJSONArray *)[[[cmd.parameters objectAtIndex:0]getValue]GetAsJSONValue];
  330. }
  331. /**
  332. * @param ClassName [in] - Type on server: string
  333. * @return result - Type on server: TJSONObject
  334. */
  335. -(TJSONObject *) DescribeClass: (NSString *) classname {
  336. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  337. cmd.RequestType = GET;
  338. cmd.text= @"DSAdmin.DescribeClass";
  339. [cmd prepare:[self getDSAdmin_DescribeClass]];
  340. [[[cmd.parameters objectAtIndex:0]getValue]SetAsString:classname];
  341. [Connection execute: cmd];
  342. return (TJSONObject *)[[[cmd.parameters objectAtIndex:1]getValue]GetAsJSONValue];
  343. }
  344. /**
  345. * @param ClassName [in] - Type on server: string
  346. * @return result - Type on server: TJSONArray
  347. */
  348. -(TJSONArray *) ListMethods: (NSString *) classname {
  349. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  350. cmd.RequestType = GET;
  351. cmd.text= @"DSAdmin.ListMethods";
  352. [cmd prepare:[self getDSAdmin_ListMethods]];
  353. [[[cmd.parameters objectAtIndex:0]getValue]SetAsString:classname];
  354. [Connection execute: cmd];
  355. return (TJSONArray *)[[[cmd.parameters objectAtIndex:1]getValue]GetAsJSONValue];
  356. }
  357. /**
  358. * @param ServerMethodName [in] - Type on server: string
  359. * @return result - Type on server: TJSONObject
  360. */
  361. -(TJSONObject *) DescribeMethod: (NSString *) servermethodname {
  362. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  363. cmd.RequestType = GET;
  364. cmd.text= @"DSAdmin.DescribeMethod";
  365. [cmd prepare:[self getDSAdmin_DescribeMethod]];
  366. [[[cmd.parameters objectAtIndex:0]getValue]SetAsString:servermethodname];
  367. [Connection execute: cmd];
  368. return (TJSONObject *)[[[cmd.parameters objectAtIndex:1]getValue]GetAsJSONValue];
  369. }
  370. /**
  371. * @return result - Type on server: TDBXReader
  372. */
  373. -(TDBXReader*) GetServerMethods{
  374. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  375. cmd.RequestType = GET;
  376. cmd.text= @"DSAdmin.GetServerMethods";
  377. [cmd prepare:[self getDSAdmin_GetServerMethods]];
  378. [Connection execute: cmd];
  379. return (TDBXReader*)[[[cmd.parameters objectAtIndex:0]getValue]GetAsTable];
  380. }
  381. /**
  382. * @return result - Type on server: TDBXReader
  383. */
  384. -(TDBXReader*) GetServerMethodParameters{
  385. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  386. cmd.RequestType = GET;
  387. cmd.text= @"DSAdmin.GetServerMethodParameters";
  388. [cmd prepare:[self getDSAdmin_GetServerMethodParameters]];
  389. [Connection execute: cmd];
  390. return (TDBXReader*)[[[cmd.parameters objectAtIndex:0]getValue]GetAsTable];
  391. }
  392. /**
  393. * @return result - Type on server: TDBXReader
  394. */
  395. -(TDBXReader*) GetDatabaseConnectionProperties{
  396. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  397. cmd.RequestType = GET;
  398. cmd.text= @"DSAdmin.GetDatabaseConnectionProperties";
  399. [cmd prepare:[self getDSAdmin_GetDatabaseConnectionProperties]];
  400. [Connection execute: cmd];
  401. return (TDBXReader*)[[[cmd.parameters objectAtIndex:0]getValue]GetAsTable];
  402. }
  403. /**
  404. * @return result - Type on server: string
  405. */
  406. -(NSString *) GetDSServerName{
  407. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  408. cmd.RequestType = GET;
  409. cmd.text= @"DSAdmin.GetDSServerName";
  410. [cmd prepare:[self getDSAdmin_GetDSServerName]];
  411. [Connection execute: cmd];
  412. return [[[cmd.parameters objectAtIndex:0]getValue]GetAsString];
  413. }
  414. /**
  415. * @param ChannelName [in] - Type on server: string
  416. * @param ClientManagerId [in] - Type on server: string
  417. * @param CallbackId [in] - Type on server: string
  418. * @param ChannelNames [in] - Type on server: string
  419. * @param SecurityToken [in] - Type on server: string
  420. * @param ResponseData [in] - Type on server: TJSONValue
  421. * @return result - Type on server: TJSONValue
  422. */
  423. -(TJSONValue *) ConsumeClientChannel: (NSString *) channelname withClientManagerId: (NSString *) clientmanagerid withCallbackId: (NSString *) callbackid withChannelNames: (NSString *) channelnames withSecurityToken: (NSString *) securitytoken withResponseData: (TJSONValue *) responsedata{
  424. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  425. cmd.RequestType = POST;
  426. cmd.text= @"DSAdmin.ConsumeClientChannel";
  427. [cmd prepare:[self getDSAdmin_ConsumeClientChannel]];
  428. [[[cmd.parameters objectAtIndex:0]getValue]SetAsString:channelname];
  429. [[[cmd.parameters objectAtIndex:1]getValue]SetAsString:clientmanagerid];
  430. [[[cmd.parameters objectAtIndex:2]getValue]SetAsString:callbackid];
  431. [[[cmd.parameters objectAtIndex:3]getValue]SetAsString:channelnames];
  432. [[[cmd.parameters objectAtIndex:4]getValue]SetAsString:securitytoken];
  433. [[[cmd.parameters objectAtIndex:5]getValue]SetAsJSONValue:responsedata];
  434. [Connection execute: cmd];
  435. return (TJSONValue *)[[[cmd.parameters objectAtIndex:6]getValue]GetAsJSONValue];
  436. }
  437. /**
  438. * @param ChannelName [in] - Type on server: string
  439. * @param ClientManagerId [in] - Type on server: string
  440. * @param CallbackId [in] - Type on server: string
  441. * @param ChannelNames [in] - Type on server: string
  442. * @param SecurityToken [in] - Type on server: string
  443. * @param Timeout [in] - Type on server: Integer
  444. * @param ResponseData [in] - Type on server: TJSONValue
  445. * @return result - Type on server: TJSONValue
  446. */
  447. -(TJSONValue *) ConsumeClientChannelTimeout: (NSString *) channelname withClientManagerId: (NSString *) clientmanagerid withCallbackId: (NSString *) callbackid withChannelNames: (NSString *) channelnames withSecurityToken: (NSString *) securitytoken withTimeout: (long) timeout withResponseData: (TJSONValue *) responsedata{
  448. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  449. cmd.RequestType = POST;
  450. cmd.text= @"DSAdmin.ConsumeClientChannelTimeout";
  451. [cmd prepare:[self getDSAdmin_ConsumeClientChannelTimeout]];
  452. [[[cmd.parameters objectAtIndex:0]getValue]SetAsString:channelname];
  453. [[[cmd.parameters objectAtIndex:1]getValue]SetAsString:clientmanagerid];
  454. [[[cmd.parameters objectAtIndex:2]getValue]SetAsString:callbackid];
  455. [[[cmd.parameters objectAtIndex:3]getValue]SetAsString:channelnames];
  456. [[[cmd.parameters objectAtIndex:4]getValue]SetAsString:securitytoken];
  457. [[[cmd.parameters objectAtIndex:5]getValue]SetAsInt32:timeout];
  458. [[[cmd.parameters objectAtIndex:6]getValue]SetAsJSONValue:responsedata];
  459. [Connection execute: cmd];
  460. return (TJSONValue *)[[[cmd.parameters objectAtIndex:7]getValue]GetAsJSONValue];
  461. }
  462. /**
  463. * @param ChannelId [in] - Type on server: string
  464. * @param SecurityToken [in] - Type on server: string
  465. * @return result - Type on server: Boolean
  466. */
  467. -(bool) CloseClientChannel: (NSString *) channelid withSecurityToken: (NSString *) securitytoken{
  468. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  469. cmd.RequestType = GET;
  470. cmd.text= @"DSAdmin.CloseClientChannel";
  471. [cmd prepare:[self getDSAdmin_CloseClientChannel]];
  472. [[[cmd.parameters objectAtIndex:0]getValue]SetAsString:channelid];
  473. [[[cmd.parameters objectAtIndex:1]getValue]SetAsString:securitytoken];
  474. [Connection execute: cmd];
  475. return [[[cmd.parameters objectAtIndex:2]getValue]GetAsBoolean];
  476. }
  477. /**
  478. * @param ChannelId [in] - Type on server: string
  479. * @param CallbackId [in] - Type on server: string
  480. * @param ChannelNames [in] - Type on server: string
  481. * @param SecurityToken [in] - Type on server: string
  482. * @return result - Type on server: Boolean
  483. */
  484. -(bool) RegisterClientCallbackServer: (NSString *) channelid withCallbackId: (NSString *) callbackid withChannelNames: (NSString *) channelnames withSecurityToken: (NSString *) securitytoken{
  485. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  486. cmd.RequestType = GET;
  487. cmd.text= @"DSAdmin.RegisterClientCallbackServer";
  488. [cmd prepare:[self getDSAdmin_RegisterClientCallbackServer]];
  489. [[[cmd.parameters objectAtIndex:0]getValue]SetAsString:channelid];
  490. [[[cmd.parameters objectAtIndex:1]getValue]SetAsString:callbackid];
  491. [[[cmd.parameters objectAtIndex:2]getValue]SetAsString:channelnames];
  492. [[[cmd.parameters objectAtIndex:3]getValue]SetAsString:securitytoken];
  493. [Connection execute: cmd];
  494. return [[[cmd.parameters objectAtIndex:4]getValue]GetAsBoolean];
  495. }
  496. /**
  497. * @param ChannelId [in] - Type on server: string
  498. * @param CallbackId [in] - Type on server: string
  499. * @param SecurityToken [in] - Type on server: string
  500. * @return result - Type on server: Boolean
  501. */
  502. -(bool) UnregisterClientCallback: (NSString *) channelid withCallbackId: (NSString *) callbackid withSecurityToken: (NSString *) securitytoken{
  503. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  504. cmd.RequestType = GET;
  505. cmd.text= @"DSAdmin.UnregisterClientCallback";
  506. [cmd prepare:[self getDSAdmin_UnregisterClientCallback]];
  507. [[[cmd.parameters objectAtIndex:0]getValue]SetAsString:channelid];
  508. [[[cmd.parameters objectAtIndex:1]getValue]SetAsString:callbackid];
  509. [[[cmd.parameters objectAtIndex:2]getValue]SetAsString:securitytoken];
  510. [Connection execute: cmd];
  511. return [[[cmd.parameters objectAtIndex:3]getValue]GetAsBoolean];
  512. }
  513. /**
  514. * @param ChannelName [in] - Type on server: string
  515. * @param Msg [in] - Type on server: TJSONValue
  516. * @return result - Type on server: Boolean
  517. */
  518. -(bool) BroadcastToChannel: (NSString *) channelname withMsg: (TJSONValue *) msg{
  519. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  520. cmd.RequestType = POST;
  521. cmd.text= @"DSAdmin.BroadcastToChannel";
  522. [cmd prepare:[self getDSAdmin_BroadcastToChannel]];
  523. [[[cmd.parameters objectAtIndex:0]getValue]SetAsString:channelname];
  524. [[[cmd.parameters objectAtIndex:1]getValue]SetAsJSONValue:msg];
  525. [Connection execute: cmd];
  526. return [[[cmd.parameters objectAtIndex:2]getValue]GetAsBoolean];
  527. }
  528. /**
  529. * @param ChannelName [in] - Type on server: string
  530. * @param Msg [in] - Type on server: TObject
  531. * @return result - Type on server: Boolean
  532. */
  533. -(bool) BroadcastObjectToChannel: (NSString *) channelname withMsg: (TJSONObject *) msg{
  534. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  535. cmd.RequestType = POST;
  536. cmd.text= @"DSAdmin.BroadcastObjectToChannel";
  537. [cmd prepare:[self getDSAdmin_BroadcastObjectToChannel]];
  538. [[[cmd.parameters objectAtIndex:0]getValue]SetAsString:channelname];
  539. [[[cmd.parameters objectAtIndex:1]getValue]SetAsJSONValue:msg];
  540. [Connection execute: cmd];
  541. return [[[cmd.parameters objectAtIndex:2]getValue]GetAsBoolean];
  542. }
  543. /**
  544. * @param ClientId [in] - Type on server: string
  545. * @param CallbackId [in] - Type on server: string
  546. * @param Msg [in] - Type on server: TJSONValue
  547. * @param Response [out] - Type on server: TJSONValue
  548. * @return result - Type on server: Boolean
  549. */
  550. -(bool) NotifyCallback: (NSString *) clientid withCallbackId: (NSString *) callbackid withMsg: (TJSONValue *) msg withResponse: (out TJSONValue **) response{
  551. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  552. cmd.RequestType = POST;
  553. cmd.text= @"DSAdmin.NotifyCallback";
  554. [cmd prepare:[self getDSAdmin_NotifyCallback]];
  555. [[[cmd.parameters objectAtIndex:0]getValue]SetAsString:clientid];
  556. [[[cmd.parameters objectAtIndex:1]getValue]SetAsString:callbackid];
  557. [[[cmd.parameters objectAtIndex:2]getValue]SetAsJSONValue:msg];
  558. [Connection execute: cmd];
  559. *response = (TJSONValue *) [[[cmd.parameters objectAtIndex:3]getValue]GetAsJSONValue];
  560. return [[[cmd.parameters objectAtIndex:4]getValue]GetAsBoolean];
  561. }
  562. /**
  563. * @param ClientId [in] - Type on server: string
  564. * @param CallbackId [in] - Type on server: string
  565. * @param Msg [in] - Type on server: TObject
  566. * @param Response [out] - Type on server: TObject
  567. * @return result - Type on server: Boolean
  568. */
  569. -(bool) NotifyObject: (NSString *) clientid withCallbackId: (NSString *) callbackid withMsg: (TJSONObject *) msg withResponse: (out TJSONObject **) response{
  570. DSRESTCommand * cmd = [[self Connection ] CreateCommand];
  571. cmd.RequestType = POST;
  572. cmd.text= @"DSAdmin.NotifyObject";
  573. [cmd prepare:[self getDSAdmin_NotifyObject]];
  574. [[[cmd.parameters objectAtIndex:0]getValue]SetAsString:clientid];
  575. [[[cmd.parameters objectAtIndex:1]getValue]SetAsString:callbackid];
  576. [[[cmd.parameters objectAtIndex:2]getValue]SetAsJSONValue:msg];
  577. [Connection execute: cmd];
  578. *response = (TJSONObject *) [[[cmd.parameters objectAtIndex:3]getValue]GetAsJSONValue];
  579. return [[[cmd.parameters objectAtIndex:4]getValue]GetAsBoolean];
  580. }
  581. @end