]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/excorporate/excorporate.el
Rename a local variable
[gnu-emacs-elpa] / packages / excorporate / excorporate.el
index 8168dd38b97950e77116e68c1ac29f17f0b2a250..34984ef39987a2a7d2d7830ad04cebb16fae735f 100644 (file)
@@ -5,10 +5,10 @@
 ;; Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
 ;; Maintainer: Thomas Fitzsimmons <fitzsim@fitzsim.org>
 ;; Created: 2014-09-19
-;; Version: 0.7.1
+;; Version: 0.7.3
 ;; Keywords: calendar
 ;; Homepage: https://www.fitzsim.org/blog/
-;; Package-Requires: ((emacs "24.1") (fsm "0.2") (soap-client "3.0.2") (url-http-ntlm "2.0.2"))
+;; Package-Requires: ((emacs "24.1") (fsm "0.2") (soap-client "3.1.1") (url-http-ntlm "2.0.2"))
 
 ;; This program is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -96,6 +96,9 @@
 ;; Wilfred Hughes <me@wilfred.me.uk> tested on Exchange 2007 and
 ;; suggested documentation improvements.
 
+;; Erik Hetzner <egh@e6h.org> tested on Office 365 and helped debug
+;; Office 365 support.
+
 ;;; Code:
 \f
 ;; Implementation-visible functions and variables.
@@ -708,7 +711,12 @@ arguments, IDENTIFIER and the server's response."
      identifier
      "FindItem"
      `(;; Main arguments.
-       ((Traversal . "Shallow")
+       (;; RequestVersion is usually overridden by a fixed value in
+       ;; the WSDL (the RequestServerVersion element); provide the
+       ;; maximally-compatible Exchange2007 if the fixed value isn't
+       ;; present.
+       (RequestVersion (Version . "Exchange2007"))
+       (Traversal . "Shallow")
        (ItemShape
         (BaseShape . "AllProperties"))
        ;; To aid productivity, excorporate-calfw automatically prunes your
@@ -719,16 +727,13 @@ arguments, IDENTIFIER and the server's response."
        (ParentFolderIds
         (DistinguishedFolderId (Id . "calendar"))))
        ;; Empty arguments.
-       ,@(let ((server-major-version
-               (string-to-number
-                (substring (exco-server-version identifier) 8 12))))
-          (cond
-           ((<= server-major-version 2007)
-            '(nil nil nil nil))
-           ((< server-major-version 2013)
-            '(nil nil nil nil nil))
-           (t
-            '(nil nil nil nil nil nil)))))
+       ,@(let* ((wsdl (exco--with-fsm identifier
+                                     (plist-get (fsm-get-state-data fsm)
+                                                :service-wsdl)))
+               (arity (soap-operation-arity wsdl
+                                           "ExchangeServicePort"
+                                           "FindItem")))
+          (make-list (- arity 1) nil)))
      callback)))
 
 (defun exco-connection-iterate (initialize-function