Skip to content
Browse files

Fixed use of rudel-state-wait in infinote/rudel-infinote-client.el

* infinote/rudel-infinote-client.el
  (rudel-infinote-client-connection::rudel-publish): added a comment
  (rudel-infinote-client-connection::rudel-subscribe-to): fixed use of
  `rudel-state-wait'; added more comments
  • Loading branch information...
1 parent 7e284f6 commit 498eb0de36c765796b5f86891ecb173d9edeeb7b @scymtym committed Feb 6, 2010
Showing with 12 additions and 10 deletions.
  1. +12 −10 infinote/rudel-infinote-client.el
View
22 infinote/rudel-infinote-client.el
@@ -220,27 +220,29 @@
(type . ,type)
(name . ,name))))))
)
+;; TODO should be a method of the directory group
(defmethod rudel-subscribe-to ((this rudel-infinote-client-connection)
document)
""
;; Create a new adopted context for DOCUMENT.
;; TODO (rudel-add-context this document)
- ;;
- (let ((group (rudel-get-group this "InfDirectory"))) ;; TODO (with-group?
- ;; Announce the subscription to the server.
- (with-slots (id) document
- (rudel-switch group 'subscribing id))
+ ;; Subscribe to DOCUMENT's group in the directory group and then
+ ;; join the session group associated to DOCUMENT.
- ;; Wait until the subscription is finished
- (rudel-state-wait group '(idle) nil "Subscribing"))
+ ;; Announce the subscription to the server and wait until the
+ ;; subscription is finished
+ (let ((group (rudel-get-group this "InfDirectory"))) ;; TODO (with-group?
+ (rudel-switch group 'subscribing (oref document :id))
+ (rudel-state-wait group '(idle) nil))
+ ;; TODO responsibility of the group?
- ;;
+ ;; Join the group of the document.
(with-slots (group) document
(rudel-switch group 'joining)
-
- (rudel-state-wait group '(idle) nil "Joining"))
+ (rudel-state-wait group '(idle) nil))
+ ;; TODO responsibility of the document?
;; We receive a notification of our own subscription from the
;; server. TODO Or, do we? Consequently we do not add SELF to the

0 comments on commit 498eb0d

Please sign in to comment.
Something went wrong with that request. Please try again.