PageRenderTime 51ms CodeModel.GetById 10ms RepoModel.GetById 1ms app.codeStats 0ms

/bin/ScriptEngines/PythonScript/mumble/MurmurControl/Murmur_ice.py

https://bitbucket.org/VirtualReality/taiga
Python | 3747 lines | 3722 code | 8 blank | 17 comment | 52 complexity | 65c89fd1d630fc1b3bbb33fb26afb381 MD5 | raw file
  1. # **********************************************************************
  2. #
  3. # Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
  4. #
  5. # This copy of Ice is licensed to you under the terms described in the
  6. # ICE_LICENSE file included in this distribution.
  7. #
  8. # **********************************************************************
  9. # Ice version 3.4.1
  10. # <auto-generated>
  11. #
  12. # Generated from file `Murmur.ice'
  13. #
  14. # Warning: do not edit this file.
  15. #
  16. # </auto-generated>
  17. import Ice, IcePy, __builtin__
  18. # Start of module Murmur
  19. _M_Murmur = Ice.openModule('Murmur')
  20. __name__ = 'Murmur'
  21. _M_Murmur.__doc__ = '''Information and control of the murmur server. Each server has
  22. one [Meta] interface that controls global information, and
  23. each virtual server has a [Server] interface.'''
  24. if not _M_Murmur.__dict__.has_key('_t_NetAddress'):
  25. _M_Murmur._t_NetAddress = IcePy.defineSequence('::Murmur::NetAddress', ('python:seq:tuple',), IcePy._t_byte)
  26. if not _M_Murmur.__dict__.has_key('User'):
  27. _M_Murmur.User = Ice.createTempClass()
  28. class User(object):
  29. '''A connected user.'''
  30. def __init__(self, session=0, userid=0, mute=False, deaf=False, suppress=False, selfMute=False, selfDeaf=False, channel=0, name='', onlinesecs=0, bytespersec=0, version=0, release='', os='', osversion='', identity='', context='', comment='', address=None, tcponly=False, idlesecs=0):
  31. self.session = session
  32. self.userid = userid
  33. self.mute = mute
  34. self.deaf = deaf
  35. self.suppress = suppress
  36. self.selfMute = selfMute
  37. self.selfDeaf = selfDeaf
  38. self.channel = channel
  39. self.name = name
  40. self.onlinesecs = onlinesecs
  41. self.bytespersec = bytespersec
  42. self.version = version
  43. self.release = release
  44. self.os = os
  45. self.osversion = osversion
  46. self.identity = identity
  47. self.context = context
  48. self.comment = comment
  49. self.address = address
  50. self.tcponly = tcponly
  51. self.idlesecs = idlesecs
  52. def __hash__(self):
  53. _h = 0
  54. _h = 5 * _h + __builtin__.hash(self.session)
  55. _h = 5 * _h + __builtin__.hash(self.userid)
  56. _h = 5 * _h + __builtin__.hash(self.mute)
  57. _h = 5 * _h + __builtin__.hash(self.deaf)
  58. _h = 5 * _h + __builtin__.hash(self.suppress)
  59. _h = 5 * _h + __builtin__.hash(self.selfMute)
  60. _h = 5 * _h + __builtin__.hash(self.selfDeaf)
  61. _h = 5 * _h + __builtin__.hash(self.channel)
  62. _h = 5 * _h + __builtin__.hash(self.name)
  63. _h = 5 * _h + __builtin__.hash(self.onlinesecs)
  64. _h = 5 * _h + __builtin__.hash(self.bytespersec)
  65. _h = 5 * _h + __builtin__.hash(self.version)
  66. _h = 5 * _h + __builtin__.hash(self.release)
  67. _h = 5 * _h + __builtin__.hash(self.os)
  68. _h = 5 * _h + __builtin__.hash(self.osversion)
  69. _h = 5 * _h + __builtin__.hash(self.identity)
  70. _h = 5 * _h + __builtin__.hash(self.context)
  71. _h = 5 * _h + __builtin__.hash(self.comment)
  72. if self.address:
  73. for _i0 in self.address:
  74. _h = 5 * _h + __builtin__.hash(_i0)
  75. _h = 5 * _h + __builtin__.hash(self.tcponly)
  76. _h = 5 * _h + __builtin__.hash(self.idlesecs)
  77. return _h % 0x7fffffff
  78. def __lt__(self, other):
  79. if isinstance(other, _M_Murmur.User):
  80. return self.session < other.session or self.userid < other.userid or self.mute < other.mute or self.deaf < other.deaf or self.suppress < other.suppress or self.selfMute < other.selfMute or self.selfDeaf < other.selfDeaf or self.channel < other.channel or self.name < other.name or self.onlinesecs < other.onlinesecs or self.bytespersec < other.bytespersec or self.version < other.version or self.release < other.release or self.os < other.os or self.osversion < other.osversion or self.identity < other.identity or self.context < other.context or self.comment < other.comment or self.address < other.address or self.tcponly < other.tcponly or self.idlesecs < other.idlesecs
  81. elif other == None:
  82. return False
  83. return NotImplemented
  84. def __le__(self, other):
  85. if isinstance(other, _M_Murmur.User):
  86. return self.session <= other.session or self.userid <= other.userid or self.mute <= other.mute or self.deaf <= other.deaf or self.suppress <= other.suppress or self.selfMute <= other.selfMute or self.selfDeaf <= other.selfDeaf or self.channel <= other.channel or self.name <= other.name or self.onlinesecs <= other.onlinesecs or self.bytespersec <= other.bytespersec or self.version <= other.version or self.release <= other.release or self.os <= other.os or self.osversion <= other.osversion or self.identity <= other.identity or self.context <= other.context or self.comment <= other.comment or self.address <= other.address or self.tcponly <= other.tcponly or self.idlesecs <= other.idlesecs
  87. elif other == None:
  88. return False
  89. return NotImplemented
  90. def __eq__(self, other):
  91. if isinstance(other, _M_Murmur.User):
  92. return self.session == other.session and self.userid == other.userid and self.mute == other.mute and self.deaf == other.deaf and self.suppress == other.suppress and self.selfMute == other.selfMute and self.selfDeaf == other.selfDeaf and self.channel == other.channel and self.name == other.name and self.onlinesecs == other.onlinesecs and self.bytespersec == other.bytespersec and self.version == other.version and self.release == other.release and self.os == other.os and self.osversion == other.osversion and self.identity == other.identity and self.context == other.context and self.comment == other.comment and self.address == other.address and self.tcponly == other.tcponly and self.idlesecs == other.idlesecs
  93. elif other == None:
  94. return False
  95. return NotImplemented
  96. def __ne__(self, other):
  97. if isinstance(other, _M_Murmur.User):
  98. return self.session != other.session or self.userid != other.userid or self.mute != other.mute or self.deaf != other.deaf or self.suppress != other.suppress or self.selfMute != other.selfMute or self.selfDeaf != other.selfDeaf or self.channel != other.channel or self.name != other.name or self.onlinesecs != other.onlinesecs or self.bytespersec != other.bytespersec or self.version != other.version or self.release != other.release or self.os != other.os or self.osversion != other.osversion or self.identity != other.identity or self.context != other.context or self.comment != other.comment or self.address != other.address or self.tcponly != other.tcponly or self.idlesecs != other.idlesecs
  99. elif other == None:
  100. return True
  101. return NotImplemented
  102. def __gt__(self, other):
  103. if isinstance(other, _M_Murmur.User):
  104. return self.session > other.session or self.userid > other.userid or self.mute > other.mute or self.deaf > other.deaf or self.suppress > other.suppress or self.selfMute > other.selfMute or self.selfDeaf > other.selfDeaf or self.channel > other.channel or self.name > other.name or self.onlinesecs > other.onlinesecs or self.bytespersec > other.bytespersec or self.version > other.version or self.release > other.release or self.os > other.os or self.osversion > other.osversion or self.identity > other.identity or self.context > other.context or self.comment > other.comment or self.address > other.address or self.tcponly > other.tcponly or self.idlesecs > other.idlesecs
  105. elif other == None:
  106. return False
  107. return NotImplemented
  108. def __ge__(self, other):
  109. if isinstance(other, _M_Murmur.User):
  110. return self.session >= other.session or self.userid >= other.userid or self.mute >= other.mute or self.deaf >= other.deaf or self.suppress >= other.suppress or self.selfMute >= other.selfMute or self.selfDeaf >= other.selfDeaf or self.channel >= other.channel or self.name >= other.name or self.onlinesecs >= other.onlinesecs or self.bytespersec >= other.bytespersec or self.version >= other.version or self.release >= other.release or self.os >= other.os or self.osversion >= other.osversion or self.identity >= other.identity or self.context >= other.context or self.comment >= other.comment or self.address >= other.address or self.tcponly >= other.tcponly or self.idlesecs >= other.idlesecs
  111. elif other == None:
  112. return False
  113. return NotImplemented
  114. def __str__(self):
  115. return IcePy.stringify(self, _M_Murmur._t_User)
  116. __repr__ = __str__
  117. _M_Murmur._t_User = IcePy.defineStruct('::Murmur::User', User, (), (
  118. ('session', (), IcePy._t_int),
  119. ('userid', (), IcePy._t_int),
  120. ('mute', (), IcePy._t_bool),
  121. ('deaf', (), IcePy._t_bool),
  122. ('suppress', (), IcePy._t_bool),
  123. ('selfMute', (), IcePy._t_bool),
  124. ('selfDeaf', (), IcePy._t_bool),
  125. ('channel', (), IcePy._t_int),
  126. ('name', (), IcePy._t_string),
  127. ('onlinesecs', (), IcePy._t_int),
  128. ('bytespersec', (), IcePy._t_int),
  129. ('version', (), IcePy._t_int),
  130. ('release', (), IcePy._t_string),
  131. ('os', (), IcePy._t_string),
  132. ('osversion', (), IcePy._t_string),
  133. ('identity', (), IcePy._t_string),
  134. ('context', (), IcePy._t_string),
  135. ('comment', (), IcePy._t_string),
  136. ('address', (), _M_Murmur._t_NetAddress),
  137. ('tcponly', (), IcePy._t_bool),
  138. ('idlesecs', (), IcePy._t_int)
  139. ))
  140. _M_Murmur.User = User
  141. del User
  142. if not _M_Murmur.__dict__.has_key('_t_IntList'):
  143. _M_Murmur._t_IntList = IcePy.defineSequence('::Murmur::IntList', (), IcePy._t_int)
  144. if not _M_Murmur.__dict__.has_key('Channel'):
  145. _M_Murmur.Channel = Ice.createTempClass()
  146. class Channel(object):
  147. '''A channel.'''
  148. def __init__(self, id=0, name='', parent=0, links=None, description='', temporary=False, position=0):
  149. self.id = id
  150. self.name = name
  151. self.parent = parent
  152. self.links = links
  153. self.description = description
  154. self.temporary = temporary
  155. self.position = position
  156. def __hash__(self):
  157. _h = 0
  158. _h = 5 * _h + __builtin__.hash(self.id)
  159. _h = 5 * _h + __builtin__.hash(self.name)
  160. _h = 5 * _h + __builtin__.hash(self.parent)
  161. if self.links:
  162. for _i0 in self.links:
  163. _h = 5 * _h + __builtin__.hash(_i0)
  164. _h = 5 * _h + __builtin__.hash(self.description)
  165. _h = 5 * _h + __builtin__.hash(self.temporary)
  166. _h = 5 * _h + __builtin__.hash(self.position)
  167. return _h % 0x7fffffff
  168. def __lt__(self, other):
  169. if isinstance(other, _M_Murmur.Channel):
  170. return self.id < other.id or self.name < other.name or self.parent < other.parent or self.links < other.links or self.description < other.description or self.temporary < other.temporary or self.position < other.position
  171. elif other == None:
  172. return False
  173. return NotImplemented
  174. def __le__(self, other):
  175. if isinstance(other, _M_Murmur.Channel):
  176. return self.id <= other.id or self.name <= other.name or self.parent <= other.parent or self.links <= other.links or self.description <= other.description or self.temporary <= other.temporary or self.position <= other.position
  177. elif other == None:
  178. return False
  179. return NotImplemented
  180. def __eq__(self, other):
  181. if isinstance(other, _M_Murmur.Channel):
  182. return self.id == other.id and self.name == other.name and self.parent == other.parent and self.links == other.links and self.description == other.description and self.temporary == other.temporary and self.position == other.position
  183. elif other == None:
  184. return False
  185. return NotImplemented
  186. def __ne__(self, other):
  187. if isinstance(other, _M_Murmur.Channel):
  188. return self.id != other.id or self.name != other.name or self.parent != other.parent or self.links != other.links or self.description != other.description or self.temporary != other.temporary or self.position != other.position
  189. elif other == None:
  190. return True
  191. return NotImplemented
  192. def __gt__(self, other):
  193. if isinstance(other, _M_Murmur.Channel):
  194. return self.id > other.id or self.name > other.name or self.parent > other.parent or self.links > other.links or self.description > other.description or self.temporary > other.temporary or self.position > other.position
  195. elif other == None:
  196. return False
  197. return NotImplemented
  198. def __ge__(self, other):
  199. if isinstance(other, _M_Murmur.Channel):
  200. return self.id >= other.id or self.name >= other.name or self.parent >= other.parent or self.links >= other.links or self.description >= other.description or self.temporary >= other.temporary or self.position >= other.position
  201. elif other == None:
  202. return False
  203. return NotImplemented
  204. def __str__(self):
  205. return IcePy.stringify(self, _M_Murmur._t_Channel)
  206. __repr__ = __str__
  207. _M_Murmur._t_Channel = IcePy.defineStruct('::Murmur::Channel', Channel, (), (
  208. ('id', (), IcePy._t_int),
  209. ('name', (), IcePy._t_string),
  210. ('parent', (), IcePy._t_int),
  211. ('links', (), _M_Murmur._t_IntList),
  212. ('description', (), IcePy._t_string),
  213. ('temporary', (), IcePy._t_bool),
  214. ('position', (), IcePy._t_int)
  215. ))
  216. _M_Murmur.Channel = Channel
  217. del Channel
  218. if not _M_Murmur.__dict__.has_key('Group'):
  219. _M_Murmur.Group = Ice.createTempClass()
  220. class Group(object):
  221. '''A group. Groups are defined per channel, and can inherit members from parent channels.'''
  222. def __init__(self, name='', inherited=False, inherit=False, inheritable=False, add=None, remove=None, members=None):
  223. self.name = name
  224. self.inherited = inherited
  225. self.inherit = inherit
  226. self.inheritable = inheritable
  227. self.add = add
  228. self.remove = remove
  229. self.members = members
  230. def __hash__(self):
  231. _h = 0
  232. _h = 5 * _h + __builtin__.hash(self.name)
  233. _h = 5 * _h + __builtin__.hash(self.inherited)
  234. _h = 5 * _h + __builtin__.hash(self.inherit)
  235. _h = 5 * _h + __builtin__.hash(self.inheritable)
  236. if self.add:
  237. for _i0 in self.add:
  238. _h = 5 * _h + __builtin__.hash(_i0)
  239. if self.remove:
  240. for _i1 in self.remove:
  241. _h = 5 * _h + __builtin__.hash(_i1)
  242. if self.members:
  243. for _i2 in self.members:
  244. _h = 5 * _h + __builtin__.hash(_i2)
  245. return _h % 0x7fffffff
  246. def __lt__(self, other):
  247. if isinstance(other, _M_Murmur.Group):
  248. return self.name < other.name or self.inherited < other.inherited or self.inherit < other.inherit or self.inheritable < other.inheritable or self.add < other.add or self.remove < other.remove or self.members < other.members
  249. elif other == None:
  250. return False
  251. return NotImplemented
  252. def __le__(self, other):
  253. if isinstance(other, _M_Murmur.Group):
  254. return self.name <= other.name or self.inherited <= other.inherited or self.inherit <= other.inherit or self.inheritable <= other.inheritable or self.add <= other.add or self.remove <= other.remove or self.members <= other.members
  255. elif other == None:
  256. return False
  257. return NotImplemented
  258. def __eq__(self, other):
  259. if isinstance(other, _M_Murmur.Group):
  260. return self.name == other.name and self.inherited == other.inherited and self.inherit == other.inherit and self.inheritable == other.inheritable and self.add == other.add and self.remove == other.remove and self.members == other.members
  261. elif other == None:
  262. return False
  263. return NotImplemented
  264. def __ne__(self, other):
  265. if isinstance(other, _M_Murmur.Group):
  266. return self.name != other.name or self.inherited != other.inherited or self.inherit != other.inherit or self.inheritable != other.inheritable or self.add != other.add or self.remove != other.remove or self.members != other.members
  267. elif other == None:
  268. return True
  269. return NotImplemented
  270. def __gt__(self, other):
  271. if isinstance(other, _M_Murmur.Group):
  272. return self.name > other.name or self.inherited > other.inherited or self.inherit > other.inherit or self.inheritable > other.inheritable or self.add > other.add or self.remove > other.remove or self.members > other.members
  273. elif other == None:
  274. return False
  275. return NotImplemented
  276. def __ge__(self, other):
  277. if isinstance(other, _M_Murmur.Group):
  278. return self.name >= other.name or self.inherited >= other.inherited or self.inherit >= other.inherit or self.inheritable >= other.inheritable or self.add >= other.add or self.remove >= other.remove or self.members >= other.members
  279. elif other == None:
  280. return False
  281. return NotImplemented
  282. def __str__(self):
  283. return IcePy.stringify(self, _M_Murmur._t_Group)
  284. __repr__ = __str__
  285. _M_Murmur._t_Group = IcePy.defineStruct('::Murmur::Group', Group, (), (
  286. ('name', (), IcePy._t_string),
  287. ('inherited', (), IcePy._t_bool),
  288. ('inherit', (), IcePy._t_bool),
  289. ('inheritable', (), IcePy._t_bool),
  290. ('add', (), _M_Murmur._t_IntList),
  291. ('remove', (), _M_Murmur._t_IntList),
  292. ('members', (), _M_Murmur._t_IntList)
  293. ))
  294. _M_Murmur.Group = Group
  295. del Group
  296. _M_Murmur.PermissionWrite = 1
  297. _M_Murmur.PermissionTraverse = 2
  298. _M_Murmur.PermissionEnter = 4
  299. _M_Murmur.PermissionSpeak = 8
  300. _M_Murmur.PermissionWhisper = 256
  301. _M_Murmur.PermissionMuteDeafen = 16
  302. _M_Murmur.PermissionMove = 32
  303. _M_Murmur.PermissionMakeChannel = 64
  304. _M_Murmur.PermissionMakeTempChannel = 1024
  305. _M_Murmur.PermissionLinkChannel = 128
  306. _M_Murmur.PermissionTextMessage = 512
  307. _M_Murmur.PermissionKick = 65536
  308. _M_Murmur.PermissionBan = 131072
  309. _M_Murmur.PermissionRegister = 262144
  310. _M_Murmur.PermissionRegisterSelf = 524288
  311. if not _M_Murmur.__dict__.has_key('ACL'):
  312. _M_Murmur.ACL = Ice.createTempClass()
  313. class ACL(object):
  314. '''Access Control List for a channel. ACLs are defined per channel, and can be inherited from parent channels.'''
  315. def __init__(self, applyHere=False, applySubs=False, inherited=False, userid=0, group='', allow=0, deny=0):
  316. self.applyHere = applyHere
  317. self.applySubs = applySubs
  318. self.inherited = inherited
  319. self.userid = userid
  320. self.group = group
  321. self.allow = allow
  322. self.deny = deny
  323. def __hash__(self):
  324. _h = 0
  325. _h = 5 * _h + __builtin__.hash(self.applyHere)
  326. _h = 5 * _h + __builtin__.hash(self.applySubs)
  327. _h = 5 * _h + __builtin__.hash(self.inherited)
  328. _h = 5 * _h + __builtin__.hash(self.userid)
  329. _h = 5 * _h + __builtin__.hash(self.group)
  330. _h = 5 * _h + __builtin__.hash(self.allow)
  331. _h = 5 * _h + __builtin__.hash(self.deny)
  332. return _h % 0x7fffffff
  333. def __lt__(self, other):
  334. if isinstance(other, _M_Murmur.ACL):
  335. return self.applyHere < other.applyHere or self.applySubs < other.applySubs or self.inherited < other.inherited or self.userid < other.userid or self.group < other.group or self.allow < other.allow or self.deny < other.deny
  336. elif other == None:
  337. return False
  338. return NotImplemented
  339. def __le__(self, other):
  340. if isinstance(other, _M_Murmur.ACL):
  341. return self.applyHere <= other.applyHere or self.applySubs <= other.applySubs or self.inherited <= other.inherited or self.userid <= other.userid or self.group <= other.group or self.allow <= other.allow or self.deny <= other.deny
  342. elif other == None:
  343. return False
  344. return NotImplemented
  345. def __eq__(self, other):
  346. if isinstance(other, _M_Murmur.ACL):
  347. return self.applyHere == other.applyHere and self.applySubs == other.applySubs and self.inherited == other.inherited and self.userid == other.userid and self.group == other.group and self.allow == other.allow and self.deny == other.deny
  348. elif other == None:
  349. return False
  350. return NotImplemented
  351. def __ne__(self, other):
  352. if isinstance(other, _M_Murmur.ACL):
  353. return self.applyHere != other.applyHere or self.applySubs != other.applySubs or self.inherited != other.inherited or self.userid != other.userid or self.group != other.group or self.allow != other.allow or self.deny != other.deny
  354. elif other == None:
  355. return True
  356. return NotImplemented
  357. def __gt__(self, other):
  358. if isinstance(other, _M_Murmur.ACL):
  359. return self.applyHere > other.applyHere or self.applySubs > other.applySubs or self.inherited > other.inherited or self.userid > other.userid or self.group > other.group or self.allow > other.allow or self.deny > other.deny
  360. elif other == None:
  361. return False
  362. return NotImplemented
  363. def __ge__(self, other):
  364. if isinstance(other, _M_Murmur.ACL):
  365. return self.applyHere >= other.applyHere or self.applySubs >= other.applySubs or self.inherited >= other.inherited or self.userid >= other.userid or self.group >= other.group or self.allow >= other.allow or self.deny >= other.deny
  366. elif other == None:
  367. return False
  368. return NotImplemented
  369. def __str__(self):
  370. return IcePy.stringify(self, _M_Murmur._t_ACL)
  371. __repr__ = __str__
  372. _M_Murmur._t_ACL = IcePy.defineStruct('::Murmur::ACL', ACL, (), (
  373. ('applyHere', (), IcePy._t_bool),
  374. ('applySubs', (), IcePy._t_bool),
  375. ('inherited', (), IcePy._t_bool),
  376. ('userid', (), IcePy._t_int),
  377. ('group', (), IcePy._t_string),
  378. ('allow', (), IcePy._t_int),
  379. ('deny', (), IcePy._t_int)
  380. ))
  381. _M_Murmur.ACL = ACL
  382. del ACL
  383. if not _M_Murmur.__dict__.has_key('Ban'):
  384. _M_Murmur.Ban = Ice.createTempClass()
  385. class Ban(object):
  386. '''A single ip mask for a ban.'''
  387. def __init__(self, address=None, bits=0, name='', hash='', reason='', start=0, duration=0):
  388. self.address = address
  389. self.bits = bits
  390. self.name = name
  391. self.hash = hash
  392. self.reason = reason
  393. self.start = start
  394. self.duration = duration
  395. def __hash__(self):
  396. _h = 0
  397. if self.address:
  398. for _i0 in self.address:
  399. _h = 5 * _h + __builtin__.hash(_i0)
  400. _h = 5 * _h + __builtin__.hash(self.bits)
  401. _h = 5 * _h + __builtin__.hash(self.name)
  402. _h = 5 * _h + __builtin__.hash(self.hash)
  403. _h = 5 * _h + __builtin__.hash(self.reason)
  404. _h = 5 * _h + __builtin__.hash(self.start)
  405. _h = 5 * _h + __builtin__.hash(self.duration)
  406. return _h % 0x7fffffff
  407. def __lt__(self, other):
  408. if isinstance(other, _M_Murmur.Ban):
  409. return self.address < other.address or self.bits < other.bits or self.name < other.name or self.hash < other.hash or self.reason < other.reason or self.start < other.start or self.duration < other.duration
  410. elif other == None:
  411. return False
  412. return NotImplemented
  413. def __le__(self, other):
  414. if isinstance(other, _M_Murmur.Ban):
  415. return self.address <= other.address or self.bits <= other.bits or self.name <= other.name or self.hash <= other.hash or self.reason <= other.reason or self.start <= other.start or self.duration <= other.duration
  416. elif other == None:
  417. return False
  418. return NotImplemented
  419. def __eq__(self, other):
  420. if isinstance(other, _M_Murmur.Ban):
  421. return self.address == other.address and self.bits == other.bits and self.name == other.name and self.hash == other.hash and self.reason == other.reason and self.start == other.start and self.duration == other.duration
  422. elif other == None:
  423. return False
  424. return NotImplemented
  425. def __ne__(self, other):
  426. if isinstance(other, _M_Murmur.Ban):
  427. return self.address != other.address or self.bits != other.bits or self.name != other.name or self.hash != other.hash or self.reason != other.reason or self.start != other.start or self.duration != other.duration
  428. elif other == None:
  429. return True
  430. return NotImplemented
  431. def __gt__(self, other):
  432. if isinstance(other, _M_Murmur.Ban):
  433. return self.address > other.address or self.bits > other.bits or self.name > other.name or self.hash > other.hash or self.reason > other.reason or self.start > other.start or self.duration > other.duration
  434. elif other == None:
  435. return False
  436. return NotImplemented
  437. def __ge__(self, other):
  438. if isinstance(other, _M_Murmur.Ban):
  439. return self.address >= other.address or self.bits >= other.bits or self.name >= other.name or self.hash >= other.hash or self.reason >= other.reason or self.start >= other.start or self.duration >= other.duration
  440. elif other == None:
  441. return False
  442. return NotImplemented
  443. def __str__(self):
  444. return IcePy.stringify(self, _M_Murmur._t_Ban)
  445. __repr__ = __str__
  446. _M_Murmur._t_Ban = IcePy.defineStruct('::Murmur::Ban', Ban, (), (
  447. ('address', (), _M_Murmur._t_NetAddress),
  448. ('bits', (), IcePy._t_int),
  449. ('name', (), IcePy._t_string),
  450. ('hash', (), IcePy._t_string),
  451. ('reason', (), IcePy._t_string),
  452. ('start', (), IcePy._t_long),
  453. ('duration', (), IcePy._t_int)
  454. ))
  455. _M_Murmur.Ban = Ban
  456. del Ban
  457. if not _M_Murmur.__dict__.has_key('LogEntry'):
  458. _M_Murmur.LogEntry = Ice.createTempClass()
  459. class LogEntry(object):
  460. '''A entry in the log.'''
  461. def __init__(self, timestamp=0, txt=''):
  462. self.timestamp = timestamp
  463. self.txt = txt
  464. def __hash__(self):
  465. _h = 0
  466. _h = 5 * _h + __builtin__.hash(self.timestamp)
  467. _h = 5 * _h + __builtin__.hash(self.txt)
  468. return _h % 0x7fffffff
  469. def __lt__(self, other):
  470. if isinstance(other, _M_Murmur.LogEntry):
  471. return self.timestamp < other.timestamp or self.txt < other.txt
  472. elif other == None:
  473. return False
  474. return NotImplemented
  475. def __le__(self, other):
  476. if isinstance(other, _M_Murmur.LogEntry):
  477. return self.timestamp <= other.timestamp or self.txt <= other.txt
  478. elif other == None:
  479. return False
  480. return NotImplemented
  481. def __eq__(self, other):
  482. if isinstance(other, _M_Murmur.LogEntry):
  483. return self.timestamp == other.timestamp and self.txt == other.txt
  484. elif other == None:
  485. return False
  486. return NotImplemented
  487. def __ne__(self, other):
  488. if isinstance(other, _M_Murmur.LogEntry):
  489. return self.timestamp != other.timestamp or self.txt != other.txt
  490. elif other == None:
  491. return True
  492. return NotImplemented
  493. def __gt__(self, other):
  494. if isinstance(other, _M_Murmur.LogEntry):
  495. return self.timestamp > other.timestamp or self.txt > other.txt
  496. elif other == None:
  497. return False
  498. return NotImplemented
  499. def __ge__(self, other):
  500. if isinstance(other, _M_Murmur.LogEntry):
  501. return self.timestamp >= other.timestamp or self.txt >= other.txt
  502. elif other == None:
  503. return False
  504. return NotImplemented
  505. def __str__(self):
  506. return IcePy.stringify(self, _M_Murmur._t_LogEntry)
  507. __repr__ = __str__
  508. _M_Murmur._t_LogEntry = IcePy.defineStruct('::Murmur::LogEntry', LogEntry, (), (
  509. ('timestamp', (), IcePy._t_int),
  510. ('txt', (), IcePy._t_string)
  511. ))
  512. _M_Murmur.LogEntry = LogEntry
  513. del LogEntry
  514. if not _M_Murmur.__dict__.has_key('Tree'):
  515. _M_Murmur._t_Tree = IcePy.declareClass('::Murmur::Tree')
  516. _M_Murmur._t_TreePrx = IcePy.declareProxy('::Murmur::Tree')
  517. if not _M_Murmur.__dict__.has_key('_t_TreeList'):
  518. _M_Murmur._t_TreeList = IcePy.defineSequence('::Murmur::TreeList', (), _M_Murmur._t_Tree)
  519. if not _M_Murmur.__dict__.has_key('ChannelInfo'):
  520. _M_Murmur.ChannelInfo = Ice.createTempClass()
  521. class ChannelInfo(object):
  522. def __init__(self, val):
  523. assert(val >= 0 and val < 2)
  524. self.value = val
  525. def __str__(self):
  526. return self._names[self.value]
  527. __repr__ = __str__
  528. def __hash__(self):
  529. return self.value
  530. def __lt__(self, other):
  531. if isinstance(other, _M_Murmur.ChannelInfo):
  532. return self.value < other.value;
  533. elif other == None:
  534. return False
  535. return NotImplemented
  536. def __le__(self, other):
  537. if isinstance(other, _M_Murmur.ChannelInfo):
  538. return self.value <= other.value;
  539. elif other == None:
  540. return False
  541. return NotImplemented
  542. def __eq__(self, other):
  543. if isinstance(other, _M_Murmur.ChannelInfo):
  544. return self.value == other.value;
  545. elif other == None:
  546. return False
  547. return NotImplemented
  548. def __ne__(self, other):
  549. if isinstance(other, _M_Murmur.ChannelInfo):
  550. return self.value != other.value;
  551. elif other == None:
  552. return False
  553. return NotImplemented
  554. def __gt__(self, other):
  555. if isinstance(other, _M_Murmur.ChannelInfo):
  556. return self.value > other.value;
  557. elif other == None:
  558. return False
  559. return NotImplemented
  560. def __ge__(self, other):
  561. if isinstance(other, _M_Murmur.ChannelInfo):
  562. return self.value >= other.value;
  563. elif other == None:
  564. return False
  565. return NotImplemented
  566. _names = ('ChannelDescription', 'ChannelPosition')
  567. ChannelInfo.ChannelDescription = ChannelInfo(0)
  568. ChannelInfo.ChannelPosition = ChannelInfo(1)
  569. _M_Murmur._t_ChannelInfo = IcePy.defineEnum('::Murmur::ChannelInfo', ChannelInfo, (), (ChannelInfo.ChannelDescription, ChannelInfo.ChannelPosition))
  570. _M_Murmur.ChannelInfo = ChannelInfo
  571. del ChannelInfo
  572. if not _M_Murmur.__dict__.has_key('UserInfo'):
  573. _M_Murmur.UserInfo = Ice.createTempClass()
  574. class UserInfo(object):
  575. def __init__(self, val):
  576. assert(val >= 0 and val < 5)
  577. self.value = val
  578. def __str__(self):
  579. return self._names[self.value]
  580. __repr__ = __str__
  581. def __hash__(self):
  582. return self.value
  583. def __lt__(self, other):
  584. if isinstance(other, _M_Murmur.UserInfo):
  585. return self.value < other.value;
  586. elif other == None:
  587. return False
  588. return NotImplemented
  589. def __le__(self, other):
  590. if isinstance(other, _M_Murmur.UserInfo):
  591. return self.value <= other.value;
  592. elif other == None:
  593. return False
  594. return NotImplemented
  595. def __eq__(self, other):
  596. if isinstance(other, _M_Murmur.UserInfo):
  597. return self.value == other.value;
  598. elif other == None:
  599. return False
  600. return NotImplemented
  601. def __ne__(self, other):
  602. if isinstance(other, _M_Murmur.UserInfo):
  603. return self.value != other.value;
  604. elif other == None:
  605. return False
  606. return NotImplemented
  607. def __gt__(self, other):
  608. if isinstance(other, _M_Murmur.UserInfo):
  609. return self.value > other.value;
  610. elif other == None:
  611. return False
  612. return NotImplemented
  613. def __ge__(self, other):
  614. if isinstance(other, _M_Murmur.UserInfo):
  615. return self.value >= other.value;
  616. elif other == None:
  617. return False
  618. return NotImplemented
  619. _names = ('UserName', 'UserEmail', 'UserComment', 'UserHash', 'UserPassword')
  620. UserInfo.UserName = UserInfo(0)
  621. UserInfo.UserEmail = UserInfo(1)
  622. UserInfo.UserComment = UserInfo(2)
  623. UserInfo.UserHash = UserInfo(3)
  624. UserInfo.UserPassword = UserInfo(4)
  625. _M_Murmur._t_UserInfo = IcePy.defineEnum('::Murmur::UserInfo', UserInfo, (), (UserInfo.UserName, UserInfo.UserEmail, UserInfo.UserComment, UserInfo.UserHash, UserInfo.UserPassword))
  626. _M_Murmur.UserInfo = UserInfo
  627. del UserInfo
  628. if not _M_Murmur.__dict__.has_key('_t_UserMap'):
  629. _M_Murmur._t_UserMap = IcePy.defineDictionary('::Murmur::UserMap', (), IcePy._t_int, _M_Murmur._t_User)
  630. if not _M_Murmur.__dict__.has_key('_t_ChannelMap'):
  631. _M_Murmur._t_ChannelMap = IcePy.defineDictionary('::Murmur::ChannelMap', (), IcePy._t_int, _M_Murmur._t_Channel)
  632. if not _M_Murmur.__dict__.has_key('_t_ChannelList'):
  633. _M_Murmur._t_ChannelList = IcePy.defineSequence('::Murmur::ChannelList', (), _M_Murmur._t_Channel)
  634. if not _M_Murmur.__dict__.has_key('_t_UserList'):
  635. _M_Murmur._t_UserList = IcePy.defineSequence('::Murmur::UserList', (), _M_Murmur._t_User)
  636. if not _M_Murmur.__dict__.has_key('_t_GroupList'):
  637. _M_Murmur._t_GroupList = IcePy.defineSequence('::Murmur::GroupList', (), _M_Murmur._t_Group)
  638. if not _M_Murmur.__dict__.has_key('_t_ACLList'):
  639. _M_Murmur._t_ACLList = IcePy.defineSequence('::Murmur::ACLList', (), _M_Murmur._t_ACL)
  640. if not _M_Murmur.__dict__.has_key('_t_LogList'):
  641. _M_Murmur._t_LogList = IcePy.defineSequence('::Murmur::LogList', (), _M_Murmur._t_LogEntry)
  642. if not _M_Murmur.__dict__.has_key('_t_BanList'):
  643. _M_Murmur._t_BanList = IcePy.defineSequence('::Murmur::BanList', (), _M_Murmur._t_Ban)
  644. if not _M_Murmur.__dict__.has_key('_t_IdList'):
  645. _M_Murmur._t_IdList = IcePy.defineSequence('::Murmur::IdList', (), IcePy._t_int)
  646. if not _M_Murmur.__dict__.has_key('_t_NameList'):
  647. _M_Murmur._t_NameList = IcePy.defineSequence('::Murmur::NameList', (), IcePy._t_string)
  648. if not _M_Murmur.__dict__.has_key('_t_NameMap'):
  649. _M_Murmur._t_NameMap = IcePy.defineDictionary('::Murmur::NameMap', (), IcePy._t_int, IcePy._t_string)
  650. if not _M_Murmur.__dict__.has_key('_t_IdMap'):
  651. _M_Murmur._t_IdMap = IcePy.defineDictionary('::Murmur::IdMap', (), IcePy._t_string, IcePy._t_int)
  652. if not _M_Murmur.__dict__.has_key('_t_Texture'):
  653. _M_Murmur._t_Texture = IcePy.defineSequence('::Murmur::Texture', (), IcePy._t_byte)
  654. if not _M_Murmur.__dict__.has_key('_t_ConfigMap'):
  655. _M_Murmur._t_ConfigMap = IcePy.defineDictionary('::Murmur::ConfigMap', (), IcePy._t_string, IcePy._t_string)
  656. if not _M_Murmur.__dict__.has_key('_t_GroupNameList'):
  657. _M_Murmur._t_GroupNameList = IcePy.defineSequence('::Murmur::GroupNameList', (), IcePy._t_string)
  658. if not _M_Murmur.__dict__.has_key('_t_CertificateDer'):
  659. _M_Murmur._t_CertificateDer = IcePy.defineSequence('::Murmur::CertificateDer', (), IcePy._t_byte)
  660. if not _M_Murmur.__dict__.has_key('_t_CertificateList'):
  661. _M_Murmur._t_CertificateList = IcePy.defineSequence('::Murmur::CertificateList', (), _M_Murmur._t_CertificateDer)
  662. if not _M_Murmur.__dict__.has_key('_t_UserInfoMap'):
  663. _M_Murmur._t_UserInfoMap = IcePy.defineDictionary('::Murmur::UserInfoMap', (), _M_Murmur._t_UserInfo, IcePy._t_string)
  664. if not _M_Murmur.__dict__.has_key('Tree'):
  665. _M_Murmur.Tree = Ice.createTempClass()
  666. class Tree(Ice.Object):
  667. '''User and subchannel state. Read-only.'''
  668. def __init__(self, c=Ice._struct_marker, children=None, users=None):
  669. if c is Ice._struct_marker:
  670. self.c = _M_Murmur.Channel()
  671. else:
  672. self.c = c
  673. self.children = children
  674. self.users = users
  675. def ice_ids(self, current=None):
  676. return ('::Ice::Object', '::Murmur::Tree')
  677. def ice_id(self, current=None):
  678. return '::Murmur::Tree'
  679. def ice_staticId():
  680. return '::Murmur::Tree'
  681. ice_staticId = staticmethod(ice_staticId)
  682. def __str__(self):
  683. return IcePy.stringify(self, _M_Murmur._t_Tree)
  684. __repr__ = __str__
  685. _M_Murmur.TreePrx = Ice.createTempClass()
  686. class TreePrx(Ice.ObjectPrx):
  687. def checkedCast(proxy, facetOrCtx=None, _ctx=None):
  688. return _M_Murmur.TreePrx.ice_checkedCast(proxy, '::Murmur::Tree', facetOrCtx, _ctx)
  689. checkedCast = staticmethod(checkedCast)
  690. def uncheckedCast(proxy, facet=None):
  691. return _M_Murmur.TreePrx.ice_uncheckedCast(proxy, facet)
  692. uncheckedCast = staticmethod(uncheckedCast)
  693. _M_Murmur._t_TreePrx = IcePy.defineProxy('::Murmur::Tree', TreePrx)
  694. _M_Murmur._t_Tree = IcePy.defineClass('::Murmur::Tree', Tree, (), False, None, (), (
  695. ('c', (), _M_Murmur._t_Channel),
  696. ('children', (), _M_Murmur._t_TreeList),
  697. ('users', (), _M_Murmur._t_UserList)
  698. ))
  699. Tree._ice_type = _M_Murmur._t_Tree
  700. _M_Murmur.Tree = Tree
  701. del Tree
  702. _M_Murmur.TreePrx = TreePrx
  703. del TreePrx
  704. if not _M_Murmur.__dict__.has_key('MurmurException'):
  705. _M_Murmur.MurmurException = Ice.createTempClass()
  706. class MurmurException(Ice.UserException):
  707. def __init__(self):
  708. pass
  709. def __str__(self):
  710. return IcePy.stringifyException(self)
  711. __repr__ = __str__
  712. _ice_name = 'Murmur::MurmurException'
  713. _M_Murmur._t_MurmurException = IcePy.defineException('::Murmur::MurmurException', MurmurException, (), None, ())
  714. MurmurException._ice_type = _M_Murmur._t_MurmurException
  715. _M_Murmur.MurmurException = MurmurException
  716. del MurmurException
  717. if not _M_Murmur.__dict__.has_key('InvalidSessionException'):
  718. _M_Murmur.InvalidSessionException = Ice.createTempClass()
  719. class InvalidSessionException(_M_Murmur.MurmurException):
  720. '''This is thrown when you specify an invalid session. This may happen if the user has disconnected since your last call to [Server::getUsers]. See [User::session]'''
  721. def __init__(self):
  722. _M_Murmur.MurmurException.__init__(self)
  723. def __str__(self):
  724. return IcePy.stringifyException(self)
  725. __repr__ = __str__
  726. _ice_name = 'Murmur::InvalidSessionException'
  727. _M_Murmur._t_InvalidSessionException = IcePy.defineException('::Murmur::InvalidSessionException', InvalidSessionException, (), _M_Murmur._t_MurmurException, ())
  728. InvalidSessionException._ice_type = _M_Murmur._t_InvalidSessionException
  729. _M_Murmur.InvalidSessionException = InvalidSessionException
  730. del InvalidSessionException
  731. if not _M_Murmur.__dict__.has_key('InvalidChannelException'):
  732. _M_Murmur.InvalidChannelException = Ice.createTempClass()
  733. class InvalidChannelException(_M_Murmur.MurmurException):
  734. '''This is thrown when you specify an invalid channel id. This may happen if the channel was removed by another provess. It can also be thrown if you try to add an invalid channel.'''
  735. def __init__(self):
  736. _M_Murmur.MurmurException.__init__(self)
  737. def __str__(self):
  738. return IcePy.stringifyException(self)
  739. __repr__ = __str__
  740. _ice_name = 'Murmur::InvalidChannelException'
  741. _M_Murmur._t_InvalidChannelException = IcePy.defineException('::Murmur::InvalidChannelException', InvalidChannelException, (), _M_Murmur._t_MurmurException, ())
  742. InvalidChannelException._ice_type = _M_Murmur._t_InvalidChannelException
  743. _M_Murmur.InvalidChannelException = InvalidChannelException
  744. del InvalidChannelException
  745. if not _M_Murmur.__dict__.has_key('InvalidServerException'):
  746. _M_Murmur.InvalidServerException = Ice.createTempClass()
  747. class InvalidServerException(_M_Murmur.MurmurException):
  748. '''This is thrown when you try to do an operation on a server that does not exist. This may happen if someone has removed the server.'''
  749. def __init__(self):
  750. _M_Murmur.MurmurException.__init__(self)
  751. def __str__(self):
  752. return IcePy.stringifyException(self)
  753. __repr__ = __str__
  754. _ice_name = 'Murmur::InvalidServerException'
  755. _M_Murmur._t_InvalidServerException = IcePy.defineException('::Murmur::InvalidServerException', InvalidServerException, (), _M_Murmur._t_MurmurException, ())
  756. InvalidServerException._ice_type = _M_Murmur._t_InvalidServerException
  757. _M_Murmur.InvalidServerException = InvalidServerException
  758. del InvalidServerException
  759. if not _M_Murmur.__dict__.has_key('ServerBootedException'):
  760. _M_Murmur.ServerBootedException = Ice.createTempClass()
  761. class ServerBootedException(_M_Murmur.MurmurException):
  762. '''This happens if you try to fetch user or channel state on a stopped server, if you try to stop an already stopped server or start an already started server.'''
  763. def __init__(self):
  764. _M_Murmur.MurmurException.__init__(self)
  765. def __str__(self):
  766. return IcePy.stringifyException(self)
  767. __repr__ = __str__
  768. _ice_name = 'Murmur::ServerBootedException'
  769. _M_Murmur._t_ServerBootedException = IcePy.defineException('::Murmur::ServerBootedException', ServerBootedException, (), _M_Murmur._t_MurmurException, ())
  770. ServerBootedException._ice_type = _M_Murmur._t_ServerBootedException
  771. _M_Murmur.ServerBootedException = ServerBootedException
  772. del ServerBootedException
  773. if not _M_Murmur.__dict__.has_key('ServerFailureException'):
  774. _M_Murmur.ServerFailureException = Ice.createTempClass()
  775. class ServerFailureException(_M_Murmur.MurmurException):
  776. '''This is thrown if [Server::start] fails, and should generally be the cause for some concern.'''
  777. def __init__(self):
  778. _M_Murmur.MurmurException.__init__(self)
  779. def __str__(self):
  780. return IcePy.stringifyException(self)
  781. __repr__ = __str__
  782. _ice_name = 'Murmur::ServerFailureException'
  783. _M_Murmur._t_ServerFailureException = IcePy.defineException('::Murmur::ServerFailureException', ServerFailureException, (), _M_Murmur._t_MurmurException, ())
  784. ServerFailureException._ice_type = _M_Murmur._t_ServerFailureException
  785. _M_Murmur.ServerFailureException = ServerFailureException
  786. del ServerFailureException
  787. if not _M_Murmur.__dict__.has_key('InvalidUserException'):
  788. _M_Murmur.InvalidUserException = Ice.createTempClass()
  789. class InvalidUserException(_M_Murmur.MurmurException):
  790. '''This is thrown when you specify an invalid userid.'''
  791. def __init__(self):
  792. _M_Murmur.MurmurException.__init__(self)
  793. def __str__(self):
  794. return IcePy.stringifyException(self)
  795. __repr__ = __str__
  796. _ice_name = 'Murmur::InvalidUserException'
  797. _M_Murmur._t_InvalidUserException = IcePy.defineException('::Murmur::InvalidUserException', InvalidUserException, (), _M_Murmur._t_MurmurException, ())
  798. InvalidUserException._ice_type = _M_Murmur._t_InvalidUserException
  799. _M_Murmur.InvalidUserException = InvalidUserException
  800. del InvalidUserException
  801. if not _M_Murmur.__dict__.has_key('InvalidTextureException'):
  802. _M_Murmur.InvalidTextureException = Ice.createTempClass()
  803. class InvalidTextureException(_M_Murmur.MurmurException):
  804. '''This is thrown when you try to set an invalid texture.'''
  805. def __init__(self):
  806. _M_Murmur.MurmurException.__init__(self)
  807. def __str__(self):
  808. return IcePy.stringifyException(self)
  809. __repr__ = __str__
  810. _ice_name = 'Murmur::InvalidTextureException'
  811. _M_Murmur._t_InvalidTextureException = IcePy.defineException('::Murmur::InvalidTextureException', InvalidTextureException, (), _M_Murmur._t_MurmurException, ())
  812. InvalidTextureException._ice_type = _M_Murmur._t_InvalidTextureException
  813. _M_Murmur.InvalidTextureException = InvalidTextureException
  814. del InvalidTextureException
  815. if not _M_Murmur.__dict__.has_key('InvalidCallbackException'):
  816. _M_Murmur.InvalidCallbackException = Ice.createTempClass()
  817. class InvalidCallbackException(_M_Murmur.MurmurException):
  818. '''This is thrown when you supply an invalid callback.'''
  819. def __init__(self):
  820. _M_Murmur.MurmurException.__init__(self)
  821. def __str__(self):
  822. return IcePy.stringifyException(self)
  823. __repr__ = __str__
  824. _ice_name = 'Murmur::InvalidCallbackException'
  825. _M_Murmur._t_InvalidCallbackException = IcePy.defineException('::Murmur::InvalidCallbackException', InvalidCallbackException, (), _M_Murmur._t_MurmurException, ())
  826. InvalidCallbackException._ice_type = _M_Murmur._t_InvalidCallbackException
  827. _M_Murmur.InvalidCallbackException = InvalidCallbackException
  828. del InvalidCallbackException
  829. if not _M_Murmur.__dict__.has_key('InvalidSecretException'):
  830. _M_Murmur.InvalidSecretException = Ice.createTempClass()
  831. class InvalidSecretException(_M_Murmur.MurmurException):
  832. '''This is thrown when you supply the wrong secret in the calling context.'''
  833. def __init__(self):
  834. _M_Murmur.MurmurException.__init__(self)
  835. def __str__(self):
  836. return IcePy.stringifyException(self)
  837. __repr__ = __str__
  838. _ice_name = 'Murmur::InvalidSecretException'
  839. _M_Murmur._t_InvalidSecretException = IcePy.defineException('::Murmur::InvalidSecretException', InvalidSecretException, (), _M_Murmur._t_MurmurException, ())
  840. InvalidSecretException._ice_type = _M_Murmur._t_InvalidSecretException
  841. _M_Murmur.InvalidSecretException = InvalidSecretException
  842. del InvalidSecretException
  843. if not _M_Murmur.__dict__.has_key('ServerCallback'):
  844. _M_Murmur.ServerCallback = Ice.createTempClass()
  845. class ServerCallback(Ice.Object):
  846. '''Callback interface for servers. You can supply an implementation of this to receive notification
  847. messages from the server.
  848. If an added callback ever throws an exception or goes away, it will be automatically removed.
  849. Please note that all callbacks are done asynchronously; murmur does not wait for the callback to
  850. complete before continuing processing.
  851. Note that callbacks are removed when a server is stopped, so you should have a callback for
  852. [MetaCallback::started] which calls [Server::addCallback].'''
  853. def __init__(self):
  854. if __builtin__.type(self) == _M_Murmur.ServerCallback:
  855. raise RuntimeError('Murmur.ServerCallback is an abstract class')
  856. def ice_ids(self, current=None):
  857. return ('::Ice::Object', '::Murmur::ServerCallback')
  858. def ice_id(self, current=None):
  859. return '::Murmur::ServerCallback'
  860. def ice_staticId():
  861. return '::Murmur::ServerCallback'
  862. ice_staticId = staticmethod(ice_staticId)
  863. def userConnected(self, state, current=None):
  864. '''Called when a user connects to the server.
  865. Arguments:
  866. state State of connected user.'''
  867. pass
  868. def userDisconnected(self, state, current=None):
  869. '''Called when a user disconnects from the server. The user has already been removed, so you can no longer use methods like [Server::getState]
  870. to retrieve the user's state.
  871. Arguments:
  872. state State of disconnected user.'''
  873. pass
  874. def userStateChanged(self, state, current=None):
  875. '''Called when a user state changes. This is called if the user moves, is renamed, is muted, deafened etc.
  876. Arguments:
  877. state New state of user.'''
  878. pass
  879. def channelCreated(self, state, current=None):
  880. '''Called when a new channel is created.
  881. Arguments:
  882. state State of new channel.'''
  883. pass
  884. def channelRemoved(self, state, current=None):
  885. '''Called when a channel is removed. The channel has already been removed, you can no longer use methods like [Server::getChannelState]
  886. Arguments:
  887. state State of removed channel.'''
  888. pass
  889. def channelStateChanged(self, state, current=None):
  890. '''Called when a new channel state changes. This is called if the channel is moved, renamed or if new links are added.
  891. Arguments:
  892. state New state of channel.'''
  893. pass
  894. def __str__(self):
  895. return IcePy.stringify(self, _M_Murmur._t_ServerCallback)
  896. __repr__ = __str__
  897. _M_Murmur.ServerCallbackPrx = Ice.createTempClass()
  898. class ServerCallbackPrx(Ice.ObjectPrx):
  899. '''Called when a user connects to the server.
  900. Arguments:
  901. state State of connected user.'''
  902. def userConnected(self, state, _ctx=None):
  903. return _M_Murmur.ServerCallback._op_userConnected.invoke(self, ((state, ), _ctx))
  904. '''Called when a user connects to the server.
  905. Arguments:
  906. state State of connected user.'''
  907. def begin_userConnected(self, state, _response=None, _ex=None, _sent=None, _ctx=None):
  908. return _M_Murmur.ServerCallback._op_userConnected.begin(self, ((state, ), _response, _ex, _sent, _ctx))
  909. '''Called when a user connects to the server.
  910. Arguments:
  911. state State of connected user.'''
  912. def end_userConnected(self, _r):
  913. return _M_Murmur.ServerCallback._op_userConnected.end(self, _r)
  914. '''Called when a user disconnects from the server. The user has already been removed, so you can no longer use methods like [Server::getState]
  915. to retrieve the user's state.
  916. Arguments:
  917. state State of disconnected user.'''
  918. def userDisconnected(self, state, _ctx=None):
  919. return _M_Murmur.ServerCallback._op_userDisconnected.invoke(self, ((state, ), _ctx))
  920. '''Called when a user disconnects from the server. The user has already been removed, so you can no longer use methods like [Server::getState]
  921. to retrieve the user's state.
  922. Arguments:
  923. state State of disconnected user.'''
  924. def begin_userDisconnected(self, state, _response=None, _ex=None, _sent=None, _ctx=None):
  925. return _M_Murmur.ServerCallback._op_userDisconnected.begin(self, ((state, ), _response, _ex, _sent, _ctx))
  926. '''Called when a user disconnects from the server. The user has already been removed, so you can no longer use methods like [Server::getState]
  927. to retrieve the user's state.
  928. Arguments:
  929. state State of disconnected user.'''
  930. def end_userDisconnected(self, _r):
  931. return _M_Murmur.ServerCallback._op_userDisconnected.end(self, _r)
  932. '''Called when a user state changes. This is called if the user moves, is renamed, is muted, deafened etc.
  933. Arguments:
  934. state New state of user.'''
  935. def userStateChanged(self, state, _ctx=None):
  936. return _M_Murmur.ServerCallback._op_userStateChanged.invoke(self, ((state, ), _ctx))
  937. '''Called when a user state changes. This is called if the user moves, is renamed, is muted, deafened etc.
  938. Arguments:
  939. state New state of user.'''
  940. def begin_userStateChanged(self, state, _response=None, _ex=None, _sent=None, _ctx=None):
  941. return _M_Murmur.ServerCallback._op_userStateChanged.begin(self, ((state, ), _response, _ex, _sent, _ctx))
  942. '''Called when a user state changes. This is called if the user moves, is renamed, is muted, deafened etc.
  943. Arguments:
  944. state New state of user.'''
  945. def end_userStateChanged(self, _r):
  946. return _M_Murmur.ServerCallback._op_userStateChanged.end(self, _r)
  947. '''Called when a new channel is created.
  948. Arguments:
  949. state State of new channel.'''
  950. def channelCreated(self, state, _ctx=None):
  951. return _M_Murmur.ServerCallback._op_channelCreated.invoke(self, ((state, ), _ctx))
  952. '''Called when a new channel is created.
  953. Arguments:
  954. state State of new channel.'''
  955. def begin_channelCreated(self, state, _response=None, _ex=None, _sent=None, _ctx=None):
  956. return _M_Murmur.ServerCallback._op_channelCreated.begin(self, ((state, ), _response, _ex, _sent, _ctx))
  957. '''Called when a new channel is created.
  958. Arguments:
  959. state State of new channel.'''
  960. def end_channelCreated(self, _r):
  961. return _M_Murmur.ServerCallback._op_channelCreated.end(self, _r)
  962. '''Called when a channel is removed. The channel has already been removed, you can no longer use methods like [Server::getChannelState]
  963. Arguments:
  964. state State of removed channel.'''
  965. def channelRemoved(self, state, _ctx=None):
  966. return _M_Murmur.ServerCallback._op_channelRemoved.invoke(self, ((state, ), _ctx))
  967. '''Called when a channel is removed. The channel has already been removed, you can no longer use methods like [Server::getChannelState]
  968. Arguments:
  969. state State of removed channel.'''
  970. def begin_channelRemoved(self, state, _response=None, _ex=None, _sent=None, _ctx=None):
  971. return _M_Murmur.ServerCallback._op_channelRemoved.begin(self, ((state, ), _response, _ex, _sent, _ctx))
  972. '''Called when a channel is removed. The channel has already been removed, you can no longer use methods like [Server::getChannelState]
  973. Arguments:
  974. state State of removed channel.'''
  975. def end_channelRemoved(self, _r):
  976. return _M_Murmur.ServerCallback._op_channelRemoved.end(self, _r)
  977. '''Called when a new channel state changes. This is called if the channel is moved, renamed or if new links are added.
  978. Arguments:
  979. state New state of channel.'''
  980. def channelStateChanged(self, state, _ctx=None):
  981. return _M_Murmur.ServerCallback._op_channelStateChanged.invoke(self, ((state, ), _ctx))
  982. '''Called when a new channel state changes. This is called if the channel is moved, renamed or if new links are added.
  983. Arguments:
  984. state New state of channel.'''
  985. def begin_channelStateChanged(self, state, _response=None, _ex=None, _sent=None, _ctx=None):
  986. return _M_Murmur.ServerCallback._op_channelStateChanged.begin(self, ((state, ), _response, _ex, _sent, _ctx))
  987. '''Called when a new channel state changes. This is called if the channel is moved, renamed or if new links are added.
  988. Arguments:
  989. state New state of channel.'''
  990. def end_channelStateChanged(self, _r):
  991. return _M_Murmur.ServerCallback._op_channelStateChanged.end(self, _r)
  992. def checkedCast(proxy, facetOrCtx=None, _ctx=None):
  993. return _M_Murmur.ServerCallbackPrx.ice_checkedCast(proxy, '::Murmur::ServerCallback', facetOrCtx, _ctx)
  994. checkedCast = staticmethod(checkedCast)
  995. def uncheckedCast(proxy, facet=None):
  996. return _M_Murmur.ServerCallbackPrx.ice_uncheckedCast(proxy, facet)
  997. uncheckedCast = staticmethod(uncheckedCast)
  998. _M_Murmur._t_ServerCallbackPrx = IcePy.defineProxy('::Murmur::ServerCallback', ServerCallbackPrx)
  999. _M_Murmur._t_ServerCallback = IcePy.defineClass('::Murmur::ServerCallback', ServerCallback, (), True, None, (), ())
  1000. ServerCallback._ice_type = _M_Murmur._t_ServerCallback
  1001. ServerCallback._op_userConnected = IcePy.Operation('userConnected', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, False, (), (((), _M_Murmur._t_User),), (), None, ())
  1002. ServerCallback._op_userDisconnected = IcePy.Operation('userDisconnected', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, False, (), (((), _M_Murmur._t_User),), (), None, ())
  1003. ServerCallback._op_userStateChanged = IcePy.Operation('userStateChanged', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, False, (), (((), _M_Murmur._t_User),), (), None, ())
  1004. ServerCallback._op_channelCreated = IcePy.Operation('channelCreated', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, False, (), (((), _M_Murmur._t_Channel),), (), None, ())
  1005. ServerCallback._op_channelRemoved = IcePy.Operation('channelRemoved', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, False, (), (((), _M_Murmur._t_Channel),), (), None, ())
  1006. ServerCallback._op_channelStateChanged = IcePy.Operation('channelStateChanged', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, False, (), (((), _M_Murmur._t_Channel),), (), None, ())
  1007. _M_Murmur.ServerCallback = ServerCallback
  1008. del ServerCallback
  1009. _M_Murmur.ServerCallbackPrx = ServerCallbackPrx
  1010. del ServerCallbackPrx
  1011. _M_Murmur.ContextServer = 1
  1012. _M_Murmur.ContextChannel = 2
  1013. _M_Murmur.ContextUser = 4
  1014. if not _M_Murmur.__dict__.has_key('ServerContextCallback'):
  1015. _M_Murmur.ServerContextCallback = Ice.createTempClass()
  1016. class ServerContextCallback(Ice.Object):
  1017. '''Callback interface for context actions. You need to supply one of these for [Server::addContext].
  1018. If an added callback ever throws an exception or goes away, it will be automatically removed.
  1019. Please note that all callbacks are done asynchronously; murmur does not wait for the callback to
  1020. complete before continuing processing.'''
  1021. def __init__(self):
  1022. if __builtin__.type(self) == _M_Murmur.ServerContextCallback:
  1023. raise RuntimeError('Murmur.ServerContextCallback is an abstract class')
  1024. def ice_ids(self, current=None):
  1025. return ('::Ice::Object', '::Murmur::ServerContextCallback')
  1026. def ice_id(self, current=None):
  1027. return '::Murmur::ServerContextCallback'
  1028. def ice_staticId():
  1029. return '::Murmur::ServerContextCallback'
  1030. ice_staticId = staticmethod(ice_staticId)
  1031. def contextAction(self, action, usr, session, channelid, current=None):
  1032. '''Called when a context action is performed.
  1033. Arguments:
  1034. action Action to be performed.
  1035. usr User which initiated the action.
  1036. session If nonzero, session of target user.
  1037. channelid If nonzero, session of target channel.'''
  1038. pass
  1039. def __str__(self):
  1040. return IcePy.stringify(self, _M_Murmur._t_ServerContextCallback)
  1041. __repr__ = __str__
  1042. _M_Murmur.ServerContextCallbackPrx = Ice.createTempClass()
  1043. class ServerContextCallbackPrx(Ice.ObjectPrx):
  1044. '''Called when a context action is performed.
  1045. Arguments:
  1046. action Action to be performed.
  1047. usr User which initiated the action.
  1048. session If nonzero, session of target user.
  1049. channelid If nonzero, session of target channel.'''
  1050. def contextAction(self, action, usr, session, channelid, _ctx=None):
  1051. return _M_Murmur.ServerContextCallback._op_contextAction.invoke(self, ((action, usr, session, channelid), _ctx))
  1052. '''Called when a context action is performed.
  1053. Arguments:
  1054. action Action to be performed.
  1055. usr User which initiated the action.
  1056. session If nonzero, session of target user.
  1057. channelid If nonzero, session of target channel.'''
  1058. def begin_contextAction(self, action, usr, session, channelid, _response=None, _ex=None, _sent=None, _ctx=None):
  1059. return _M_Murmur.ServerContextCallback._op_contextAction.begin(self, ((action, usr, session, channelid), _response, _ex, _sent, _ctx))
  1060. '''Called when a context action is performed.
  1061. Arguments:
  1062. action Action to be performed.
  1063. usr User which initiated the action.
  1064. session If nonzero, session of target user.
  1065. channelid If nonzero, session of target channel.'''
  1066. def end_contextAction(self, _r):
  1067. return _M_Murmur.ServerContextCallback._op_contextAction.end(self, _r)
  1068. def checkedCast(proxy, facetOrCtx=None, _ctx=None):
  1069. return _M_Murmur.ServerContextCallbackPrx.ice_checkedCast(proxy, '::Murmur::ServerContextCallback', facetOrCtx, _ctx)
  1070. checkedCast = staticmethod(checkedCast)
  1071. def uncheckedCast(proxy, facet=None):
  1072. return _M_Murmur.ServerContextCallbackPrx.ice_uncheckedCast(proxy, facet)
  1073. uncheckedCast = staticmethod(uncheckedCast)
  1074. _M_Murmur._t_ServerContextCallbackPrx = IcePy.defineProxy('::Murmur::ServerContextCallback', ServerContextCallbackPrx)
  1075. _M_Murmur._t_ServerContextCallback = IcePy.defineClass('::Murmur::ServerContextCallback', ServerContextCallback, (), True, None, (), ())
  1076. ServerContextCallback._ice_type = _M_Murmur._t_ServerContextCallback
  1077. ServerContextCallback._op_contextAction = IcePy.Operation('contextAction', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, False, (), (((), IcePy._t_string), ((), _M_Murmur._t_User), ((), IcePy._t_int), ((), IcePy._t_int)), (), None, ())
  1078. _M_Murmur.ServerContextCallback = ServerContextCallback
  1079. del ServerContextCallback
  1080. _M_Murmur.ServerContextCallbackPrx = ServerContextCallbackPrx
  1081. del ServerContextCallbackPrx
  1082. if not _M_Murmur.__dict__.has_key('ServerAuthenticator'):
  1083. _M_Murmur.ServerAuthenticator = Ice.createTempClass()
  1084. class ServerAuthenticator(Ice.Object):
  1085. '''Callback interface for server authentication. You need to supply one of these for [Server::setAuthenticator].
  1086. If an added callback ever throws an exception or goes away, it will be automatically removed.
  1087. Please note that unlike [ServerCallback] and [ServerContextCallback], these methods are called
  1088. synchronously. If the response lags, the entire murmur server will lag.
  1089. Also note that, as the method calls are synchronous, making a call to [Server] or [Meta] will
  1090. deadlock the server.'''
  1091. def __init__(self):
  1092. if __builtin__.type(self) == _M_Murmur.ServerAuthenticator:
  1093. raise RuntimeError('Murmur.ServerAuthenticator is an abstract class')
  1094. def ice_ids(self, current=None):
  1095. return ('::Ice::Object', '::Murmur::ServerAuthenticator')
  1096. def ice_id(self, current=None):
  1097. return '::Murmur::ServerAuthenticator'
  1098. def ice_staticId():
  1099. return '::Murmur::ServerAuthenticator'
  1100. ice_staticId = staticmethod(ice_staticId)
  1101. def authenticate(self, name, pw, certificates, certhash, certstrong, current=None):
  1102. '''Called to authenticate a user. If you do not know the username in question, always return -2 from this
  1103. method to fall through to normal database authentication.
  1104. Note that if authentication succeeds, murmur will create a record of the user in it's database, reserving
  1105. the username and id so it cannot be used for normal database authentication.
  1106. The data in the certificate (name, email addresses etc), as well as the list of signing certificates,
  1107. should only be trusted if certstrong is true.
  1108. Arguments:
  1109. name Username to authenticate.
  1110. pw Password to authenticate with.
  1111. certificates List of der encoded certificates the user connected with.
  1112. certhash Hash of user certificate, as used by murmur internally when matching.
  1113. certstrong True if certificate was valid and signed by a trusted CA.
  1114. newname Set this to change the username from the supplied one.
  1115. groups List of groups on the root channel that the user will be added to for the duration of the connection.
  1116. Returns:
  1117. UserID of authenticated user, -1 for authentication failures and -2 for unknown user (fallthrough).'''
  1118. pass
  1119. def getInfo(self, id, current=None):
  1120. '''Fetch information about a user. This is used to retrieve information like email address, keyhash etc. If you
  1121. want murmur to take care of this information itself, simply return false to fall through.
  1122. Arguments:
  1123. id User id.
  1124. key Key of information to be retrieved.
  1125. info Information about user. This needs to include at least "name".
  1126. Returns:
  1127. true if information is present, false to fall through.'''
  1128. pass
  1129. def nameToId(self, name, current=None):
  1130. '''Map a name to a user id.
  1131. Arguments:
  1132. name Username to map.
  1133. Returns:
  1134. User id or -2 for unknown name.'''
  1135. pass
  1136. def idToName(self, id, current=None):
  1137. '''Map a user to a User id.
  1138. Arguments:
  1139. id User id to map.
  1140. Returns:
  1141. Name of user or empty string for unknown id.'''
  1142. pass
  1143. def idToTexture(self, id, current=None):
  1144. '''Map a user to a custom Texture.
  1145. Arguments:
  1146. id User id to map.
  1147. Returns:
  1148. User texture or an empty texture for unknwon users or users without textures.'''
  1149. pass
  1150. def __str__(self):
  1151. return IcePy.stringify(self, _M_Murmur._t_ServerAuthenticator)
  1152. __repr__ = __str__
  1153. _M_Murmur.ServerAuthenticatorPrx = Ice.createTempClass()
  1154. class ServerAuthenticatorPrx(Ice.ObjectPrx):
  1155. '''Called to authenticate a user. If you do not know the username in question, always return -2 from this
  1156. method to fall through to normal database authentication.
  1157. Note that if authentication succeeds, murmur will create a record of the user in it's database, reserving
  1158. the username and id so it cannot be used for normal database authentication.
  1159. The data in the certificate (name, email addresses etc), as well as the list of signing certificates,
  1160. should only be trusted if certstrong is true.
  1161. Arguments:
  1162. name Username to authenticate.
  1163. pw Password to authenticate with.
  1164. certificates List of der encoded certificates the user connected with.
  1165. certhash Hash of user certificate, as used by murmur internally when matching.
  1166. certstrong True if certificate was valid and signed by a trusted CA.
  1167. newname Set this to change the username from the supplied one.
  1168. groups List of groups on the root channel that the user will be added to for the duration of the connection.
  1169. Returns:
  1170. UserID of authenticated user, -1 for authentication failures and -2 for unknown user (fallthrough).'''
  1171. def authenticate(self, name, pw, certificates, certhash, certstrong, _ctx=None):
  1172. return _M_Murmur.ServerAuthenticator._op_authenticate.invoke(self, ((name, pw, certificates, certhash, certstrong), _ctx))
  1173. '''Called to authenticate a user. If you do not know the username in question, always return -2 from this
  1174. method to fall through to normal database authentication.
  1175. Note that if authentication succeeds, murmur will create a record of the user in it's database, reserving
  1176. the username and id so it cannot be used for normal database authentication.
  1177. The data in the certificate (name, email addresses etc), as well as the list of signing certificates,
  1178. should only be trusted if certstrong is true.
  1179. Arguments:
  1180. name Username to authenticate.
  1181. pw Password to authenticate with.
  1182. certificates List of der encoded certificates the user connected with.
  1183. certhash Hash of user certificate, as used by murmur internally when matching.
  1184. certstrong True if certificate was valid and signed by a trusted CA.
  1185. newname Set this to change the username from the supplied one.
  1186. groups List of groups on the root channel that the user will be added to for the duration of the connection.
  1187. Returns:
  1188. UserID of authenticated user, -1 for authentication failures and -2 for unknown user (fallthrough).'''
  1189. def begin_authenticate(self, name, pw, certificates, certhash, certstrong, _response=None, _ex=None, _sent=None, _ctx=None):
  1190. return _M_Murmur.ServerAuthenticator._op_authenticate.begin(self, ((name, pw, certificates, certhash, certstrong), _response, _ex, _sent, _ctx))
  1191. '''Called to authenticate a user. If you do not know the username in question, always return -2 from this
  1192. method to fall through to normal database authentication.
  1193. Note that if authentication succeeds, murmur will create a record of the user in it's database, reserving
  1194. the username and id so it cannot be used for normal database authentication.
  1195. The data in the certificate (name, email addresses etc), as well as the list of signing certificates,
  1196. should only be trusted if certstrong is true.
  1197. Arguments:
  1198. name Username to authenticate.
  1199. pw Password to authenticate with.
  1200. certificates List of der encoded certificates the user connected with.
  1201. certhash Hash of user certificate, as used by murmur internally when matching.
  1202. certstrong True if certificate was valid and signed by a trusted CA.
  1203. newname Set this to change the username from the supplied one.
  1204. groups List of groups on the root channel that the user will be added to for the duration of the connection.
  1205. Returns:
  1206. UserID of authenticated user, -1 for authentication failures and -2 for unknown user (fallthrough).'''
  1207. def end_authenticate(self, _r):
  1208. return _M_Murmur.ServerAuthenticator._op_authenticate.end(self, _r)
  1209. '''Fetch information about a user. This is used to retrieve information like email address, keyhash etc. If you
  1210. want murmur to take care of this information itself, simply return false to fall through.
  1211. Arguments:
  1212. id User id.
  1213. key Key of information to be retrieved.
  1214. info Information about user. This needs to include at least "name".
  1215. Returns:
  1216. true if information is present, false to fall through.'''
  1217. def getInfo(self, id, _ctx=None):
  1218. return _M_Murmur.ServerAuthenticator._op_getInfo.invoke(self, ((id, ), _ctx))
  1219. '''Fetch information about a user. This is used to retrieve information like email address, keyhash etc. If you
  1220. want murmur to take care of this information itself, simply return false to fall through.
  1221. Arguments:
  1222. id User id.
  1223. key Key of information to be retrieved.
  1224. info Information about user. This needs to include at least "name".
  1225. Returns:
  1226. true if information is present, false to fall through.'''
  1227. def begin_getInfo(self, id, _response=None, _ex=None, _sent=None, _ctx=None):
  1228. return _M_Murmur.ServerAuthenticator._op_getInfo.begin(self, ((id, ), _response, _ex, _sent, _ctx))
  1229. '''Fetch information about a user. This is used to retrieve information like email address, keyhash etc. If you
  1230. want murmur to take care of this information itself, simply return false to fall through.
  1231. Arguments:
  1232. id User id.
  1233. key Key of information to be retrieved.
  1234. info Information about user. This needs to include at least "name".
  1235. Returns:
  1236. true if information is present, false to fall through.'''
  1237. def end_getInfo(self, _r):
  1238. return _M_Murmur.ServerAuthenticator._op_getInfo.end(self, _r)
  1239. '''Map a name to a user id.
  1240. Arguments:
  1241. name Username to map.
  1242. Returns:
  1243. User id or -2 for unknown name.'''
  1244. def nameToId(self, name, _ctx=None):
  1245. return _M_Murmur.ServerAuthenticator._op_nameToId.invoke(self, ((name, ), _ctx))
  1246. '''Map a name to a user id.
  1247. Arguments:
  1248. name Username to map.
  1249. Returns:
  1250. User id or -2 for unknown name.'''
  1251. def begin_nameToId(self, name, _response=None, _ex=None, _sent=None, _ctx=None):
  1252. return _M_Murmur.ServerAuthenticator._op_nameToId.begin(self, ((name, ), _response, _ex, _sent, _ctx))
  1253. '''Map a name to a user id.
  1254. Arguments:
  1255. name Username to map.
  1256. Returns:
  1257. User id or -2 for unknown name.'''
  1258. def end_nameToId(self, _r):
  1259. return _M_Murmur.ServerAuthenticator._op_nameToId.end(self, _r)
  1260. '''Map a user to a User id.
  1261. Arguments:
  1262. id User id to map.
  1263. Returns:
  1264. Name of user or empty string for unknown id.'''
  1265. def idToName(self, id, _ctx=None):
  1266. return _M_Murmur.ServerAuthenticator._op_idToName.invoke(self, ((id, ), _ctx))
  1267. '''Map a user to a User id.
  1268. Arguments:
  1269. id User id to map.
  1270. Returns:
  1271. Name of user or empty string for unknown id.'''
  1272. def begin_idToName(self, id, _response=None, _ex=None, _sent=None, _ctx=None):
  1273. return _M_Murmur.ServerAuthenticator._op_idToName.begin(self, ((id, ), _response, _ex, _sent, _ctx))
  1274. '''Map a user to a User id.
  1275. Arguments:
  1276. id User id to map.
  1277. Returns:
  1278. Name of user or empty string for unknown id.'''
  1279. def end_idToName(self, _r):
  1280. return _M_Murmur.ServerAuthenticator._op_idToName.end(self, _r)
  1281. '''Map a user to a custom Texture.
  1282. Arguments:
  1283. id User id to map.
  1284. Returns:
  1285. User texture or an empty texture for unknwon users or users without textures.'''
  1286. def idToTexture(self, id, _ctx=None):
  1287. return _M_Murmur.ServerAuthenticator._op_idToTexture.invoke(self, ((id, ), _ctx))
  1288. '''Map a user to a custom Texture.
  1289. Arguments:
  1290. id User id to map.
  1291. Returns:
  1292. User texture or an empty texture for unknwon users or users without textures.'''
  1293. def begin_idToTexture(self, id, _response=None, _ex=None, _sent=None, _ctx=None):
  1294. return _M_Murmur.ServerAuthenticator._op_idToTexture.begin(self, ((id, ), _response, _ex, _sent, _ctx))
  1295. '''Map a user to a custom Texture.
  1296. Arguments:
  1297. id User id to map.
  1298. Returns:
  1299. User texture or an empty texture for unknwon users or users without textures.'''
  1300. def end_idToTexture(self, _r):
  1301. return _M_Murmur.ServerAuthenticator._op_idToTexture.end(self, _r)
  1302. def checkedCast(proxy, facetOrCtx=None, _ctx=None):
  1303. return _M_Murmur.ServerAuthenticatorPrx.ice_checkedCast(proxy, '::Murmur::ServerAuthenticator', facetOrCtx, _ctx)
  1304. checkedCast = staticmethod(checkedCast)
  1305. def uncheckedCast(proxy, facet=None):
  1306. return _M_Murmur.ServerAuthenticatorPrx.ice_uncheckedCast(proxy, facet)
  1307. uncheckedCast = staticmethod(uncheckedCast)
  1308. _M_Murmur._t_ServerAuthenticatorPrx = IcePy.defineProxy('::Murmur::ServerAuthenticator', ServerAuthenticatorPrx)
  1309. _M_Murmur._t_ServerAuthenticator = IcePy.defineClass('::Murmur::ServerAuthenticator', ServerAuthenticator, (), True, None, (), ())
  1310. ServerAuthenticator._ice_type = _M_Murmur._t_ServerAuthenticator
  1311. ServerAuthenticator._op_authenticate = IcePy.Operation('authenticate', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, False, (), (((), IcePy._t_string), ((), IcePy._t_string), ((), _M_Murmur._t_CertificateList), ((), IcePy._t_string), ((), IcePy._t_bool)), (((), IcePy._t_string), ((), _M_Murmur._t_GroupNameList)), IcePy._t_int, ())
  1312. ServerAuthenticator._op_getInfo = IcePy.Operation('getInfo', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, False, (), (((), IcePy._t_int),), (((), _M_Murmur._t_UserInfoMap),), IcePy._t_bool, ())
  1313. ServerAuthenticator._op_nameToId = IcePy.Operation('nameToId', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, False, (), (((), IcePy._t_string),), (), IcePy._t_int, ())
  1314. ServerAuthenticator._op_idToName = IcePy.Operation('idToName', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, False, (), (((), IcePy._t_int),), (), IcePy._t_string, ())
  1315. ServerAuthenticator._op_idToTexture = IcePy.Operation('idToTexture', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, False, (), (((), IcePy._t_int),), (), _M_Murmur._t_Texture, ())
  1316. _M_Murmur.ServerAuthenticator = ServerAuthenticator
  1317. del ServerAuthenticator
  1318. _M_Murmur.ServerAuthenticatorPrx = ServerAuthenticatorPrx
  1319. del ServerAuthenticatorPrx
  1320. if not _M_Murmur.__dict__.has_key('ServerUpdatingAuthenticator'):
  1321. _M_Murmur.ServerUpdatingAuthenticator = Ice.createTempClass()
  1322. class ServerUpdatingAuthenticator(_M_Murmur.ServerAuthenticator):
  1323. '''Callback interface for server authentication and registration. This allows you to support both authentication
  1324. and account updating.
  1325. You do not need to implement this if all you want is authentication, you only need this if other scripts
  1326. connected to the same server calls e.g. [Server::setTexture].
  1327. Almost all of these methods support fall through, meaning murmur should continue the operation against its
  1328. own database.'''
  1329. def __init__(self):
  1330. if __builtin__.type(self) == _M_Murmur.ServerUpdatingAuthenticator:
  1331. raise RuntimeError('Murmur.ServerUpdatingAuthenticator is an abstract class')
  1332. def ice_ids(self, current=None):
  1333. return ('::Ice::Object', '::Murmur::ServerAuthenticator', '::Murmur::ServerUpdatingAuthenticator')
  1334. def ice_id(self, current=None):
  1335. return '::Murmur::ServerUpdatingAuthenticator'
  1336. def ice_staticId():
  1337. return '::Murmur::ServerUpdatingAuthenticator'
  1338. ice_staticId = staticmethod(ice_staticId)
  1339. def registerUser(self, info, current=None):
  1340. '''Register a new user.
  1341. Arguments:
  1342. info Information about user to register.
  1343. Returns:
  1344. User id of new user, -1 for registration failure, or -2 to fall through.'''
  1345. pass
  1346. def unregisterUser(self, id, current=None):
  1347. '''Unregister a user.
  1348. Arguments:
  1349. id Userid to unregister.
  1350. Returns:
  1351. 1 for successfull unregistration, 0 for unsuccessfull unregistration, -1 to fall through.'''
  1352. pass
  1353. def getRegisteredUsers(self, filter, current=None):
  1354. '''Get a list of registered users matching filter.
  1355. Arguments:
  1356. filter Substring usernames must contain. If empty, return all registered users.
  1357. Returns:
  1358. List of matching registered users.'''
  1359. pass
  1360. def setInfo(self, id, info, current=None):
  1361. '''Set additional information for user registration.
  1362. Arguments:
  1363. id Userid of registered user.
  1364. info Information to set about user. This should be merged with existing information.
  1365. Returns:
  1366. 1 for successfull update, 0 for unsuccessfull update, -1 to fall through.'''
  1367. pass
  1368. def setTexture(self, id, tex, current=None):
  1369. '''Set texture of user registration.
  1370. Arguments:
  1371. id Userid of registered user.
  1372. tex New texture.
  1373. Returns:
  1374. 1 for successfull update, 0 for unsuccessfull update, -1 to fall through.'''
  1375. pass
  1376. def __str__(self):
  1377. return IcePy.stringify(self, _M_Murmur._t_ServerUpdatingAuthenticator)
  1378. __repr__ = __str__
  1379. _M_Murmur.ServerUpdatingAuthenticatorPrx = Ice.createTempClass()
  1380. class ServerUpdatingAuthenticatorPrx(_M_Murmur.ServerAuthenticatorPrx):
  1381. '''Register a new user.
  1382. Arguments:
  1383. info Information about user to register.
  1384. Returns:
  1385. User id of new user, -1 for registration failure, or -2 to fall through.'''
  1386. def registerUser(self, info, _ctx=None):
  1387. return _M_Murmur.ServerUpdatingAuthenticator._op_registerUser.invoke(self, ((info, ), _ctx))
  1388. '''Register a new user.
  1389. Arguments:
  1390. info Information about user to register.
  1391. Returns:
  1392. User id of new user, -1 for registration failure, or -2 to fall through.'''
  1393. def begin_registerUser(self, info, _response=None, _ex=None, _sent=None, _ctx=None):
  1394. return _M_Murmur.ServerUpdatingAuthenticator._op_registerUser.begin(self, ((info, ), _response, _ex, _sent, _ctx))
  1395. '''Register a new user.
  1396. Arguments:
  1397. info Information about user to register.
  1398. Returns:
  1399. User id of new user, -1 for registration failure, or -2 to fall through.'''
  1400. def end_registerUser(self, _r):
  1401. return _M_Murmur.ServerUpdatingAuthenticator._op_registerUser.end(self, _r)
  1402. '''Unregister a user.
  1403. Arguments:
  1404. id Userid to unregister.
  1405. Returns:
  1406. 1 for successfull unregistration, 0 for unsuccessfull unregistration, -1 to fall through.'''
  1407. def unregisterUser(self, id, _ctx=None):
  1408. return _M_Murmur.ServerUpdatingAuthenticator._op_unregisterUser.invoke(self, ((id, ), _ctx))
  1409. '''Unregister a user.
  1410. Arguments:
  1411. id Userid to unregister.
  1412. Returns:
  1413. 1 for successfull unregistration, 0 for unsuccessfull unregistration, -1 to fall through.'''
  1414. def begin_unregisterUser(self, id, _response=None, _ex=None, _sent=None, _ctx=None):
  1415. return _M_Murmur.ServerUpdatingAuthenticator._op_unregisterUser.begin(self, ((id, ), _response, _ex, _sent, _ctx))
  1416. '''Unregister a user.
  1417. Arguments:
  1418. id Userid to unregister.
  1419. Returns:
  1420. 1 for successfull unregistration, 0 for unsuccessfull unregistration, -1 to fall through.'''
  1421. def end_unregisterUser(self, _r):
  1422. return _M_Murmur.ServerUpdatingAuthenticator._op_unregisterUser.end(self, _r)
  1423. '''Get a list of registered users matching filter.
  1424. Arguments:
  1425. filter Substring usernames must contain. If empty, return all registered users.
  1426. Returns:
  1427. List of matching registered users.'''
  1428. def getRegisteredUsers(self, filter, _ctx=None):
  1429. return _M_Murmur.ServerUpdatingAuthenticator._op_getRegisteredUsers.invoke(self, ((filter, ), _ctx))
  1430. '''Get a list of registered users matching filter.
  1431. Arguments:
  1432. filter Substring usernames must contain. If empty, return all registered users.
  1433. Returns:
  1434. List of matching registered users.'''
  1435. def begin_getRegisteredUsers(self, filter, _response=None, _ex=None, _sent=None, _ctx=None):
  1436. return _M_Murmur.ServerUpdatingAuthenticator._op_getRegisteredUsers.begin(self, ((filter, ), _response, _ex, _sent, _ctx))
  1437. '''Get a list of registered users matching filter.
  1438. Arguments:
  1439. filter Substring usernames must contain. If empty, return all registered users.
  1440. Returns:
  1441. List of matching registered users.'''
  1442. def end_getRegisteredUsers(self, _r):
  1443. return _M_Murmur.ServerUpdatingAuthenticator._op_getRegisteredUsers.end(self, _r)
  1444. '''Set additional information for user registration.
  1445. Arguments:
  1446. id Userid of registered user.
  1447. info Information to set about user. This should be merged with existing information.
  1448. Returns:
  1449. 1 for successfull update, 0 for unsuccessfull update, -1 to fall through.'''
  1450. def setInfo(self, id, info, _ctx=None):
  1451. return _M_Murmur.ServerUpdatingAuthenticator._op_setInfo.invoke(self, ((id, info), _ctx))
  1452. '''Set additional information for user registration.
  1453. Arguments:
  1454. id Userid of registered user.
  1455. info Information to set about user. This should be merged with existing information.
  1456. Returns:
  1457. 1 for successfull update, 0 for unsuccessfull update, -1 to fall through.'''
  1458. def begin_setInfo(self, id, info, _response=None, _ex=None, _sent=None, _ctx=None):
  1459. return _M_Murmur.ServerUpdatingAuthenticator._op_setInfo.begin(self, ((id, info), _response, _ex, _sent, _ctx))
  1460. '''Set additional information for user registration.
  1461. Arguments:
  1462. id Userid of registered user.
  1463. info Information to set about user. This should be merged with existing information.
  1464. Returns:
  1465. 1 for successfull update, 0 for unsuccessfull update, -1 to fall through.'''
  1466. def end_setInfo(self, _r):
  1467. return _M_Murmur.ServerUpdatingAuthenticator._op_setInfo.end(self, _r)
  1468. '''Set texture of user registration.
  1469. Arguments:
  1470. id Userid of registered user.
  1471. tex New texture.
  1472. Returns:
  1473. 1 for successfull update, 0 for unsuccessfull update, -1 to fall through.'''
  1474. def setTexture(self, id, tex, _ctx=None):
  1475. return _M_Murmur.ServerUpdatingAuthenticator._op_setTexture.invoke(self, ((id, tex), _ctx))
  1476. '''Set texture of user registration.
  1477. Arguments:
  1478. id Userid of registered user.
  1479. tex New texture.
  1480. Returns:
  1481. 1 for successfull update, 0 for unsuccessfull update, -1 to fall through.'''
  1482. def begin_setTexture(self, id, tex, _response=None, _ex=None, _sent=None, _ctx=None):
  1483. return _M_Murmur.ServerUpdatingAuthenticator._op_setTexture.begin(self, ((id, tex), _response, _ex, _sent, _ctx))
  1484. '''Set texture of user registration.
  1485. Arguments:
  1486. id Userid of registered user.
  1487. tex New texture.
  1488. Returns:
  1489. 1 for successfull update, 0 for unsuccessfull update, -1 to fall through.'''
  1490. def end_setTexture(self, _r):
  1491. return _M_Murmur.ServerUpdatingAuthenticator._op_setTexture.end(self, _r)
  1492. def checkedCast(proxy, facetOrCtx=None, _ctx=None):
  1493. return _M_Murmur.ServerUpdatingAuthenticatorPrx.ice_checkedCast(proxy, '::Murmur::ServerUpdatingAuthenticator', facetOrCtx, _ctx)
  1494. checkedCast = staticmethod(checkedCast)
  1495. def uncheckedCast(proxy, facet=None):
  1496. return _M_Murmur.ServerUpdatingAuthenticatorPrx.ice_uncheckedCast(proxy, facet)
  1497. uncheckedCast = staticmethod(uncheckedCast)
  1498. _M_Murmur._t_ServerUpdatingAuthenticatorPrx = IcePy.defineProxy('::Murmur::ServerUpdatingAuthenticator', ServerUpdatingAuthenticatorPrx)
  1499. _M_Murmur._t_ServerUpdatingAuthenticator = IcePy.defineClass('::Murmur::ServerUpdatingAuthenticator', ServerUpdatingAuthenticator, (), True, None, (_M_Murmur._t_ServerAuthenticator,), ())
  1500. ServerUpdatingAuthenticator._ice_type = _M_Murmur._t_ServerUpdatingAuthenticator
  1501. ServerUpdatingAuthenticator._op_registerUser = IcePy.Operation('registerUser', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, (), (((), _M_Murmur._t_UserInfoMap),), (), IcePy._t_int, ())
  1502. ServerUpdatingAuthenticator._op_unregisterUser = IcePy.Operation('unregisterUser', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, (), (((), IcePy._t_int),), (), IcePy._t_int, ())
  1503. ServerUpdatingAuthenticator._op_getRegisteredUsers = IcePy.Operation('getRegisteredUsers', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, False, (), (((), IcePy._t_string),), (), _M_Murmur._t_NameMap, ())
  1504. ServerUpdatingAuthenticator._op_setInfo = IcePy.Operation('setInfo', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, False, (), (((), IcePy._t_int), ((), _M_Murmur._t_UserInfoMap)), (), IcePy._t_int, ())
  1505. ServerUpdatingAuthenticator._op_setTexture = IcePy.Operation('setTexture', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, False, (), (((), IcePy._t_int), ((), _M_Murmur._t_Texture)), (), IcePy._t_int, ())
  1506. _M_Murmur.ServerUpdatingAuthenticator = ServerUpdatingAuthenticator
  1507. del ServerUpdatingAuthenticator
  1508. _M_Murmur.ServerUpdatingAuthenticatorPrx = ServerUpdatingAuthenticatorPrx
  1509. del ServerUpdatingAuthenticatorPrx
  1510. if not _M_Murmur.__dict__.has_key('Server'):
  1511. _M_Murmur.Server = Ice.createTempClass()
  1512. class Server(Ice.Object):
  1513. '''Per-server interface. This includes all methods for configuring and altering
  1514. the state of a single virtual server. You can retrieve a pointer to this interface
  1515. from one of the methods in [Meta].'''
  1516. def __init__(self):
  1517. if __builtin__.type(self) == _M_Murmur.Server:
  1518. raise RuntimeError('Murmur.Server is an abstract class')
  1519. def ice_ids(self, current=None):
  1520. return ('::Ice::Object', '::Murmur::Server')
  1521. def ice_id(self, current=None):
  1522. return '::Murmur::Server'
  1523. def ice_staticId():
  1524. return '::Murmur::Server'
  1525. ice_staticId = staticmethod(ice_staticId)
  1526. def isRunning_async(self, _cb, current=None):
  1527. '''Shows if the server currently running (accepting users).
  1528. Returns:
  1529. Run-state of server.'''
  1530. pass
  1531. def start_async(self, _cb, current=None):
  1532. '''Start server.'''
  1533. pass
  1534. def stop_async(self, _cb, current=None):
  1535. '''Stop server.'''
  1536. pass
  1537. def delete_async(self, _cb, current=None):
  1538. '''Delete server and all it's configuration.'''
  1539. pass
  1540. def id_async(self, _cb, current=None):
  1541. '''Fetch the server id.
  1542. Returns:
  1543. Unique server id.'''
  1544. pass
  1545. def addCallback_async(self, _cb, cb, current=None):
  1546. '''Add a callback. The callback will receive notifications about changes to users and channels.
  1547. Arguments:
  1548. cb Callback interface which will receive notifications.'''
  1549. pass
  1550. def removeCallback_async(self, _cb, cb, current=None):
  1551. '''Remove a callback.
  1552. Arguments:
  1553. cb Callback interface to be removed.'''
  1554. pass
  1555. def setAuthenticator_async(self, _cb, auth, current=None):
  1556. '''Set external authenticator. If set, all authentications from clients are forwarded to this
  1557. proxy.
  1558. Arguments:
  1559. auth Authenticator object to perform subsequent authentications.'''
  1560. pass
  1561. def getConf_async(self, _cb, key, current=None):
  1562. '''Retrieve configuration item.
  1563. Arguments:
  1564. key Configuration key.
  1565. Returns:
  1566. Configuration value. If this is empty, see [Meta::getDefaultConf]'''
  1567. pass
  1568. def getAllConf_async(self, _cb, current=None):
  1569. '''Retrieve all configuration items.
  1570. Returns:
  1571. All configured values. If a value isn't set here, the value from [Meta::getDefaultConf] is used.'''
  1572. pass
  1573. def setConf_async(self, _cb, key, value, current=None):
  1574. '''Set a configuration item.
  1575. Arguments:
  1576. key Configuration key.
  1577. value Configuration value.'''
  1578. pass
  1579. def setSuperuserPassword_async(self, _cb, pw, current=None):
  1580. '''Set superuser password. This is just a convenience for using [updateRegistration] on user id 0.
  1581. Arguments:
  1582. pw Password.'''
  1583. pass
  1584. def getLog_async(self, _cb, first, last, current=None):
  1585. '''Fetch log entries.
  1586. Arguments:
  1587. first Lowest numbered entry to fetch. 0 is the most recent item.
  1588. last Last entry to fetch.
  1589. Returns:
  1590. List of log entries.'''
  1591. pass
  1592. def getUsers_async(self, _cb, current=None):
  1593. '''Fetch all users. This returns all currently connected users on the server.
  1594. Returns:
  1595. List of connected users.'''
  1596. pass
  1597. def getChannels_async(self, _cb, current=None):
  1598. '''Fetch all channels. This returns all defined channels on the server. The root channel is always channel 0.
  1599. Returns:
  1600. List of defined channels.'''
  1601. pass
  1602. def getCertificateList_async(self, _cb, session, current=None):
  1603. '''Fetch certificate of user. This returns the complete certificate chain of a user.
  1604. Arguments:
  1605. session Connection ID of user. See [User::session].
  1606. Returns:
  1607. Certificate list of user.'''
  1608. pass
  1609. def getTree_async(self, _cb, current=None):
  1610. '''Fetch all channels and connected users as a tree. This retrieves an easy-to-use representation of the server
  1611. as a tree. This is primarily used for viewing the state of the server on a webpage.
  1612. Returns:
  1613. Recursive tree of all channels and connected users.'''
  1614. pass
  1615. def getBans_async(self, _cb, current=None):
  1616. '''Fetch all current IP bans on the server.
  1617. Returns:
  1618. List of bans.'''
  1619. pass
  1620. def setBans_async(self, _cb, bans, current=None):
  1621. '''Set all current IP bans on the server. This will replace any bans already present, so if you want to add a ban, be sure to call [getBans] and then
  1622. append to the returned list before calling this method.
  1623. Arguments:
  1624. bans List of bans.'''
  1625. pass
  1626. def kickUser_async(self, _cb, session, reason, current=None):
  1627. '''Kick a user. The user is not banned, and is free to rejoin the server.
  1628. Arguments:
  1629. session Connection ID of user. See [User::session].
  1630. reason Text message to show when user is kicked.'''
  1631. pass
  1632. def getState_async(self, _cb, session, current=None):
  1633. '''Get state of a single connected user.
  1634. Arguments:
  1635. session Connection ID of user. See [User::session].
  1636. Returns:
  1637. State of connected user.'''
  1638. pass
  1639. def setState_async(self, _cb, state, current=None):
  1640. '''Set user state. You can use this to move, mute and deafen users.
  1641. Arguments:
  1642. state User state to set.'''
  1643. pass
  1644. def sendMessage_async(self, _cb, session, text, current=None):
  1645. '''Send text message to a single user.
  1646. Arguments:
  1647. session Connection ID of user. See [User::session].
  1648. text Message to send.'''
  1649. pass
  1650. def hasPermission_async(self, _cb, session, channelid, perm, current=None):
  1651. '''Check if user is permitted to perform action.
  1652. Arguments:
  1653. session Connection ID of user. See [User::session].
  1654. channelid ID of Channel. See [Channel::id].
  1655. perm Permission bits to check.
  1656. Returns:
  1657. true if any of the permissions in perm were set for the user.'''
  1658. pass
  1659. def addContextCallback_async(self, _cb, session, action, text, cb, ctx, current=None):
  1660. '''Add a context callback. This is done per user, and will add a context menu action for the user.
  1661. Arguments:
  1662. session Session of user which should receive context entry.
  1663. action Action string, a unique name to associate with the action.
  1664. text Name of action shown to user.
  1665. cb Callback interface which will receive notifications.
  1666. ctx Context this should be used in. Needs to be one or a combination of [ContextServer], [ContextChannel] and [ContextUser].'''
  1667. pass
  1668. def removeContextCallback_async(self, _cb, cb, current=None):
  1669. '''Remove a callback.
  1670. Arguments:
  1671. cb Callback interface to be removed. This callback will be removed from all from all users.'''
  1672. pass
  1673. def getChannelState_async(self, _cb, channelid, current=None):
  1674. '''Get state of single channel.
  1675. Arguments:
  1676. channelid ID of Channel. See [Channel::id].
  1677. Returns:
  1678. State of channel.'''
  1679. pass
  1680. def setChannelState_async(self, _cb, state, current=None):
  1681. '''Set state of a single channel. You can use this to move or relink channels.
  1682. Arguments:
  1683. state Channel state to set.'''
  1684. pass
  1685. def removeChannel_async(self, _cb, channelid, current=None):
  1686. '''Remove a channel and all its subchannels.
  1687. Arguments:
  1688. channelid ID of Channel. See [Channel::id].'''
  1689. pass
  1690. def addChannel_async(self, _cb, name, parent, current=None):
  1691. '''Add a new channel.
  1692. Arguments:
  1693. name Name of new channel.
  1694. parent Channel ID of parent channel. See [Channel::id].
  1695. Returns:
  1696. ID of newly created channel.'''
  1697. pass
  1698. def sendMessageChannel_async(self, _cb, channelid, tree, text, current=None):
  1699. '''Send text message to channel or a tree of channels.
  1700. Arguments:
  1701. channelid Channel ID of channel to send to. See [Channel::id].
  1702. tree If true, the message will be sent to the channel and all its subchannels.
  1703. text Message to send.'''
  1704. pass
  1705. def getACL_async(self, _cb, channelid, current=None):
  1706. '''Retrieve ACLs and Groups on a channel.
  1707. Arguments:
  1708. channelid Channel ID of channel to fetch from. See [Channel::id].
  1709. acls List of ACLs on the channel. This will include inherited ACLs.
  1710. groups List of groups on the channel. This will include inherited groups.
  1711. inherit Does this channel inherit ACLs from the parent channel?'''
  1712. pass
  1713. def setACL_async(self, _cb, channelid, acls, groups, inherit, current=None):
  1714. '''Set ACLs and Groups on a channel. Note that this will replace all existing ACLs and groups on the channel.
  1715. Arguments:
  1716. channelid Channel ID of channel to fetch from. See [Channel::id].
  1717. acls List of ACLs on the channel.
  1718. groups List of groups on the channel.
  1719. inherit Should this channel inherit ACLs from the parent channel?'''
  1720. pass
  1721. def addUserToGroup_async(self, _cb, channelid, session, group, current=None):
  1722. '''Temporarily add a user to a group on a channel. This state is not saved, and is intended for temporary memberships.
  1723. Arguments:
  1724. channelid Channel ID of channel to add to. See [Channel::id].
  1725. session Connection ID of user. See [User::session].
  1726. group Group name to add to.'''
  1727. pass
  1728. def removeUserFromGroup_async(self, _cb, channelid, session, group, current=None):
  1729. '''Remove a user from a temporary group membership on a channel. This state is not saved, and is intended for temporary memberships.
  1730. Arguments:
  1731. channelid Channel ID of channel to add to. See [Channel::id].
  1732. session Connection ID of user. See [User::session].
  1733. group Group name to remove from.'''
  1734. pass
  1735. def redirectWhisperGroup_async(self, _cb, session, source, target, current=None):
  1736. '''Redirect whisper targets for user. If set, whenever a user tries to whisper to group "source", the whisper will be redirected to group "target".
  1737. To remove a redirect pass an empty target string. This is intended for context groups.
  1738. Arguments:
  1739. session Connection ID of user. See [User::session].
  1740. source Group name to redirect from.
  1741. target Group name to redirect to.'''
  1742. pass
  1743. def getUserNames_async(self, _cb, ids, current=None):
  1744. '''Map a list of [User::userid] to a matching name.
  1745. Arguments:
  1746. List of ids.
  1747. Returns:
  1748. Matching list of names, with an empty string representing invalid or unknown ids.'''
  1749. pass
  1750. def getUserIds_async(self, _cb, names, current=None):
  1751. '''Map a list of user names to a matching id.
  1752. Arguments:
  1753. List of names.
  1754. @reuturn List of matching ids, with -1 representing invalid or unknown user names.'''
  1755. pass
  1756. def registerUser_async(self, _cb, info, current=None):
  1757. '''Register a new user.
  1758. Arguments:
  1759. info Information about new user. Must include at least "name".
  1760. Returns:
  1761. The ID of the user. See [RegisteredUser::userid].'''
  1762. pass
  1763. def unregisterUser_async(self, _cb, userid, current=None):
  1764. '''Remove a user registration.
  1765. Arguments:
  1766. userid ID of registered user. See [RegisteredUser::userid].'''
  1767. pass
  1768. def updateRegistration_async(self, _cb, userid, info, current=None):
  1769. '''Update the registration for a user. You can use this to set the email or password of a user,
  1770. and can also use it to change the user's name.
  1771. Arguments:
  1772. registration Updated registration record.'''
  1773. pass
  1774. def getRegistration_async(self, _cb, userid, current=None):
  1775. '''Fetch registration for a single user.
  1776. Arguments:
  1777. userid ID of registered user. See [RegisteredUser::userid].
  1778. Returns:
  1779. Registration record.'''
  1780. pass
  1781. def getRegisteredUsers_async(self, _cb, filter, current=None):
  1782. '''Fetch a group of registered users.
  1783. Arguments:
  1784. filter Substring of user name. If blank, will retrieve all registered users.
  1785. Returns:
  1786. List of registration records.'''
  1787. pass
  1788. def verifyPassword_async(self, _cb, name, pw, current=None):
  1789. '''Verify the password of a user. You can use this to verify a user's credentials.
  1790. Arguments:
  1791. name User name. See [RegisteredUser::name].
  1792. pw User password.
  1793. Returns:
  1794. User ID of registered user (See [RegisteredUser::userid]), -1 for failed authentication or -2 for unknown usernames.'''
  1795. pass
  1796. def getTexture_async(self, _cb, userid, current=None):
  1797. '''Fetch user texture. Textures are stored as zlib compress()ed 600x60 32-bit BGRA data.
  1798. Arguments:
  1799. userid ID of registered user. See [RegisteredUser::userid].
  1800. Returns:
  1801. Custom texture associated with user or an empty texture.'''
  1802. pass
  1803. def setTexture_async(self, _cb, userid, tex, current=None):
  1804. '''Set user texture. The texture is a 600x60 32-bit BGRA raw texture, optionally zlib compress()ed.
  1805. Arguments:
  1806. userid ID of registered user. See [RegisteredUser::userid].
  1807. tex Texture to set for the user, or an empty texture to remove the existing texture.'''
  1808. pass
  1809. def getUptime_async(self, _cb, current=None):
  1810. '''Get virtual server uptime.
  1811. Returns:
  1812. Uptime of the virtual server in seconds'''
  1813. pass
  1814. def __str__(self):
  1815. return IcePy.stringify(self, _M_Murmur._t_Server)
  1816. __repr__ = __str__
  1817. _M_Murmur.ServerPrx = Ice.createTempClass()
  1818. class ServerPrx(Ice.ObjectPrx):
  1819. '''Shows if the server currently running (accepting users).
  1820. Returns:
  1821. Run-state of server.'''
  1822. def isRunning(self, _ctx=None):
  1823. return _M_Murmur.Server._op_isRunning.invoke(self, ((), _ctx))
  1824. '''Shows if the server currently running (accepting users).
  1825. Returns:
  1826. Run-state of server.'''
  1827. def begin_isRunning(self, _response=None, _ex=None, _sent=None, _ctx=None):
  1828. return _M_Murmur.Server._op_isRunning.begin(self, ((), _response, _ex, _sent, _ctx))
  1829. '''Shows if the server currently running (accepting users).
  1830. Returns:
  1831. Run-state of server.'''
  1832. def end_isRunning(self, _r):
  1833. return _M_Murmur.Server._op_isRunning.end(self, _r)
  1834. '''Start server.'''
  1835. def start(self, _ctx=None):
  1836. return _M_Murmur.Server._op_start.invoke(self, ((), _ctx))
  1837. '''Start server.'''
  1838. def begin_start(self, _response=None, _ex=None, _sent=None, _ctx=None):
  1839. return _M_Murmur.Server._op_start.begin(self, ((), _response, _ex, _sent, _ctx))
  1840. '''Start server.'''
  1841. def end_start(self, _r):
  1842. return _M_Murmur.Server._op_start.end(self, _r)
  1843. '''Stop server.'''
  1844. def stop(self, _ctx=None):
  1845. return _M_Murmur.Server._op_stop.invoke(self, ((), _ctx))
  1846. '''Stop server.'''
  1847. def begin_stop(self, _response=None, _ex=None, _sent=None, _ctx=None):
  1848. return _M_Murmur.Server._op_stop.begin(self, ((), _response, _ex, _sent, _ctx))
  1849. '''Stop server.'''
  1850. def end_stop(self, _r):
  1851. return _M_Murmur.Server._op_stop.end(self, _r)
  1852. '''Delete server and all it's configuration.'''
  1853. def delete(self, _ctx=None):
  1854. return _M_Murmur.Server._op_delete.invoke(self, ((), _ctx))
  1855. '''Delete server and all it's configuration.'''
  1856. def begin_delete(self, _response=None, _ex=None, _sent=None, _ctx=None):
  1857. return _M_Murmur.Server._op_delete.begin(self, ((), _response, _ex, _sent, _ctx))
  1858. '''Delete server and all it's configuration.'''
  1859. def end_delete(self, _r):
  1860. return _M_Murmur.Server._op_delete.end(self, _r)
  1861. '''Fetch the server id.
  1862. Returns:
  1863. Unique server id.'''
  1864. def id(self, _ctx=None):
  1865. return _M_Murmur.Server._op_id.invoke(self, ((), _ctx))
  1866. '''Fetch the server id.
  1867. Returns:
  1868. Unique server id.'''
  1869. def begin_id(self, _response=None, _ex=None, _sent=None, _ctx=None):
  1870. return _M_Murmur.Server._op_id.begin(self, ((), _response, _ex, _sent, _ctx))
  1871. '''Fetch the server id.
  1872. Returns:
  1873. Unique server id.'''
  1874. def end_id(self, _r):
  1875. return _M_Murmur.Server._op_id.end(self, _r)
  1876. '''Add a callback. The callback will receive notifications about changes to users and channels.
  1877. Arguments:
  1878. cb Callback interface which will receive notifications.'''
  1879. def addCallback(self, cb, _ctx=None):
  1880. return _M_Murmur.Server._op_addCallback.invoke(self, ((cb, ), _ctx))
  1881. '''Add a callback. The callback will receive notifications about changes to users and channels.
  1882. Arguments:
  1883. cb Callback interface which will receive notifications.'''
  1884. def begin_addCallback(self, cb, _response=None, _ex=None, _sent=None, _ctx=None):
  1885. return _M_Murmur.Server._op_addCallback.begin(self, ((cb, ), _response, _ex, _sent, _ctx))
  1886. '''Add a callback. The callback will receive notifications about changes to users and channels.
  1887. Arguments:
  1888. cb Callback interface which will receive notifications.'''
  1889. def end_addCallback(self, _r):
  1890. return _M_Murmur.Server._op_addCallback.end(self, _r)
  1891. '''Remove a callback.
  1892. Arguments:
  1893. cb Callback interface to be removed.'''
  1894. def removeCallback(self, cb, _ctx=None):
  1895. return _M_Murmur.Server._op_removeCallback.invoke(self, ((cb, ), _ctx))
  1896. '''Remove a callback.
  1897. Arguments:
  1898. cb Callback interface to be removed.'''
  1899. def begin_removeCallback(self, cb, _response=None, _ex=None, _sent=None, _ctx=None):
  1900. return _M_Murmur.Server._op_removeCallback.begin(self, ((cb, ), _response, _ex, _sent, _ctx))
  1901. '''Remove a callback.
  1902. Arguments:
  1903. cb Callback interface to be removed.'''
  1904. def end_removeCallback(self, _r):
  1905. return _M_Murmur.Server._op_removeCallback.end(self, _r)
  1906. '''Set external authenticator. If set, all authentications from clients are forwarded to this
  1907. proxy.
  1908. Arguments:
  1909. auth Authenticator object to perform subsequent authentications.'''
  1910. def setAuthenticator(self, auth, _ctx=None):
  1911. return _M_Murmur.Server._op_setAuthenticator.invoke(self, ((auth, ), _ctx))
  1912. '''Set external authenticator. If set, all authentications from clients are forwarded to this
  1913. proxy.
  1914. Arguments:
  1915. auth Authenticator object to perform subsequent authentications.'''
  1916. def begin_setAuthenticator(self, auth, _response=None, _ex=None, _sent=None, _ctx=None):
  1917. return _M_Murmur.Server._op_setAuthenticator.begin(self, ((auth, ), _response, _ex, _sent, _ctx))
  1918. '''Set external authenticator. If set, all authentications from clients are forwarded to this
  1919. proxy.
  1920. Arguments:
  1921. auth Authenticator object to perform subsequent authentications.'''
  1922. def end_setAuthenticator(self, _r):
  1923. return _M_Murmur.Server._op_setAuthenticator.end(self, _r)
  1924. '''Retrieve configuration item.
  1925. Arguments:
  1926. key Configuration key.
  1927. Returns:
  1928. Configuration value. If this is empty, see [Meta::getDefaultConf]'''
  1929. def getConf(self, key, _ctx=None):
  1930. return _M_Murmur.Server._op_getConf.invoke(self, ((key, ), _ctx))
  1931. '''Retrieve configuration item.
  1932. Arguments:
  1933. key Configuration key.
  1934. Returns:
  1935. Configuration value. If this is empty, see [Meta::getDefaultConf]'''
  1936. def begin_getConf(self, key, _response=None, _ex=None, _sent=None, _ctx=None):
  1937. return _M_Murmur.Server._op_getConf.begin(self, ((key, ), _response, _ex, _sent, _ctx))
  1938. '''Retrieve configuration item.
  1939. Arguments:
  1940. key Configuration key.
  1941. Returns:
  1942. Configuration value. If this is empty, see [Meta::getDefaultConf]'''
  1943. def end_getConf(self, _r):
  1944. return _M_Murmur.Server._op_getConf.end(self, _r)
  1945. '''Retrieve all configuration items.
  1946. Returns:
  1947. All configured values. If a value isn't set here, the value from [Meta::getDefaultConf] is used.'''
  1948. def getAllConf(self, _ctx=None):
  1949. return _M_Murmur.Server._op_getAllConf.invoke(self, ((), _ctx))
  1950. '''Retrieve all configuration items.
  1951. Returns:
  1952. All configured values. If a value isn't set here, the value from [Meta::getDefaultConf] is used.'''
  1953. def begin_getAllConf(self, _response=None, _ex=None, _sent=None, _ctx=None):
  1954. return _M_Murmur.Server._op_getAllConf.begin(self, ((), _response, _ex, _sent, _ctx))
  1955. '''Retrieve all configuration items.
  1956. Returns:
  1957. All configured values. If a value isn't set here, the value from [Meta::getDefaultConf] is used.'''
  1958. def end_getAllConf(self, _r):
  1959. return _M_Murmur.Server._op_getAllConf.end(self, _r)
  1960. '''Set a configuration item.
  1961. Arguments:
  1962. key Configuration key.
  1963. value Configuration value.'''
  1964. def setConf(self, key, value, _ctx=None):
  1965. return _M_Murmur.Server._op_setConf.invoke(self, ((key, value), _ctx))
  1966. '''Set a configuration item.
  1967. Arguments:
  1968. key Configuration key.
  1969. value Configuration value.'''
  1970. def begin_setConf(self, key, value, _response=None, _ex=None, _sent=None, _ctx=None):
  1971. return _M_Murmur.Server._op_setConf.begin(self, ((key, value), _response, _ex, _sent, _ctx))
  1972. '''Set a configuration item.
  1973. Arguments:
  1974. key Configuration key.
  1975. value Configuration value.'''
  1976. def end_setConf(self, _r):
  1977. return _M_Murmur.Server._op_setConf.end(self, _r)
  1978. '''Set superuser password. This is just a convenience for using [updateRegistration] on user id 0.
  1979. Arguments:
  1980. pw Password.'''
  1981. def setSuperuserPassword(self, pw, _ctx=None):
  1982. return _M_Murmur.Server._op_setSuperuserPassword.invoke(self, ((pw, ), _ctx))
  1983. '''Set superuser password. This is just a convenience for using [updateRegistration] on user id 0.
  1984. Arguments:
  1985. pw Password.'''
  1986. def begin_setSuperuserPassword(self, pw, _response=None, _ex=None, _sent=None, _ctx=None):
  1987. return _M_Murmur.Server._op_setSuperuserPassword.begin(self, ((pw, ), _response, _ex, _sent, _ctx))
  1988. '''Set superuser password. This is just a convenience for using [updateRegistration] on user id 0.
  1989. Arguments:
  1990. pw Password.'''
  1991. def end_setSuperuserPassword(self, _r):
  1992. return _M_Murmur.Server._op_setSuperuserPassword.end(self, _r)
  1993. '''Fetch log entries.
  1994. Arguments:
  1995. first Lowest numbered entry to fetch. 0 is the most recent item.
  1996. last Last entry to fetch.
  1997. Returns:
  1998. List of log entries.'''
  1999. def getLog(self, first, last, _ctx=None):
  2000. return _M_Murmur.Server._op_getLog.invoke(self, ((first, last), _ctx))
  2001. '''Fetch log entries.
  2002. Arguments:
  2003. first Lowest numbered entry to fetch. 0 is the most recent item.
  2004. last Last entry to fetch.
  2005. Returns:
  2006. List of log entries.'''
  2007. def begin_getLog(self, first, last, _response=None, _ex=None, _sent=None, _ctx=None):
  2008. return _M_Murmur.Server._op_getLog.begin(self, ((first, last), _response, _ex, _sent, _ctx))
  2009. '''Fetch log entries.
  2010. Arguments:
  2011. first Lowest numbered entry to fetch. 0 is the most recent item.
  2012. last Last entry to fetch.
  2013. Returns:
  2014. List of log entries.'''
  2015. def end_getLog(self, _r):
  2016. return _M_Murmur.Server._op_getLog.end(self, _r)
  2017. '''Fetch all users. This returns all currently connected users on the server.
  2018. Returns:
  2019. List of connected users.'''
  2020. def getUsers(self, _ctx=None):
  2021. return _M_Murmur.Server._op_getUsers.invoke(self, ((), _ctx))
  2022. '''Fetch all users. This returns all currently connected users on the server.
  2023. Returns:
  2024. List of connected users.'''
  2025. def begin_getUsers(self, _response=None, _ex=None, _sent=None, _ctx=None):
  2026. return _M_Murmur.Server._op_getUsers.begin(self, ((), _response, _ex, _sent, _ctx))
  2027. '''Fetch all users. This returns all currently connected users on the server.
  2028. Returns:
  2029. List of connected users.'''
  2030. def end_getUsers(self, _r):
  2031. return _M_Murmur.Server._op_getUsers.end(self, _r)
  2032. '''Fetch all channels. This returns all defined channels on the server. The root channel is always channel 0.
  2033. Returns:
  2034. List of defined channels.'''
  2035. def getChannels(self, _ctx=None):
  2036. return _M_Murmur.Server._op_getChannels.invoke(self, ((), _ctx))
  2037. '''Fetch all channels. This returns all defined channels on the server. The root channel is always channel 0.
  2038. Returns:
  2039. List of defined channels.'''
  2040. def begin_getChannels(self, _response=None, _ex=None, _sent=None, _ctx=None):
  2041. return _M_Murmur.Server._op_getChannels.begin(self, ((), _response, _ex, _sent, _ctx))
  2042. '''Fetch all channels. This returns all defined channels on the server. The root channel is always channel 0.
  2043. Returns:
  2044. List of defined channels.'''
  2045. def end_getChannels(self, _r):
  2046. return _M_Murmur.Server._op_getChannels.end(self, _r)
  2047. '''Fetch certificate of user. This returns the complete certificate chain of a user.
  2048. Arguments:
  2049. session Connection ID of user. See [User::session].
  2050. Returns:
  2051. Certificate list of user.'''
  2052. def getCertificateList(self, session, _ctx=None):
  2053. return _M_Murmur.Server._op_getCertificateList.invoke(self, ((session, ), _ctx))
  2054. '''Fetch certificate of user. This returns the complete certificate chain of a user.
  2055. Arguments:
  2056. session Connection ID of user. See [User::session].
  2057. Returns:
  2058. Certificate list of user.'''
  2059. def begin_getCertificateList(self, session, _response=None, _ex=None, _sent=None, _ctx=None):
  2060. return _M_Murmur.Server._op_getCertificateList.begin(self, ((session, ), _response, _ex, _sent, _ctx))
  2061. '''Fetch certificate of user. This returns the complete certificate chain of a user.
  2062. Arguments:
  2063. session Connection ID of user. See [User::session].
  2064. Returns:
  2065. Certificate list of user.'''
  2066. def end_getCertificateList(self, _r):
  2067. return _M_Murmur.Server._op_getCertificateList.end(self, _r)
  2068. '''Fetch all channels and connected users as a tree. This retrieves an easy-to-use representation of the server
  2069. as a tree. This is primarily used for viewing the state of the server on a webpage.
  2070. Returns:
  2071. Recursive tree of all channels and connected users.'''
  2072. def getTree(self, _ctx=None):
  2073. return _M_Murmur.Server._op_getTree.invoke(self, ((), _ctx))
  2074. '''Fetch all channels and connected users as a tree. This retrieves an easy-to-use representation of the server
  2075. as a tree. This is primarily used for viewing the state of the server on a webpage.
  2076. Returns:
  2077. Recursive tree of all channels and connected users.'''
  2078. def begin_getTree(self, _response=None, _ex=None, _sent=None, _ctx=None):
  2079. return _M_Murmur.Server._op_getTree.begin(self, ((), _response, _ex, _sent, _ctx))
  2080. '''Fetch all channels and connected users as a tree. This retrieves an easy-to-use representation of the server
  2081. as a tree. This is primarily used for viewing the state of the server on a webpage.
  2082. Returns:
  2083. Recursive tree of all channels and connected users.'''
  2084. def end_getTree(self, _r):
  2085. return _M_Murmur.Server._op_getTree.end(self, _r)
  2086. '''Fetch all current IP bans on the server.
  2087. Returns:
  2088. List of bans.'''
  2089. def getBans(self, _ctx=None):
  2090. return _M_Murmur.Server._op_getBans.invoke(self, ((), _ctx))
  2091. '''Fetch all current IP bans on the server.
  2092. Returns:
  2093. List of bans.'''
  2094. def begin_getBans(self, _response=None, _ex=None, _sent=None, _ctx=None):
  2095. return _M_Murmur.Server._op_getBans.begin(self, ((), _response, _ex, _sent, _ctx))
  2096. '''Fetch all current IP bans on the server.
  2097. Returns:
  2098. List of bans.'''
  2099. def end_getBans(self, _r):
  2100. return _M_Murmur.Server._op_getBans.end(self, _r)
  2101. '''Set all current IP bans on the server. This will replace any bans already present, so if you want to add a ban, be sure to call [getBans] and then
  2102. append to the returned list before calling this method.
  2103. Arguments:
  2104. bans List of bans.'''
  2105. def setBans(self, bans, _ctx=None):
  2106. return _M_Murmur.Server._op_setBans.invoke(self, ((bans, ), _ctx))
  2107. '''Set all current IP bans on the server. This will replace any bans already present, so if you want to add a ban, be sure to call [getBans] and then
  2108. append to the returned list before calling this method.
  2109. Arguments:
  2110. bans List of bans.'''
  2111. def begin_setBans(self, bans, _response=None, _ex=None, _sent=None, _ctx=None):
  2112. return _M_Murmur.Server._op_setBans.begin(self, ((bans, ), _response, _ex, _sent, _ctx))
  2113. '''Set all current IP bans on the server. This will replace any bans already present, so if you want to add a ban, be sure to call [getBans] and then
  2114. append to the returned list before calling this method.
  2115. Arguments:
  2116. bans List of bans.'''
  2117. def end_setBans(self, _r):
  2118. return _M_Murmur.Server._op_setBans.end(self, _r)
  2119. '''Kick a user. The user is not banned, and is free to rejoin the server.
  2120. Arguments:
  2121. session Connection ID of user. See [User::session].
  2122. reason Text message to show when user is kicked.'''
  2123. def kickUser(self, session, reason, _ctx=None):
  2124. return _M_Murmur.Server._op_kickUser.invoke(self, ((session, reason), _ctx))
  2125. '''Kick a user. The user is not banned, and is free to rejoin the server.
  2126. Arguments:
  2127. session Connection ID of user. See [User::session].
  2128. reason Text message to show when user is kicked.'''
  2129. def begin_kickUser(self, session, reason, _response=None, _ex=None, _sent=None, _ctx=None):
  2130. return _M_Murmur.Server._op_kickUser.begin(self, ((session, reason), _response, _ex, _sent, _ctx))
  2131. '''Kick a user. The user is not banned, and is free to rejoin the server.
  2132. Arguments:
  2133. session Connection ID of user. See [User::session].
  2134. reason Text message to show when user is kicked.'''
  2135. def end_kickUser(self, _r):
  2136. return _M_Murmur.Server._op_kickUser.end(self, _r)
  2137. '''Get state of a single connected user.
  2138. Arguments:
  2139. session Connection ID of user. See [User::session].
  2140. Returns:
  2141. State of connected user.'''
  2142. def getState(self, session, _ctx=None):
  2143. return _M_Murmur.Server._op_getState.invoke(self, ((session, ), _ctx))
  2144. '''Get state of a single connected user.
  2145. Arguments:
  2146. session Connection ID of user. See [User::session].
  2147. Returns:
  2148. State of connected user.'''
  2149. def begin_getState(self, session, _response=None, _ex=None, _sent=None, _ctx=None):
  2150. return _M_Murmur.Server._op_getState.begin(self, ((session, ), _response, _ex, _sent, _ctx))
  2151. '''Get state of a single connected user.
  2152. Arguments:
  2153. session Connection ID of user. See [User::session].
  2154. Returns:
  2155. State of connected user.'''
  2156. def end_getState(self, _r):
  2157. return _M_Murmur.Server._op_getState.end(self, _r)
  2158. '''Set user state. You can use this to move, mute and deafen users.
  2159. Arguments:
  2160. state User state to set.'''
  2161. def setState(self, state, _ctx=None):
  2162. return _M_Murmur.Server._op_setState.invoke(self, ((state, ), _ctx))
  2163. '''Set user state. You can use this to move, mute and deafen users.
  2164. Arguments:
  2165. state User state to set.'''
  2166. def begin_setState(self, state, _response=None, _ex=None, _sent=None, _ctx=None):
  2167. return _M_Murmur.Server._op_setState.begin(self, ((state, ), _response, _ex, _sent, _ctx))
  2168. '''Set user state. You can use this to move, mute and deafen users.
  2169. Arguments:
  2170. state User state to set.'''
  2171. def end_setState(self, _r):
  2172. return _M_Murmur.Server._op_setState.end(self, _r)
  2173. '''Send text message to a single user.
  2174. Arguments:
  2175. session Connection ID of user. See [User::session].
  2176. text Message to send.'''
  2177. def sendMessage(self, session, text, _ctx=None):
  2178. return _M_Murmur.Server._op_sendMessage.invoke(self, ((session, text), _ctx))
  2179. '''Send text message to a single user.
  2180. Arguments:
  2181. session Connection ID of user. See [User::session].
  2182. text Message to send.'''
  2183. def begin_sendMessage(self, session, text, _response=None, _ex=None, _sent=None, _ctx=None):
  2184. return _M_Murmur.Server._op_sendMessage.begin(self, ((session, text), _response, _ex, _sent, _ctx))
  2185. '''Send text message to a single user.
  2186. Arguments:
  2187. session Connection ID of user. See [User::session].
  2188. text Message to send.'''
  2189. def end_sendMessage(self, _r):
  2190. return _M_Murmur.Server._op_sendMessage.end(self, _r)
  2191. '''Check if user is permitted to perform action.
  2192. Arguments:
  2193. session Connection ID of user. See [User::session].
  2194. channelid ID of Channel. See [Channel::id].
  2195. perm Permission bits to check.
  2196. Returns:
  2197. true if any of the permissions in perm were set for the user.'''
  2198. def hasPermission(self, session, channelid, perm, _ctx=None):
  2199. return _M_Murmur.Server._op_hasPermission.invoke(self, ((session, channelid, perm), _ctx))
  2200. '''Check if user is permitted to perform action.
  2201. Arguments:
  2202. session Connection ID of user. See [User::session].
  2203. channelid ID of Channel. See [Channel::id].
  2204. perm Permission bits to check.
  2205. Returns:
  2206. true if any of the permissions in perm were set for the user.'''
  2207. def begin_hasPermission(self, session, channelid, perm, _response=None, _ex=None, _sent=None, _ctx=None):
  2208. return _M_Murmur.Server._op_hasPermission.begin(self, ((session, channelid, perm), _response, _ex, _sent, _ctx))
  2209. '''Check if user is permitted to perform action.
  2210. Arguments:
  2211. session Connection ID of user. See [User::session].
  2212. channelid ID of Channel. See [Channel::id].
  2213. perm Permission bits to check.
  2214. Returns:
  2215. true if any of the permissions in perm were set for the user.'''
  2216. def end_hasPermission(self, _r):
  2217. return _M_Murmur.Server._op_hasPermission.end(self, _r)
  2218. '''Add a context callback. This is done per user, and will add a context menu action for the user.
  2219. Arguments:
  2220. session Session of user which should receive context entry.
  2221. action Action string, a unique name to associate with the action.
  2222. text Name of action shown to user.
  2223. cb Callback interface which will receive notifications.
  2224. ctx Context this should be used in. Needs to be one or a combination of [ContextServer], [ContextChannel] and [ContextUser].'''
  2225. def addContextCallback(self, session, action, text, cb, ctx, _ctx=None):
  2226. return _M_Murmur.Server._op_addContextCallback.invoke(self, ((session, action, text, cb, ctx), _ctx))
  2227. '''Add a context callback. This is done per user, and will add a context menu action for the user.
  2228. Arguments:
  2229. session Session of user which should receive context entry.
  2230. action Action string, a unique name to associate with the action.
  2231. text Name of action shown to user.
  2232. cb Callback interface which will receive notifications.
  2233. ctx Context this should be used in. Needs to be one or a combination of [ContextServer], [ContextChannel] and [ContextUser].'''
  2234. def begin_addContextCallback(self, session, action, text, cb, ctx, _response=None, _ex=None, _sent=None, _ctx=None):
  2235. return _M_Murmur.Server._op_addContextCallback.begin(self, ((session, action, text, cb, ctx), _response, _ex, _sent, _ctx))
  2236. '''Add a context callback. This is done per user, and will add a context menu action for the user.
  2237. Arguments:
  2238. session Session of user which should receive context entry.
  2239. action Action string, a unique name to associate with the action.
  2240. text Name of action shown to user.
  2241. cb Callback interface which will receive notifications.
  2242. ctx Context this should be used in. Needs to be one or a combination of [ContextServer], [ContextChannel] and [ContextUser].'''
  2243. def end_addContextCallback(self, _r):
  2244. return _M_Murmur.Server._op_addContextCallback.end(self, _r)
  2245. '''Remove a callback.
  2246. Arguments:
  2247. cb Callback interface to be removed. This callback will be removed from all from all users.'''
  2248. def removeContextCallback(self, cb, _ctx=None):
  2249. return _M_Murmur.Server._op_removeContextCallback.invoke(self, ((cb, ), _ctx))
  2250. '''Remove a callback.
  2251. Arguments:
  2252. cb Callback interface to be removed. This callback will be removed from all from all users.'''
  2253. def begin_removeContextCallback(self, cb, _response=None, _ex=None, _sent=None, _ctx=None):
  2254. return _M_Murmur.Server._op_removeContextCallback.begin(self, ((cb, ), _response, _ex, _sent, _ctx))
  2255. '''Remove a callback.
  2256. Arguments:
  2257. cb Callback interface to be removed. This callback will be removed from all from all users.'''
  2258. def end_removeContextCallback(self, _r):
  2259. return _M_Murmur.Server._op_removeContextCallback.end(self, _r)
  2260. '''Get state of single channel.
  2261. Arguments:
  2262. channelid ID of Channel. See [Channel::id].
  2263. Returns:
  2264. State of channel.'''
  2265. def getChannelState(self, channelid, _ctx=None):
  2266. return _M_Murmur.Server._op_getChannelState.invoke(self, ((channelid, ), _ctx))
  2267. '''Get state of single channel.
  2268. Arguments:
  2269. channelid ID of Channel. See [Channel::id].
  2270. Returns:
  2271. State of channel.'''
  2272. def begin_getChannelState(self, channelid, _response=None, _ex=None, _sent=None, _ctx=None):
  2273. return _M_Murmur.Server._op_getChannelState.begin(self, ((channelid, ), _response, _ex, _sent, _ctx))
  2274. '''Get state of single channel.
  2275. Arguments:
  2276. channelid ID of Channel. See [Channel::id].
  2277. Returns:
  2278. State of channel.'''
  2279. def end_getChannelState(self, _r):
  2280. return _M_Murmur.Server._op_getChannelState.end(self, _r)
  2281. '''Set state of a single channel. You can use this to move or relink channels.
  2282. Arguments:
  2283. state Channel state to set.'''
  2284. def setChannelState(self, state, _ctx=None):
  2285. return _M_Murmur.Server._op_setChannelState.invoke(self, ((state, ), _ctx))
  2286. '''Set state of a single channel. You can use this to move or relink channels.
  2287. Arguments:
  2288. state Channel state to set.'''
  2289. def begin_setChannelState(self, state, _response=None, _ex=None, _sent=None, _ctx=None):
  2290. return _M_Murmur.Server._op_setChannelState.begin(self, ((state, ), _response, _ex, _sent, _ctx))
  2291. '''Set state of a single channel. You can use this to move or relink channels.
  2292. Arguments:
  2293. state Channel state to set.'''
  2294. def end_setChannelState(self, _r):
  2295. return _M_Murmur.Server._op_setChannelState.end(self, _r)
  2296. '''Remove a channel and all its subchannels.
  2297. Arguments:
  2298. channelid ID of Channel. See [Channel::id].'''
  2299. def removeChannel(self, channelid, _ctx=None):
  2300. return _M_Murmur.Server._op_removeChannel.invoke(self, ((channelid, ), _ctx))
  2301. '''Remove a channel and all its subchannels.
  2302. Arguments:
  2303. channelid ID of Channel. See [Channel::id].'''
  2304. def begin_removeChannel(self, channelid, _response=None, _ex=None, _sent=None, _ctx=None):
  2305. return _M_Murmur.Server._op_removeChannel.begin(self, ((channelid, ), _response, _ex, _sent, _ctx))
  2306. '''Remove a channel and all its subchannels.
  2307. Arguments:
  2308. channelid ID of Channel. See [Channel::id].'''
  2309. def end_removeChannel(self, _r):
  2310. return _M_Murmur.Server._op_removeChannel.end(self, _r)
  2311. '''Add a new channel.
  2312. Arguments:
  2313. name Name of new channel.
  2314. parent Channel ID of parent channel. See [Channel::id].
  2315. Returns:
  2316. ID of newly created channel.'''
  2317. def addChannel(self, name, parent, _ctx=None):
  2318. return _M_Murmur.Server._op_addChannel.invoke(self, ((name, parent), _ctx))
  2319. '''Add a new channel.
  2320. Arguments:
  2321. name Name of new channel.
  2322. parent Channel ID of parent channel. See [Channel::id].
  2323. Returns:
  2324. ID of newly created channel.'''
  2325. def begin_addChannel(self, name, parent, _response=None, _ex=None, _sent=None, _ctx=None):
  2326. return _M_Murmur.Server._op_addChannel.begin(self, ((name, parent), _response, _ex, _sent, _ctx))
  2327. '''Add a new channel.
  2328. Arguments:
  2329. name Name of new channel.
  2330. parent Channel ID of parent channel. See [Channel::id].
  2331. Returns:
  2332. ID of newly created channel.'''
  2333. def end_addChannel(self, _r):
  2334. return _M_Murmur.Server._op_addChannel.end(self, _r)
  2335. '''Send text message to channel or a tree of channels.
  2336. Arguments:
  2337. channelid Channel ID of channel to send to. See [Channel::id].
  2338. tree If true, the message will be sent to the channel and all its subchannels.
  2339. text Message to send.'''
  2340. def sendMessageChannel(self, channelid, tree, text, _ctx=None):
  2341. return _M_Murmur.Server._op_sendMessageChannel.invoke(self, ((channelid, tree, text), _ctx))
  2342. '''Send text message to channel or a tree of channels.
  2343. Arguments:
  2344. channelid Channel ID of channel to send to. See [Channel::id].
  2345. tree If true, the message will be sent to the channel and all its subchannels.
  2346. text Message to send.'''
  2347. def begin_sendMessageChannel(self, channelid, tree, text, _response=None, _ex=None, _sent=None, _ctx=None):
  2348. return _M_Murmur.Server._op_sendMessageChannel.begin(self, ((channelid, tree, text), _response, _ex, _sent, _ctx))
  2349. '''Send text message to channel or a tree of channels.
  2350. Arguments:
  2351. channelid Channel ID of channel to send to. See [Channel::id].
  2352. tree If true, the message will be sent to the channel and all its subchannels.
  2353. text Message to send.'''
  2354. def end_sendMessageChannel(self, _r):
  2355. return _M_Murmur.Server._op_sendMessageChannel.end(self, _r)
  2356. '''Retrieve ACLs and Groups on a channel.
  2357. Arguments:
  2358. channelid Channel ID of channel to fetch from. See [Channel::id].
  2359. acls List of ACLs on the channel. This will include inherited ACLs.
  2360. groups List of groups on the channel. This will include inherited groups.
  2361. inherit Does this channel inherit ACLs from the parent channel?'''
  2362. def getACL(self, channelid, _ctx=None):
  2363. return _M_Murmur.Server._op_getACL.invoke(self, ((channelid, ), _ctx))
  2364. '''Retrieve ACLs and Groups on a channel.
  2365. Arguments:
  2366. channelid Channel ID of channel to fetch from. See [Channel::id].
  2367. acls List of ACLs on the channel. This will include inherited ACLs.
  2368. groups List of groups on the channel. This will include inherited groups.
  2369. inherit Does this channel inherit ACLs from the parent channel?'''
  2370. def begin_getACL(self, channelid, _response=None, _ex=None, _sent=None, _ctx=None):
  2371. return _M_Murmur.Server._op_getACL.begin(self, ((channelid, ), _response, _ex, _sent, _ctx))
  2372. '''Retrieve ACLs and Groups on a channel.
  2373. Arguments:
  2374. channelid Channel ID of channel to fetch from. See [Channel::id].
  2375. acls List of ACLs on the channel. This will include inherited ACLs.
  2376. groups List of groups on the channel. This will include inherited groups.
  2377. inherit Does this channel inherit ACLs from the parent channel?'''
  2378. def end_getACL(self, _r):
  2379. return _M_Murmur.Server._op_getACL.end(self, _r)
  2380. '''Set ACLs and Groups on a channel. Note that this will replace all existing ACLs and groups on the channel.
  2381. Arguments:
  2382. channelid Channel ID of channel to fetch from. See [Channel::id].
  2383. acls List of ACLs on the channel.
  2384. groups List of groups on the channel.
  2385. inherit Should this channel inherit ACLs from the parent channel?'''
  2386. def setACL(self, channelid, acls, groups, inherit, _ctx=None):
  2387. return _M_Murmur.Server._op_setACL.invoke(self, ((channelid, acls, groups, inherit), _ctx))
  2388. '''Set ACLs and Groups on a channel. Note that this will replace all existing ACLs and groups on the channel.
  2389. Arguments:
  2390. channelid Channel ID of channel to fetch from. See [Channel::id].
  2391. acls List of ACLs on the channel.
  2392. groups List of groups on the channel.
  2393. inherit Should this channel inherit ACLs from the parent channel?'''
  2394. def begin_setACL(self, channelid, acls, groups, inherit, _response=None, _ex=None, _sent=None, _ctx=None):
  2395. return _M_Murmur.Server._op_setACL.begin(self, ((channelid, acls, groups, inherit), _response, _ex, _sent, _ctx))
  2396. '''Set ACLs and Groups on a channel. Note that this will replace all existing ACLs and groups on the channel.
  2397. Arguments:
  2398. channelid Channel ID of channel to fetch from. See [Channel::id].
  2399. acls List of ACLs on the channel.
  2400. groups List of groups on the channel.
  2401. inherit Should this channel inherit ACLs from the parent channel?'''
  2402. def end_setACL(self, _r):
  2403. return _M_Murmur.Server._op_setACL.end(self, _r)
  2404. '''Temporarily add a user to a group on a channel. This state is not saved, and is intended for temporary memberships.
  2405. Arguments:
  2406. channelid Channel ID of channel to add to. See [Channel::id].
  2407. session Connection ID of user. See [User::session].
  2408. group Group name to add to.'''
  2409. def addUserToGroup(self, channelid, session, group, _ctx=None):
  2410. return _M_Murmur.Server._op_addUserToGroup.invoke(self, ((channelid, session, group), _ctx))
  2411. '''Temporarily add a user to a group on a channel. This state is not saved, and is intended for temporary memberships.
  2412. Arguments:
  2413. channelid Channel ID of channel to add to. See [Channel::id].
  2414. session Connection ID of user. See [User::session].
  2415. group Group name to add to.'''
  2416. def begin_addUserToGroup(self, channelid, session, group, _response=None, _ex=None, _sent=None, _ctx=None):
  2417. return _M_Murmur.Server._op_addUserToGroup.begin(self, ((channelid, session, group), _response, _ex, _sent, _ctx))
  2418. '''Temporarily add a user to a group on a channel. This state is not saved, and is intended for temporary memberships.
  2419. Arguments:
  2420. channelid Channel ID of channel to add to. See [Channel::id].
  2421. session Connection ID of user. See [User::session].
  2422. group Group name to add to.'''
  2423. def end_addUserToGroup(self, _r):
  2424. return _M_Murmur.Server._op_addUserToGroup.end(self, _r)
  2425. '''Remove a user from a temporary group membership on a channel. This state is not saved, and is intended for temporary memberships.
  2426. Arguments:
  2427. channelid Channel ID of channel to add to. See [Channel::id].
  2428. session Connection ID of user. See [User::session].
  2429. group Group name to remove from.'''
  2430. def removeUserFromGroup(self, channelid, session, group, _ctx=None):
  2431. return _M_Murmur.Server._op_removeUserFromGroup.invoke(self, ((channelid, session, group), _ctx))
  2432. '''Remove a user from a temporary group membership on a channel. This state is not saved, and is intended for temporary memberships.
  2433. Arguments:
  2434. channelid Channel ID of channel to add to. See [Channel::id].
  2435. session Connection ID of user. See [User::session].
  2436. group Group name to remove from.'''
  2437. def begin_removeUserFromGroup(self, channelid, session, group, _response=None, _ex=None, _sent=None, _ctx=None):
  2438. return _M_Murmur.Server._op_removeUserFromGroup.begin(self, ((channelid, session, group), _response, _ex, _sent, _ctx))
  2439. '''Remove a user from a temporary group membership on a channel. This state is not saved, and is intended for temporary memberships.
  2440. Arguments:
  2441. channelid Channel ID of channel to add to. See [Channel::id].
  2442. session Connection ID of user. See [User::session].
  2443. group Group name to remove from.'''
  2444. def end_removeUserFromGroup(self, _r):
  2445. return _M_Murmur.Server._op_removeUserFromGroup.end(self, _r)
  2446. '''Redirect whisper targets for user. If set, whenever a user tries to whisper to group "source", the whisper will be redirected to group "target".
  2447. To remove a redirect pass an empty target string. This is intended for context groups.
  2448. Arguments:
  2449. session Connection ID of user. See [User::session].
  2450. source Group name to redirect from.
  2451. target Group name to redirect to.'''
  2452. def redirectWhisperGroup(self, session, source, target, _ctx=None):
  2453. return _M_Murmur.Server._op_redirectWhisperGroup.invoke(self, ((session, source, target), _ctx))
  2454. '''Redirect whisper targets for user. If set, whenever a user tries to whisper to group "source", the whisper will be redirected to group "target".
  2455. To remove a redirect pass an empty target string. This is intended for context groups.
  2456. Arguments:
  2457. session Connection ID of user. See [User::session].
  2458. source Group name to redirect from.
  2459. target Group name to redirect to.'''
  2460. def begin_redirectWhisperGroup(self, session, source, target, _response=None, _ex=None, _sent=None, _ctx=None):
  2461. return _M_Murmur.Server._op_redirectWhisperGroup.begin(self, ((session, source, target), _response, _ex, _sent, _ctx))
  2462. '''Redirect whisper targets for user. If set, whenever a user tries to whisper to group "source", the whisper will be redirected to group "target".
  2463. To remove a redirect pass an empty target string. This is intended for context groups.
  2464. Arguments:
  2465. session Connection ID of user. See [User::session].
  2466. source Group name to redirect from.
  2467. target Group name to redirect to.'''
  2468. def end_redirectWhisperGroup(self, _r):
  2469. return _M_Murmur.Server._op_redirectWhisperGroup.end(self, _r)
  2470. '''Map a list of [User::userid] to a matching name.
  2471. Arguments:
  2472. List of ids.
  2473. Returns:
  2474. Matching list of names, with an empty string representing invalid or unknown ids.'''
  2475. def getUserNames(self, ids, _ctx=None):
  2476. return _M_Murmur.Server._op_getUserNames.invoke(self, ((ids, ), _ctx))
  2477. '''Map a list of [User::userid] to a matching name.
  2478. Arguments:
  2479. List of ids.
  2480. Returns:
  2481. Matching list of names, with an empty string representing invalid or unknown ids.'''
  2482. def begin_getUserNames(self, ids, _response=None, _ex=None, _sent=None, _ctx=None):
  2483. return _M_Murmur.Server._op_getUserNames.begin(self, ((ids, ), _response, _ex, _sent, _ctx))
  2484. '''Map a list of [User::userid] to a matching name.
  2485. Arguments:
  2486. List of ids.
  2487. Returns:
  2488. Matching list of names, with an empty string representing invalid or unknown ids.'''
  2489. def end_getUserNames(self, _r):
  2490. return _M_Murmur.Server._op_getUserNames.end(self, _r)
  2491. '''Map a list of user names to a matching id.
  2492. Arguments:
  2493. List of names.
  2494. @reuturn List of matching ids, with -1 representing invalid or unknown user names.'''
  2495. def getUserIds(self, names, _ctx=None):
  2496. return _M_Murmur.Server._op_getUserIds.invoke(self, ((names, ), _ctx))
  2497. '''Map a list of user names to a matching id.
  2498. Arguments:
  2499. List of names.
  2500. @reuturn List of matching ids, with -1 representing invalid or unknown user names.'''
  2501. def begin_getUserIds(self, names, _response=None, _ex=None, _sent=None, _ctx=None):
  2502. return _M_Murmur.Server._op_getUserIds.begin(self, ((names, ), _response, _ex, _sent, _ctx))
  2503. '''Map a list of user names to a matching id.
  2504. Arguments:
  2505. List of names.
  2506. @reuturn List of matching ids, with -1 representing invalid or unknown user names.'''
  2507. def end_getUserIds(self, _r):
  2508. return _M_Murmur.Server._op_getUserIds.end(self, _r)
  2509. '''Register a new user.
  2510. Arguments:
  2511. info Information about new user. Must include at least "name".
  2512. Returns:
  2513. The ID of the user. See [RegisteredUser::userid].'''
  2514. def registerUser(self, info, _ctx=None):
  2515. return _M_Murmur.Server._op_registerUser.invoke(self, ((info, ), _ctx))
  2516. '''Register a new user.
  2517. Arguments:
  2518. info Information about new user. Must include at least "name".
  2519. Returns:
  2520. The ID of the user. See [RegisteredUser::userid].'''
  2521. def begin_registerUser(self, info, _response=None, _ex=None, _sent=None, _ctx=None):
  2522. return _M_Murmur.Server._op_registerUser.begin(self, ((info, ), _response, _ex, _sent, _ctx))
  2523. '''Register a new user.
  2524. Arguments:
  2525. info Information about new user. Must include at least "name".
  2526. Returns:
  2527. The ID of the user. See [RegisteredUser::userid].'''
  2528. def end_registerUser(self, _r):
  2529. return _M_Murmur.Server._op_registerUser.end(self, _r)
  2530. '''Remove a user registration.
  2531. Arguments:
  2532. userid ID of registered user. See [RegisteredUser::userid].'''
  2533. def unregisterUser(self, userid, _ctx=None):
  2534. return _M_Murmur.Server._op_unregisterUser.invoke(self, ((userid, ), _ctx))
  2535. '''Remove a user registration.
  2536. Arguments:
  2537. userid ID of registered user. See [RegisteredUser::userid].'''
  2538. def begin_unregisterUser(self, userid, _response=None, _ex=None, _sent=None, _ctx=None):
  2539. return _M_Murmur.Server._op_unregisterUser.begin(self, ((userid, ), _response, _ex, _sent, _ctx))
  2540. '''Remove a user registration.
  2541. Arguments:
  2542. userid ID of registered user. See [RegisteredUser::userid].'''
  2543. def end_unregisterUser(self, _r):
  2544. return _M_Murmur.Server._op_unregisterUser.end(self, _r)
  2545. '''Update the registration for a user. You can use this to set the email or password of a user,
  2546. and can also use it to change the user's name.
  2547. Arguments:
  2548. registration Updated registration record.'''
  2549. def updateRegistration(self, userid, info, _ctx=None):
  2550. return _M_Murmur.Server._op_updateRegistration.invoke(self, ((userid, info), _ctx))
  2551. '''Update the registration for a user. You can use this to set the email or password of a user,
  2552. and can also use it to change the user's name.
  2553. Arguments:
  2554. registration Updated registration record.'''
  2555. def begin_updateRegistration(self, userid, info, _response=None, _ex=None, _sent=None, _ctx=None):
  2556. return _M_Murmur.Server._op_updateRegistration.begin(self, ((userid, info), _response, _ex, _sent, _ctx))
  2557. '''Update the registration for a user. You can use this to set the email or password of a user,
  2558. and can also use it to change the user's name.
  2559. Arguments:
  2560. registration Updated registration record.'''
  2561. def end_updateRegistration(self, _r):
  2562. return _M_Murmur.Server._op_updateRegistration.end(self, _r)
  2563. '''Fetch registration for a single user.
  2564. Arguments:
  2565. userid ID of registered user. See [RegisteredUser::userid].
  2566. Returns:
  2567. Registration record.'''
  2568. def getRegistration(self, userid, _ctx=None):
  2569. return _M_Murmur.Server._op_getRegistration.invoke(self, ((userid, ), _ctx))
  2570. '''Fetch registration for a single user.
  2571. Arguments:
  2572. userid ID of registered user. See [RegisteredUser::userid].
  2573. Returns:
  2574. Registration record.'''
  2575. def begin_getRegistration(self, userid, _response=None, _ex=None, _sent=None, _ctx=None):
  2576. return _M_Murmur.Server._op_getRegistration.begin(self, ((userid, ), _response, _ex, _sent, _ctx))
  2577. '''Fetch registration for a single user.
  2578. Arguments:
  2579. userid ID of registered user. See [RegisteredUser::userid].
  2580. Returns:
  2581. Registration record.'''
  2582. def end_getRegistration(self, _r):
  2583. return _M_Murmur.Server._op_getRegistration.end(self, _r)
  2584. '''Fetch a group of registered users.
  2585. Arguments:
  2586. filter Substring of user name. If blank, will retrieve all registered users.
  2587. Returns:
  2588. List of registration records.'''
  2589. def getRegisteredUsers(self, filter, _ctx=None):
  2590. return _M_Murmur.Server._op_getRegisteredUsers.invoke(self, ((filter, ), _ctx))
  2591. '''Fetch a group of registered users.
  2592. Arguments:
  2593. filter Substring of user name. If blank, will retrieve all registered users.
  2594. Returns:
  2595. List of registration records.'''
  2596. def begin_getRegisteredUsers(self, filter, _response=None, _ex=None, _sent=None, _ctx=None):
  2597. return _M_Murmur.Server._op_getRegisteredUsers.begin(self, ((filter, ), _response, _ex, _sent, _ctx))
  2598. '''Fetch a group of registered users.
  2599. Arguments:
  2600. filter Substring of user name. If blank, will retrieve all registered users.
  2601. Returns:
  2602. List of registration records.'''
  2603. def end_getRegisteredUsers(self, _r):
  2604. return _M_Murmur.Server._op_getRegisteredUsers.end(self, _r)
  2605. '''Verify the password of a user. You can use this to verify a user's credentials.
  2606. Arguments:
  2607. name User name. See [RegisteredUser::name].
  2608. pw User password.
  2609. Returns:
  2610. User ID of registered user (See [RegisteredUser::userid]), -1 for failed authentication or -2 for unknown usernames.'''
  2611. def verifyPassword(self, name, pw, _ctx=None):
  2612. return _M_Murmur.Server._op_verifyPassword.invoke(self, ((name, pw), _ctx))
  2613. '''Verify the password of a user. You can use this to verify a user's credentials.
  2614. Arguments:
  2615. name User name. See [RegisteredUser::name].
  2616. pw User password.
  2617. Returns:
  2618. User ID of registered user (See [RegisteredUser::userid]), -1 for failed authentication or -2 for unknown usernames.'''
  2619. def begin_verifyPassword(self, name, pw, _response=None, _ex=None, _sent=None, _ctx=None):
  2620. return _M_Murmur.Server._op_verifyPassword.begin(self, ((name, pw), _response, _ex, _sent, _ctx))
  2621. '''Verify the password of a user. You can use this to verify a user's credentials.
  2622. Arguments:
  2623. name User name. See [RegisteredUser::name].
  2624. pw User password.
  2625. Returns:
  2626. User ID of registered user (See [RegisteredUser::userid]), -1 for failed authentication or -2 for unknown usernames.'''
  2627. def end_verifyPassword(self, _r):
  2628. return _M_Murmur.Server._op_verifyPassword.end(self, _r)
  2629. '''Fetch user texture. Textures are stored as zlib compress()ed 600x60 32-bit BGRA data.
  2630. Arguments:
  2631. userid ID of registered user. See [RegisteredUser::userid].
  2632. Returns:
  2633. Custom texture associated with user or an empty texture.'''
  2634. def getTexture(self, userid, _ctx=None):
  2635. return _M_Murmur.Server._op_getTexture.invoke(self, ((userid, ), _ctx))
  2636. '''Fetch user texture. Textures are stored as zlib compress()ed 600x60 32-bit BGRA data.
  2637. Arguments:
  2638. userid ID of registered user. See [RegisteredUser::userid].
  2639. Returns:
  2640. Custom texture associated with user or an empty texture.'''
  2641. def begin_getTexture(self, userid, _response=None, _ex=None, _sent=None, _ctx=None):
  2642. return _M_Murmur.Server._op_getTexture.begin(self, ((userid, ), _response, _ex, _sent, _ctx))
  2643. '''Fetch user texture. Textures are stored as zlib compress()ed 600x60 32-bit BGRA data.
  2644. Arguments:
  2645. userid ID of registered user. See [RegisteredUser::userid].
  2646. Returns:
  2647. Custom texture associated with user or an empty texture.'''
  2648. def end_getTexture(self, _r):
  2649. return _M_Murmur.Server._op_getTexture.end(self, _r)
  2650. '''Set user texture. The texture is a 600x60 32-bit BGRA raw texture, optionally zlib compress()ed.
  2651. Arguments:
  2652. userid ID of registered user. See [RegisteredUser::userid].
  2653. tex Texture to set for the user, or an empty texture to remove the existing texture.'''
  2654. def setTexture(self, userid, tex, _ctx=None):
  2655. return _M_Murmur.Server._op_setTexture.invoke(self, ((userid, tex), _ctx))
  2656. '''Set user texture. The texture is a 600x60 32-bit BGRA raw texture, optionally zlib compress()ed.
  2657. Arguments:
  2658. userid ID of registered user. See [RegisteredUser::userid].
  2659. tex Texture to set for the user, or an empty texture to remove the existing texture.'''
  2660. def begin_setTexture(self, userid, tex, _response=None, _ex=None, _sent=None, _ctx=None):
  2661. return _M_Murmur.Server._op_setTexture.begin(self, ((userid, tex), _response, _ex, _sent, _ctx))
  2662. '''Set user texture. The texture is a 600x60 32-bit BGRA raw texture, optionally zlib compress()ed.
  2663. Arguments:
  2664. userid ID of registered user. See [RegisteredUser::userid].
  2665. tex Texture to set for the user, or an empty texture to remove the existing texture.'''
  2666. def end_setTexture(self, _r):
  2667. return _M_Murmur.Server._op_setTexture.end(self, _r)
  2668. '''Get virtual server uptime.
  2669. Returns:
  2670. Uptime of the virtual server in seconds'''
  2671. def getUptime(self, _ctx=None):
  2672. return _M_Murmur.Server._op_getUptime.invoke(self, ((), _ctx))
  2673. '''Get virtual server uptime.
  2674. Returns:
  2675. Uptime of the virtual server in seconds'''
  2676. def begin_getUptime(self, _response=None, _ex=None, _sent=None, _ctx=None):
  2677. return _M_Murmur.Server._op_getUptime.begin(self, ((), _response, _ex, _sent, _ctx))
  2678. '''Get virtual server uptime.
  2679. Returns:
  2680. Uptime of the virtual server in seconds'''
  2681. def end_getUptime(self, _r):
  2682. return _M_Murmur.Server._op_getUptime.end(self, _r)
  2683. def checkedCast(proxy, facetOrCtx=None, _ctx=None):
  2684. return _M_Murmur.ServerPrx.ice_checkedCast(proxy, '::Murmur::Server', facetOrCtx, _ctx)
  2685. checkedCast = staticmethod(checkedCast)
  2686. def uncheckedCast(proxy, facet=None):
  2687. return _M_Murmur.ServerPrx.ice_uncheckedCast(proxy, facet)
  2688. uncheckedCast = staticmethod(uncheckedCast)
  2689. _M_Murmur._t_ServerPrx = IcePy.defineProxy('::Murmur::Server', ServerPrx)
  2690. _M_Murmur._t_Server = IcePy.defineClass('::Murmur::Server', Server, (), True, None, (), ())
  2691. Server._ice_type = _M_Murmur._t_Server
  2692. Server._op_isRunning = IcePy.Operation('isRunning', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (), (), IcePy._t_bool, ())
  2693. Server._op_start = IcePy.Operation('start', Ice.OperationMode.Normal, Ice.OperationMode.Normal, True, (), (), (), None, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_ServerFailureException))
  2694. Server._op_stop = IcePy.Operation('stop', Ice.OperationMode.Normal, Ice.OperationMode.Normal, True, (), (), (), None, (_M_Murmur._t_ServerBootedException,))
  2695. Server._op_delete = IcePy.Operation('delete', Ice.OperationMode.Normal, Ice.OperationMode.Normal, True, (), (), (), None, (_M_Murmur._t_ServerBootedException,))
  2696. Server._op_id = IcePy.Operation('id', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (), (), IcePy._t_int, ())
  2697. Server._op_addCallback = IcePy.Operation('addCallback', Ice.OperationMode.Normal, Ice.OperationMode.Normal, True, (), (((), _M_Murmur._t_ServerCallbackPrx),), (), None, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidCallbackException))
  2698. Server._op_removeCallback = IcePy.Operation('removeCallback', Ice.OperationMode.Normal, Ice.OperationMode.Normal, True, (), (((), _M_Murmur._t_ServerCallbackPrx),), (), None, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidCallbackException))
  2699. Server._op_setAuthenticator = IcePy.Operation('setAuthenticator', Ice.OperationMode.Normal, Ice.OperationMode.Normal, True, (), (((), _M_Murmur._t_ServerAuthenticatorPrx),), (), None, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidCallbackException))
  2700. Server._op_getConf = IcePy.Operation('getConf', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (((), IcePy._t_string),), (), IcePy._t_string, ())
  2701. Server._op_getAllConf = IcePy.Operation('getAllConf', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (), (), _M_Murmur._t_ConfigMap, ())
  2702. Server._op_setConf = IcePy.Operation('setConf', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (((), IcePy._t_string), ((), IcePy._t_string)), (), None, ())
  2703. Server._op_setSuperuserPassword = IcePy.Operation('setSuperuserPassword', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (((), IcePy._t_string),), (), None, ())
  2704. Server._op_getLog = IcePy.Operation('getLog', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (((), IcePy._t_int), ((), IcePy._t_int)), (), _M_Murmur._t_LogList, ())
  2705. Server._op_getUsers = IcePy.Operation('getUsers', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (), (), _M_Murmur._t_UserMap, (_M_Murmur._t_ServerBootedException,))
  2706. Server._op_getChannels = IcePy.Operation('getChannels', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (), (), _M_Murmur._t_ChannelMap, (_M_Murmur._t_ServerBootedException,))
  2707. Server._op_getCertificateList = IcePy.Operation('getCertificateList', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (((), IcePy._t_int),), (), _M_Murmur._t_CertificateList, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidSessionException))
  2708. Server._op_getTree = IcePy.Operation('getTree', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (), (), _M_Murmur._t_Tree, (_M_Murmur._t_ServerBootedException,))
  2709. Server._op_getBans = IcePy.Operation('getBans', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (), (), _M_Murmur._t_BanList, (_M_Murmur._t_ServerBootedException,))
  2710. Server._op_setBans = IcePy.Operation('setBans', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (((), _M_Murmur._t_BanList),), (), None, (_M_Murmur._t_ServerBootedException,))
  2711. Server._op_kickUser = IcePy.Operation('kickUser', Ice.OperationMode.Normal, Ice.OperationMode.Normal, True, (), (((), IcePy._t_int), ((), IcePy._t_string)), (), None, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidSessionException))
  2712. Server._op_getState = IcePy.Operation('getState', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (((), IcePy._t_int),), (), _M_Murmur._t_User, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidSessionException))
  2713. Server._op_setState = IcePy.Operation('setState', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (((), _M_Murmur._t_User),), (), None, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidSessionException, _M_Murmur._t_InvalidChannelException))
  2714. Server._op_sendMessage = IcePy.Operation('sendMessage', Ice.OperationMode.Normal, Ice.OperationMode.Normal, True, (), (((), IcePy._t_int), ((), IcePy._t_string)), (), None, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidSessionException))
  2715. Server._op_hasPermission = IcePy.Operation('hasPermission', Ice.OperationMode.Normal, Ice.OperationMode.Normal, True, (), (((), IcePy._t_int), ((), IcePy._t_int), ((), IcePy._t_int)), (), IcePy._t_bool, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidSessionException, _M_Murmur._t_InvalidChannelException))
  2716. Server._op_addContextCallback = IcePy.Operation('addContextCallback', Ice.OperationMode.Normal, Ice.OperationMode.Normal, True, (), (((), IcePy._t_int), ((), IcePy._t_string), ((), IcePy._t_string), ((), _M_Murmur._t_ServerContextCallbackPrx), ((), IcePy._t_int)), (), None, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidCallbackException))
  2717. Server._op_removeContextCallback = IcePy.Operation('removeContextCallback', Ice.OperationMode.Normal, Ice.OperationMode.Normal, True, (), (((), _M_Murmur._t_ServerContextCallbackPrx),), (), None, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidCallbackException))
  2718. Server._op_getChannelState = IcePy.Operation('getChannelState', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (((), IcePy._t_int),), (), _M_Murmur._t_Channel, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidChannelException))
  2719. Server._op_setChannelState = IcePy.Operation('setChannelState', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (((), _M_Murmur._t_Channel),), (), None, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidChannelException))
  2720. Server._op_removeChannel = IcePy.Operation('removeChannel', Ice.OperationMode.Normal, Ice.OperationMode.Normal, True, (), (((), IcePy._t_int),), (), None, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidChannelException))
  2721. Server._op_addChannel = IcePy.Operation('addChannel', Ice.OperationMode.Normal, Ice.OperationMode.Normal, True, (), (((), IcePy._t_string), ((), IcePy._t_int)), (), IcePy._t_int, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidChannelException))
  2722. Server._op_sendMessageChannel = IcePy.Operation('sendMessageChannel', Ice.OperationMode.Normal, Ice.OperationMode.Normal, True, (), (((), IcePy._t_int), ((), IcePy._t_bool), ((), IcePy._t_string)), (), None, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidChannelException))
  2723. Server._op_getACL = IcePy.Operation('getACL', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (((), IcePy._t_int),), (((), _M_Murmur._t_ACLList), ((), _M_Murmur._t_GroupList), ((), IcePy._t_bool)), None, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidChannelException))
  2724. Server._op_setACL = IcePy.Operation('setACL', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (((), IcePy._t_int), ((), _M_Murmur._t_ACLList), ((), _M_Murmur._t_GroupList), ((), IcePy._t_bool)), (), None, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidChannelException))
  2725. Server._op_addUserToGroup = IcePy.Operation('addUserToGroup', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (((), IcePy._t_int), ((), IcePy._t_int), ((), IcePy._t_string)), (), None, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidChannelException, _M_Murmur._t_InvalidSessionException))
  2726. Server._op_removeUserFromGroup = IcePy.Operation('removeUserFromGroup', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (((), IcePy._t_int), ((), IcePy._t_int), ((), IcePy._t_string)), (), None, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidChannelException, _M_Murmur._t_InvalidSessionException))
  2727. Server._op_redirectWhisperGroup = IcePy.Operation('redirectWhisperGroup', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (((), IcePy._t_int), ((), IcePy._t_string), ((), IcePy._t_string)), (), None, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidSessionException))
  2728. Server._op_getUserNames = IcePy.Operation('getUserNames', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (((), _M_Murmur._t_IdList),), (), _M_Murmur._t_NameMap, (_M_Murmur._t_ServerBootedException,))
  2729. Server._op_getUserIds = IcePy.Operation('getUserIds', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (((), _M_Murmur._t_NameList),), (), _M_Murmur._t_IdMap, (_M_Murmur._t_ServerBootedException,))
  2730. Server._op_registerUser = IcePy.Operation('registerUser', Ice.OperationMode.Normal, Ice.OperationMode.Normal, True, (), (((), _M_Murmur._t_UserInfoMap),), (), IcePy._t_int, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidUserException))
  2731. Server._op_unregisterUser = IcePy.Operation('unregisterUser', Ice.OperationMode.Normal, Ice.OperationMode.Normal, True, (), (((), IcePy._t_int),), (), None, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidUserException))
  2732. Server._op_updateRegistration = IcePy.Operation('updateRegistration', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (((), IcePy._t_int), ((), _M_Murmur._t_UserInfoMap)), (), None, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidUserException))
  2733. Server._op_getRegistration = IcePy.Operation('getRegistration', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (((), IcePy._t_int),), (), _M_Murmur._t_UserInfoMap, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidUserException))
  2734. Server._op_getRegisteredUsers = IcePy.Operation('getRegisteredUsers', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (((), IcePy._t_string),), (), _M_Murmur._t_NameMap, (_M_Murmur._t_ServerBootedException,))
  2735. Server._op_verifyPassword = IcePy.Operation('verifyPassword', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (((), IcePy._t_string), ((), IcePy._t_string)), (), IcePy._t_int, (_M_Murmur._t_ServerBootedException,))
  2736. Server._op_getTexture = IcePy.Operation('getTexture', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (((), IcePy._t_int),), (), _M_Murmur._t_Texture, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidUserException))
  2737. Server._op_setTexture = IcePy.Operation('setTexture', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (((), IcePy._t_int), ((), _M_Murmur._t_Texture)), (), None, (_M_Murmur._t_ServerBootedException, _M_Murmur._t_InvalidUserException, _M_Murmur._t_InvalidTextureException))
  2738. Server._op_getUptime = IcePy.Operation('getUptime', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (), (), IcePy._t_int, (_M_Murmur._t_ServerBootedException,))
  2739. _M_Murmur.Server = Server
  2740. del Server
  2741. _M_Murmur.ServerPrx = ServerPrx
  2742. del ServerPrx
  2743. if not _M_Murmur.__dict__.has_key('MetaCallback'):
  2744. _M_Murmur.MetaCallback = Ice.createTempClass()
  2745. class MetaCallback(Ice.Object):
  2746. '''Callback interface for Meta. You can supply an implementation of this to recieve notifications
  2747. when servers are stopped or started.
  2748. If an added callback ever throws an exception or goes away, it will be automatically removed.
  2749. Please note that all callbacks are done asynchronously; murmur does not wait for the callback to
  2750. complete before continuing processing.'''
  2751. def __init__(self):
  2752. if __builtin__.type(self) == _M_Murmur.MetaCallback:
  2753. raise RuntimeError('Murmur.MetaCallback is an abstract class')
  2754. def ice_ids(self, current=None):
  2755. return ('::Ice::Object', '::Murmur::MetaCallback')
  2756. def ice_id(self, current=None):
  2757. return '::Murmur::MetaCallback'
  2758. def ice_staticId():
  2759. return '::Murmur::MetaCallback'
  2760. ice_staticId = staticmethod(ice_staticId)
  2761. def started(self, srv, current=None):
  2762. '''Called when a server is started. The server is up and running when this event is sent, so all methods that
  2763. need a running server will work.
  2764. Arguments:
  2765. srv Interface for started server.'''
  2766. pass
  2767. def stopped(self, srv, current=None):
  2768. '''Called when a server is stopped. The server is already stopped when this event is sent, so no methods that
  2769. need a running server will work.
  2770. Arguments:
  2771. srv Interface for started server.'''
  2772. pass
  2773. def __str__(self):
  2774. return IcePy.stringify(self, _M_Murmur._t_MetaCallback)
  2775. __repr__ = __str__
  2776. _M_Murmur.MetaCallbackPrx = Ice.createTempClass()
  2777. class MetaCallbackPrx(Ice.ObjectPrx):
  2778. '''Called when a server is started. The server is up and running when this event is sent, so all methods that
  2779. need a running server will work.
  2780. Arguments:
  2781. srv Interface for started server.'''
  2782. def started(self, srv, _ctx=None):
  2783. return _M_Murmur.MetaCallback._op_started.invoke(self, ((srv, ), _ctx))
  2784. '''Called when a server is started. The server is up and running when this event is sent, so all methods that
  2785. need a running server will work.
  2786. Arguments:
  2787. srv Interface for started server.'''
  2788. def begin_started(self, srv, _response=None, _ex=None, _sent=None, _ctx=None):
  2789. return _M_Murmur.MetaCallback._op_started.begin(self, ((srv, ), _response, _ex, _sent, _ctx))
  2790. '''Called when a server is started. The server is up and running when this event is sent, so all methods that
  2791. need a running server will work.
  2792. Arguments:
  2793. srv Interface for started server.'''
  2794. def end_started(self, _r):
  2795. return _M_Murmur.MetaCallback._op_started.end(self, _r)
  2796. '''Called when a server is stopped. The server is already stopped when this event is sent, so no methods that
  2797. need a running server will work.
  2798. Arguments:
  2799. srv Interface for started server.'''
  2800. def stopped(self, srv, _ctx=None):
  2801. return _M_Murmur.MetaCallback._op_stopped.invoke(self, ((srv, ), _ctx))
  2802. '''Called when a server is stopped. The server is already stopped when this event is sent, so no methods that
  2803. need a running server will work.
  2804. Arguments:
  2805. srv Interface for started server.'''
  2806. def begin_stopped(self, srv, _response=None, _ex=None, _sent=None, _ctx=None):
  2807. return _M_Murmur.MetaCallback._op_stopped.begin(self, ((srv, ), _response, _ex, _sent, _ctx))
  2808. '''Called when a server is stopped. The server is already stopped when this event is sent, so no methods that
  2809. need a running server will work.
  2810. Arguments:
  2811. srv Interface for started server.'''
  2812. def end_stopped(self, _r):
  2813. return _M_Murmur.MetaCallback._op_stopped.end(self, _r)
  2814. def checkedCast(proxy, facetOrCtx=None, _ctx=None):
  2815. return _M_Murmur.MetaCallbackPrx.ice_checkedCast(proxy, '::Murmur::MetaCallback', facetOrCtx, _ctx)
  2816. checkedCast = staticmethod(checkedCast)
  2817. def uncheckedCast(proxy, facet=None):
  2818. return _M_Murmur.MetaCallbackPrx.ice_uncheckedCast(proxy, facet)
  2819. uncheckedCast = staticmethod(uncheckedCast)
  2820. _M_Murmur._t_MetaCallbackPrx = IcePy.defineProxy('::Murmur::MetaCallback', MetaCallbackPrx)
  2821. _M_Murmur._t_MetaCallback = IcePy.defineClass('::Murmur::MetaCallback', MetaCallback, (), True, None, (), ())
  2822. MetaCallback._ice_type = _M_Murmur._t_MetaCallback
  2823. MetaCallback._op_started = IcePy.Operation('started', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, (), (((), _M_Murmur._t_ServerPrx),), (), None, ())
  2824. MetaCallback._op_stopped = IcePy.Operation('stopped', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, (), (((), _M_Murmur._t_ServerPrx),), (), None, ())
  2825. _M_Murmur.MetaCallback = MetaCallback
  2826. del MetaCallback
  2827. _M_Murmur.MetaCallbackPrx = MetaCallbackPrx
  2828. del MetaCallbackPrx
  2829. if not _M_Murmur.__dict__.has_key('_t_ServerList'):
  2830. _M_Murmur._t_ServerList = IcePy.defineSequence('::Murmur::ServerList', (), _M_Murmur._t_ServerPrx)
  2831. if not _M_Murmur.__dict__.has_key('Meta'):
  2832. _M_Murmur.Meta = Ice.createTempClass()
  2833. class Meta(Ice.Object):
  2834. '''This is the meta interface. It is primarily used for retrieving the [Server] interfaces for each individual server.'''
  2835. def __init__(self):
  2836. if __builtin__.type(self) == _M_Murmur.Meta:
  2837. raise RuntimeError('Murmur.Meta is an abstract class')
  2838. def ice_ids(self, current=None):
  2839. return ('::Ice::Object', '::Murmur::Meta')
  2840. def ice_id(self, current=None):
  2841. return '::Murmur::Meta'
  2842. def ice_staticId():
  2843. return '::Murmur::Meta'
  2844. ice_staticId = staticmethod(ice_staticId)
  2845. def getServer_async(self, _cb, id, current=None):
  2846. '''Fetch interface to specific server.
  2847. Arguments:
  2848. id Server ID. See [Server::getId].
  2849. Returns:
  2850. Interface for specified server, or a null proxy if id is invalid.'''
  2851. pass
  2852. def newServer_async(self, _cb, current=None):
  2853. '''Create a new server. Call [Server::getId] on the returned interface to find it's ID.
  2854. Returns:
  2855. Interface for new server.'''
  2856. pass
  2857. def getBootedServers_async(self, _cb, current=None):
  2858. '''Fetch list of all currently running servers.
  2859. Returns:
  2860. List of interfaces for running servers.'''
  2861. pass
  2862. def getAllServers_async(self, _cb, current=None):
  2863. '''Fetch list of all defined servers.
  2864. Returns:
  2865. List of interfaces for all servers.'''
  2866. pass
  2867. def getDefaultConf_async(self, _cb, current=None):
  2868. '''Fetch default configuraion. This returns the configuration items that were set in the configuration file, or
  2869. the built-in default. The individual servers will use these values unless they have been overridden in the
  2870. server specific configuration. The only special case is the port, which defaults to the value defined here +
  2871. the servers ID - 1 (so that virtual server #1 uses the defined port, server #2 uses port+1 etc).
  2872. Returns:
  2873. Default configuration of the servers.'''
  2874. pass
  2875. def getVersion_async(self, _cb, current=None):
  2876. '''Fetch version of Murmur.
  2877. Arguments:
  2878. major Major version.
  2879. minor Minor version.
  2880. patch Patchlevel.
  2881. text Textual representation of version. Note that this may not match the [major], [minor] and [patch] levels, as it
  2882. may be simply the compile date or the SVN revision. This is usually the text you want to present to users.'''
  2883. pass
  2884. def addCallback_async(self, _cb, cb, current=None):
  2885. '''Add a callback. The callback will receive notifications when servers are started or stopped.
  2886. Arguments:
  2887. cb Callback interface which will receive notifications.'''
  2888. pass
  2889. def removeCallback_async(self, _cb, cb, current=None):
  2890. '''Remove a callback.
  2891. Arguments:
  2892. cb Callback interface to be removed.'''
  2893. pass
  2894. def getUptime_async(self, _cb, current=None):
  2895. '''Get murmur uptime.
  2896. Returns:
  2897. Uptime of murmur in seconds'''
  2898. pass
  2899. def __str__(self):
  2900. return IcePy.stringify(self, _M_Murmur._t_Meta)
  2901. __repr__ = __str__
  2902. _M_Murmur.MetaPrx = Ice.createTempClass()
  2903. class MetaPrx(Ice.ObjectPrx):
  2904. '''Fetch interface to specific server.
  2905. Arguments:
  2906. id Server ID. See [Server::getId].
  2907. Returns:
  2908. Interface for specified server, or a null proxy if id is invalid.'''
  2909. def getServer(self, id, _ctx=None):
  2910. return _M_Murmur.Meta._op_getServer.invoke(self, ((id, ), _ctx))
  2911. '''Fetch interface to specific server.
  2912. Arguments:
  2913. id Server ID. See [Server::getId].
  2914. Returns:
  2915. Interface for specified server, or a null proxy if id is invalid.'''
  2916. def begin_getServer(self, id, _response=None, _ex=None, _sent=None, _ctx=None):
  2917. return _M_Murmur.Meta._op_getServer.begin(self, ((id, ), _response, _ex, _sent, _ctx))
  2918. '''Fetch interface to specific server.
  2919. Arguments:
  2920. id Server ID. See [Server::getId].
  2921. Returns:
  2922. Interface for specified server, or a null proxy if id is invalid.'''
  2923. def end_getServer(self, _r):
  2924. return _M_Murmur.Meta._op_getServer.end(self, _r)
  2925. '''Create a new server. Call [Server::getId] on the returned interface to find it's ID.
  2926. Returns:
  2927. Interface for new server.'''
  2928. def newServer(self, _ctx=None):
  2929. return _M_Murmur.Meta._op_newServer.invoke(self, ((), _ctx))
  2930. '''Create a new server. Call [Server::getId] on the returned interface to find it's ID.
  2931. Returns:
  2932. Interface for new server.'''
  2933. def begin_newServer(self, _response=None, _ex=None, _sent=None, _ctx=None):
  2934. return _M_Murmur.Meta._op_newServer.begin(self, ((), _response, _ex, _sent, _ctx))
  2935. '''Create a new server. Call [Server::getId] on the returned interface to find it's ID.
  2936. Returns:
  2937. Interface for new server.'''
  2938. def end_newServer(self, _r):
  2939. return _M_Murmur.Meta._op_newServer.end(self, _r)
  2940. '''Fetch list of all currently running servers.
  2941. Returns:
  2942. List of interfaces for running servers.'''
  2943. def getBootedServers(self, _ctx=None):
  2944. return _M_Murmur.Meta._op_getBootedServers.invoke(self, ((), _ctx))
  2945. '''Fetch list of all currently running servers.
  2946. Returns:
  2947. List of interfaces for running servers.'''
  2948. def begin_getBootedServers(self, _response=None, _ex=None, _sent=None, _ctx=None):
  2949. return _M_Murmur.Meta._op_getBootedServers.begin(self, ((), _response, _ex, _sent, _ctx))
  2950. '''Fetch list of all currently running servers.
  2951. Returns:
  2952. List of interfaces for running servers.'''
  2953. def end_getBootedServers(self, _r):
  2954. return _M_Murmur.Meta._op_getBootedServers.end(self, _r)
  2955. '''Fetch list of all defined servers.
  2956. Returns:
  2957. List of interfaces for all servers.'''
  2958. def getAllServers(self, _ctx=None):
  2959. return _M_Murmur.Meta._op_getAllServers.invoke(self, ((), _ctx))
  2960. '''Fetch list of all defined servers.
  2961. Returns:
  2962. List of interfaces for all servers.'''
  2963. def begin_getAllServers(self, _response=None, _ex=None, _sent=None, _ctx=None):
  2964. return _M_Murmur.Meta._op_getAllServers.begin(self, ((), _response, _ex, _sent, _ctx))
  2965. '''Fetch list of all defined servers.
  2966. Returns:
  2967. List of interfaces for all servers.'''
  2968. def end_getAllServers(self, _r):
  2969. return _M_Murmur.Meta._op_getAllServers.end(self, _r)
  2970. '''Fetch default configuraion. This returns the configuration items that were set in the configuration file, or
  2971. the built-in default. The individual servers will use these values unless they have been overridden in the
  2972. server specific configuration. The only special case is the port, which defaults to the value defined here +
  2973. the servers ID - 1 (so that virtual server #1 uses the defined port, server #2 uses port+1 etc).
  2974. Returns:
  2975. Default configuration of the servers.'''
  2976. def getDefaultConf(self, _ctx=None):
  2977. return _M_Murmur.Meta._op_getDefaultConf.invoke(self, ((), _ctx))
  2978. '''Fetch default configuraion. This returns the configuration items that were set in the configuration file, or
  2979. the built-in default. The individual servers will use these values unless they have been overridden in the
  2980. server specific configuration. The only special case is the port, which defaults to the value defined here +
  2981. the servers ID - 1 (so that virtual server #1 uses the defined port, server #2 uses port+1 etc).
  2982. Returns:
  2983. Default configuration of the servers.'''
  2984. def begin_getDefaultConf(self, _response=None, _ex=None, _sent=None, _ctx=None):
  2985. return _M_Murmur.Meta._op_getDefaultConf.begin(self, ((), _response, _ex, _sent, _ctx))
  2986. '''Fetch default configuraion. This returns the configuration items that were set in the configuration file, or
  2987. the built-in default. The individual servers will use these values unless they have been overridden in the
  2988. server specific configuration. The only special case is the port, which defaults to the value defined here +
  2989. the servers ID - 1 (so that virtual server #1 uses the defined port, server #2 uses port+1 etc).
  2990. Returns:
  2991. Default configuration of the servers.'''
  2992. def end_getDefaultConf(self, _r):
  2993. return _M_Murmur.Meta._op_getDefaultConf.end(self, _r)
  2994. '''Fetch version of Murmur.
  2995. Arguments:
  2996. major Major version.
  2997. minor Minor version.
  2998. patch Patchlevel.
  2999. text Textual representation of version. Note that this may not match the [major], [minor] and [patch] levels, as it
  3000. may be simply the compile date or the SVN revision. This is usually the text you want to present to users.'''
  3001. def getVersion(self, _ctx=None):
  3002. return _M_Murmur.Meta._op_getVersion.invoke(self, ((), _ctx))
  3003. '''Fetch version of Murmur.
  3004. Arguments:
  3005. major Major version.
  3006. minor Minor version.
  3007. patch Patchlevel.
  3008. text Textual representation of version. Note that this may not match the [major], [minor] and [patch] levels, as it
  3009. may be simply the compile date or the SVN revision. This is usually the text you want to present to users.'''
  3010. def begin_getVersion(self, _response=None, _ex=None, _sent=None, _ctx=None):
  3011. return _M_Murmur.Meta._op_getVersion.begin(self, ((), _response, _ex, _sent, _ctx))
  3012. '''Fetch version of Murmur.
  3013. Arguments:
  3014. major Major version.
  3015. minor Minor version.
  3016. patch Patchlevel.
  3017. text Textual representation of version. Note that this may not match the [major], [minor] and [patch] levels, as it
  3018. may be simply the compile date or the SVN revision. This is usually the text you want to present to users.'''
  3019. def end_getVersion(self, _r):
  3020. return _M_Murmur.Meta._op_getVersion.end(self, _r)
  3021. '''Add a callback. The callback will receive notifications when servers are started or stopped.
  3022. Arguments:
  3023. cb Callback interface which will receive notifications.'''
  3024. def addCallback(self, cb, _ctx=None):
  3025. return _M_Murmur.Meta._op_addCallback.invoke(self, ((cb, ), _ctx))
  3026. '''Add a callback. The callback will receive notifications when servers are started or stopped.
  3027. Arguments:
  3028. cb Callback interface which will receive notifications.'''
  3029. def begin_addCallback(self, cb, _response=None, _ex=None, _sent=None, _ctx=None):
  3030. return _M_Murmur.Meta._op_addCallback.begin(self, ((cb, ), _response, _ex, _sent, _ctx))
  3031. '''Add a callback. The callback will receive notifications when servers are started or stopped.
  3032. Arguments:
  3033. cb Callback interface which will receive notifications.'''
  3034. def end_addCallback(self, _r):
  3035. return _M_Murmur.Meta._op_addCallback.end(self, _r)
  3036. '''Remove a callback.
  3037. Arguments:
  3038. cb Callback interface to be removed.'''
  3039. def removeCallback(self, cb, _ctx=None):
  3040. return _M_Murmur.Meta._op_removeCallback.invoke(self, ((cb, ), _ctx))
  3041. '''Remove a callback.
  3042. Arguments:
  3043. cb Callback interface to be removed.'''
  3044. def begin_removeCallback(self, cb, _response=None, _ex=None, _sent=None, _ctx=None):
  3045. return _M_Murmur.Meta._op_removeCallback.begin(self, ((cb, ), _response, _ex, _sent, _ctx))
  3046. '''Remove a callback.
  3047. Arguments:
  3048. cb Callback interface to be removed.'''
  3049. def end_removeCallback(self, _r):
  3050. return _M_Murmur.Meta._op_removeCallback.end(self, _r)
  3051. '''Get murmur uptime.
  3052. Returns:
  3053. Uptime of murmur in seconds'''
  3054. def getUptime(self, _ctx=None):
  3055. return _M_Murmur.Meta._op_getUptime.invoke(self, ((), _ctx))
  3056. '''Get murmur uptime.
  3057. Returns:
  3058. Uptime of murmur in seconds'''
  3059. def begin_getUptime(self, _response=None, _ex=None, _sent=None, _ctx=None):
  3060. return _M_Murmur.Meta._op_getUptime.begin(self, ((), _response, _ex, _sent, _ctx))
  3061. '''Get murmur uptime.
  3062. Returns:
  3063. Uptime of murmur in seconds'''
  3064. def end_getUptime(self, _r):
  3065. return _M_Murmur.Meta._op_getUptime.end(self, _r)
  3066. def checkedCast(proxy, facetOrCtx=None, _ctx=None):
  3067. return _M_Murmur.MetaPrx.ice_checkedCast(proxy, '::Murmur::Meta', facetOrCtx, _ctx)
  3068. checkedCast = staticmethod(checkedCast)
  3069. def uncheckedCast(proxy, facet=None):
  3070. return _M_Murmur.MetaPrx.ice_uncheckedCast(proxy, facet)
  3071. uncheckedCast = staticmethod(uncheckedCast)
  3072. _M_Murmur._t_MetaPrx = IcePy.defineProxy('::Murmur::Meta', MetaPrx)
  3073. _M_Murmur._t_Meta = IcePy.defineClass('::Murmur::Meta', Meta, (), True, None, (), ())
  3074. Meta._ice_type = _M_Murmur._t_Meta
  3075. Meta._op_getServer = IcePy.Operation('getServer', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (((), IcePy._t_int),), (), _M_Murmur._t_ServerPrx, ())
  3076. Meta._op_newServer = IcePy.Operation('newServer', Ice.OperationMode.Normal, Ice.OperationMode.Normal, True, (), (), (), _M_Murmur._t_ServerPrx, ())
  3077. Meta._op_getBootedServers = IcePy.Operation('getBootedServers', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (), (), _M_Murmur._t_ServerList, ())
  3078. Meta._op_getAllServers = IcePy.Operation('getAllServers', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (), (), _M_Murmur._t_ServerList, ())
  3079. Meta._op_getDefaultConf = IcePy.Operation('getDefaultConf', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (), (), _M_Murmur._t_ConfigMap, ())
  3080. Meta._op_getVersion = IcePy.Operation('getVersion', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (), (((), IcePy._t_int), ((), IcePy._t_int), ((), IcePy._t_int), ((), IcePy._t_string)), None, ())
  3081. Meta._op_addCallback = IcePy.Operation('addCallback', Ice.OperationMode.Normal, Ice.OperationMode.Normal, True, (), (((), _M_Murmur._t_MetaCallbackPrx),), (), None, (_M_Murmur._t_InvalidCallbackException,))
  3082. Meta._op_removeCallback = IcePy.Operation('removeCallback', Ice.OperationMode.Normal, Ice.OperationMode.Normal, True, (), (((), _M_Murmur._t_MetaCallbackPrx),), (), None, (_M_Murmur._t_InvalidCallbackException,))
  3083. Meta._op_getUptime = IcePy.Operation('getUptime', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (), (), IcePy._t_int, ())
  3084. _M_Murmur.Meta = Meta
  3085. del Meta
  3086. _M_Murmur.MetaPrx = MetaPrx
  3087. del MetaPrx
  3088. # End of module Murmur