[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    oscar_rewrite: kdenetwork/kopete/protocols/oscar/oscarsocket
From:       Matt Rogers <matt.rogers () kdemail ! net>
Date:       2004-02-05 4:01:28
Message-ID: 20040205040128.8BD7C909C () office ! kde ! org
[Download RAW message or body]

CVS commit by mattr: 

Add a Connection to the SnacFamily class and add implemenation for the base
class methods.


  A            snacfamily.cpp   1.1.2.1 [GPL (v2+)]
  M +40 -9     snacfamily.h   1.1.2.3


--- kdenetwork/kopete/protocols/oscar/oscarsocket/snacfamily.h  #1.1.2.2:1.1.2.3
@@ -24,5 +24,5 @@ using namespace Oscar;
 class Event;
 class Buffer;
-
+class Connection;
 
 namespace Oscar
@@ -38,5 +38,8 @@ namespace Oscar
 
                         /** Default Constuctor */
-                        SnacFamily()
+                        SnacFamily( QObject *parent = 0, const char* name = 0 )
+
+                        /** Contstructor that takes an Oscar::Connection object */
+                        SnacFamily( Connection* conn, QObject *parent = 0, const char* name = 0 )
                         
                         /**
@@ -50,11 +53,31 @@ namespace Oscar
                         /**
                          * \brief Called upon login
+                         *
+                         * The default implementation just emits loginFinished()
+                         *
                          **/
-                        virtual void login() = 0;
+                        virtual void login();
 
                         /**
                          * \brief Called upon logoff
+                         *
+                         * The default implementation just emits logoutFinished()
+                         *
                          */
-                        virtual void logout() = 0;
+                        virtual void logout();
+
+                        /**
+                         * \brief Get the connection
+                         * \return the Oscar::Connection object used by the SnacFamily
+                         */
+                        Connection connection();
+
+                        /**
+                         * \brief Set the connection
+                         *
+                         * Sets the connection used by this SnacFamily. Useful if you didn't
+                         * pass it in the constructor, or you decide to use a different connection
+                         */
+                         void setConnection( Connection& newConnection );
 
                 signals:
@@ -82,4 +105,12 @@ namespace Oscar
                          */
                         QValueList<Buffer> m_awaitingResponseQueue;
+
+                        /**
+                         * \brief The connection this SnacFamily belongs to
+                         *
+                         * Used in the sendEvent function so we know which connection to
+                         * use to send
+                         */
+                        Connection m_connection;
         };
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic