lightmelody

changeset 748:6c47d5656556

Changed deprecated comments to [Deprecated] warning labels
author Arc Riley <arcriley@gmail.com>
date Sat, 06 Jun 2015 23:45:09 -0700
parents 6cd1456da9ae
children 01b72b7cbf88
files src/Connection.gs
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line diff
     1.1 --- a/src/Connection.gs	Sat Jun 06 21:48:30 2015 -0400
     1.2 +++ b/src/Connection.gs	Sat Jun 06 23:45:09 2015 -0700
     1.3 @@ -196,11 +196,13 @@
     1.4      //////////////////////////////////////////////////////////////////////////
     1.5      // Methods
     1.6  
     1.7 +    [Deprecated]
     1.8      def authenticate (username : string, password : string, resource : string,
     1.9                        function : ResultFunction#) : bool raises Error
    1.10          domain : string
    1.11  
    1.12 -        if !self.is_open()
    1.13 +        // Bail if the connection isn't open
    1.14 +        if !is_open()
    1.15              raise new Lm.Error.CONNECTION_NOT_OPEN("Connection is not open.")
    1.16  
    1.17          state = State.AUTHENTICATING
    1.18 @@ -221,6 +223,7 @@
    1.19          return true
    1.20  
    1.21  
    1.22 +    [Deprecated]
    1.23      def authenticate_and_block (username : string, password : string,
    1.24                                  resource : string) : bool raises Error
    1.25          // TODO
    1.26 @@ -255,7 +258,8 @@
    1.27          return self.state >= State.AUTHENTICATED
    1.28  
    1.29  
    1.30 -    // DEPRECATED
    1.31 +    [Deprecated (since = "lightmelody-1.5",
    1.32 +                 replacement = "Lm.Connection.open_async")]
    1.33      def open (function : ResultFunction#) : bool raises Error
    1.34          // This implement loudmouth's async connection open which
    1.35          // differs from glib/gio's async api. All new code should use
    1.36 @@ -306,7 +310,7 @@
    1.37          return true
    1.38  
    1.39  
    1.40 -    // TODO when open() is deprecated, this should be renamed to that
    1.41 +    // TODO rename this to Lm.Connection.open() in LightMelody 1.7
    1.42      def open_and_block () : bool raises Error
    1.43          client : SocketClient = new SocketClient()
    1.44          try