[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 () matt ! rogers ! name>
Date:       2004-08-13 4:19:04
Message-ID: 20040813041904.ADD8B9A73 () office ! kde ! org
[Download RAW message or body]

CVS commit by mattr: 

move the function to find a TLV to Oscar::Utils from OscarSocket.
also move the function that adds the flap version to the packet to Oscar::Utils


  M +1 -14     oscarsocket.cpp   1.170.2.20
  M +17 -0     oscarutils.cpp   1.1.2.12
  M +10 -0     oscarutils.h   1.1.2.13


--- kdenetwork/kopete/protocols/oscar/oscarsocket/oscarsocket.cpp  #1.170.2.19:1.170.2.20
@@ -197,11 +197,4 @@ void OscarSocket::sendLoginRequest()
 }
 
-
-void OscarSocket::putFlapVer(Buffer &outbuf)
-{
-        outbuf.addDWord(0x00000001);
-}
-
-
 void OscarSocket::OnConnAckReceived()
 {
@@ -624,11 +617,5 @@ bool OscarSocket::parseAuthFailedCode(WO
 TLV * OscarSocket::findTLV(QPtrList<TLV> &l, WORD typ)
 {
-        TLV *t;
-        for(t=l.first();t;t=l.next())
-        {
-                if (t->type == typ)
-                        return t;
-        }
-        return NULL;
+
 }
 

--- kdenetwork/kopete/protocols/oscar/oscarsocket/oscarutils.cpp  #1.1.2.11:1.1.2.12
@@ -271,2 +271,19 @@ static bool Utils::parseUserInfo(Buffer 
         return true;
 }
+
+static void Utils::addFLAPVersion( Buffer& inbuf )
+{
+    outbuf.addDWord(0x00000001);
+}
+
+static TLV* Utils::findTLV( QPtrList<TLV> list, WORD type )
+{
+
+        TLV *t;
+        for ( QPtrListIterator<TLV> it( list ); it.current(); ++it )
+        {
+                if ( it.current()->type == type )
+                        return t;
+        }
+        return NULL;
+}

--- kdenetwork/kopete/protocols/oscar/oscarsocket/oscarutils.h  #1.1.2.12:1.1.2.13
@@ -82,4 +82,14 @@ namespace Oscar
                         static DWORD parseCap(char* cap);
 
+                        /*!
+                         * \brief Add the FLAP version to the buffer
+                         */
+                        static void addFLAPVersion( Buffer& inbuf );
+
+                        /*!
+                         * \brief Find a TLV in a list of TLVs
+                         */
+                        TLV* findTLV( QPtrList<TLV> &l, WORD type );
+
         }; // END class Utils
 } // END namespace Oscar


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

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