PageRenderTime 76ms CodeModel.GetById 25ms RepoModel.GetById 1ms app.codeStats 0ms

/mds/web/modules/mail/includes/mail-xmlrpc.php

https://github.com/vmasilva/mmc
PHP | 197 lines | 131 code | 44 blank | 22 comment | 1 complexity | 0f1d88863f5e9503c98f387b9f479aba MD5 | raw file
Possible License(s): GPL-2.0
  1. <?php
  2. /**
  3. * (c) 2004-2007 Linbox / Free&ALter Soft, http://linbox.com
  4. * (c) 2007-2008 Mandriva, http://www.mandriva.com/
  5. *
  6. * $Id$
  7. *
  8. * This file is part of Mandriva Management Console (MMC).
  9. *
  10. * MMC is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation; either version 2 of the License, or
  13. * (at your option) any later version.
  14. *
  15. * MMC is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with MMC; if not, write to the Free Software
  22. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  23. */
  24. function changeMailEnable($login,$boolean) {
  25. return xmlCall("mail.changeMailEnable",array($login,$boolean));
  26. }
  27. function changeMaildrop($login, $droplist) {
  28. return xmlCall("mail.changeMaildrop",array($login, $droplist));
  29. }
  30. function changeMailalias($login,$aliaslist) {
  31. return xmlCall("mail.changeMailalias",array($login, $aliaslist));
  32. }
  33. function changeMailbox($login, $mailbox) {
  34. return xmlCall("mail.changeMailbox", array($login, $mailbox));
  35. }
  36. function changeMailhost($login, $mailhost) {
  37. return xmlCall("mail.changeMailhost", array($login, $mailhost));
  38. }
  39. function changeQuota($login, $mailuserquota) {
  40. return xmlCall("mail.changeQuota", array($login, $mailuserquota));
  41. }
  42. function removeMail($login) {
  43. return xmlCall("mail.removeMail",array($login));
  44. }
  45. function removeMailGroup($group) {
  46. return xmlCall("mail.removeMailGroup",array($group));
  47. }
  48. function addMailGroup($group, $mail) {
  49. return xmlCall("mail.addMailGroup",array($group, $mail));
  50. }
  51. function addMailObjectClass($login) {
  52. xmlCall("mail.addMailObjectClass", $login);
  53. }
  54. function deleteMailGroupAliases($group) {
  55. xmlCall("mail.deleteMailGroupAliases", array($group));
  56. }
  57. function syncMailGroupAliases($group, $foruser = "*") {
  58. xmlCall("mail.syncMailGroupAliases", array($group, $foruser));
  59. }
  60. function hasMailObjectClass($login) {
  61. return xmlCall("mail.hasMailObjectClass",array($login));
  62. }
  63. function hasGroupMailObjectClass($group) {
  64. return xmlCall("mail.hasMailGroupObjectClass", array($group));
  65. }
  66. function hasVAliasesSupport() {
  67. return xmlCall("mail.hasVAliasesSupport", null);
  68. }
  69. function hasVDomainSupport() {
  70. if (!isset($_SESSION["hasVDomainSupport"])) {
  71. $_SESSION["hasVDomainSupport"] = xmlCall("mail.hasVDomainSupport", null);
  72. }
  73. return $_SESSION["hasVDomainSupport"];
  74. }
  75. function addVDomain($domain) {
  76. xmlCall("mail.addVDomain", array($domain));
  77. }
  78. function delVDomain($domain) {
  79. xmlCall("mail.delVDomain", array($domain));
  80. }
  81. function setVDomainDescription($domain, $description) {
  82. xmlCall("mail.setVDomainDescription", array($domain, $description));
  83. }
  84. function setVDomainQuota($domain, $quota) {
  85. xmlCall("mail.setVDomainQuota", array($domain, $quota));
  86. }
  87. function resetUsersVDomainQuota($domain) {
  88. xmlCall("mail.resetUsersVDomainQuota", array($domain));
  89. }
  90. function getVDomain($domain) {
  91. return xmlCall("mail.getVDomain", array($domain));
  92. }
  93. function getVDomains($filter) {
  94. return xmlCall("mail.getVDomains", array($filter));
  95. }
  96. function getVDomainUsersCount($domain) {
  97. return xmlCall("mail.getVDomainUsersCount", array($domain));
  98. }
  99. function getVDomainUsers($domain, $filter) {
  100. return xmlCall("mail.getVDomainUsers", array($domain, $filter));
  101. }
  102. function getVAliases($filter = '') {
  103. return xmlCall("mail.getVAliases", array($filter));
  104. }
  105. function getVAlias($alias) {
  106. return xmlCall("mail.getVAlias", array($alias));
  107. }
  108. function addVAlias($alias) {
  109. return xmlCall("mail.addVAlias", array($alias));
  110. }
  111. function changeVAliasName($alias, $name) {
  112. return xmlCall("mail.changeVAliasName", array($alias, $name));
  113. }
  114. function changeVAliasEnable($alias, $enabled) {
  115. return xmlCall("mail.changeVAliasEnable", array($alias, $enabled));
  116. }
  117. function delVAlias($alias) {
  118. return xmlCall("mail.delVAlias", array($alias));
  119. }
  120. function updateVAliasExternalUsers($alias, $mails) {
  121. return xmlCall("mail.updateVAliasExternalUsers", array($alias, $mails));
  122. }
  123. function getVAliasUsers($alias) {
  124. return xmlCall("mail.getVAliasUsers", array($alias));
  125. }
  126. function addVAliasUser($alias, $user) {
  127. return xmlCall("mail.addVAliasUser", array($alias, $user));
  128. }
  129. function delVAliasUser($alias, $user) {
  130. return xmlCall("mail.delVAliasUser", array($alias, $user));
  131. }
  132. function delVAliasesUser($user) {
  133. return xmlCall("mail.delVAliasesUser", array($user));
  134. }
  135. function computeMailGroupAlias($group) {
  136. return xmlCall("mail.computeMailGroupAlias", array($group));
  137. }
  138. function getMailAttributes() {
  139. return xmlCall("mail.getMailAttributes");
  140. }
  141. function hasZarafaSupport() {
  142. return xmlCall("mail.hasZarafaSupport");
  143. }
  144. function modifyZarafa($login, $attr, $value) {
  145. return xmlCall("mail.modifyZarafa", array($login, $attr, $value));
  146. }
  147. function isZarafaGroup($group) {
  148. return xmlCall("mail.isZarafaGroup", $group);
  149. }
  150. function setZarafaGroup($group, $value) {
  151. return xmlCall("mail.setZarafaGroup", array($group, $value));
  152. }
  153. ?>