Patch: xep-0050 conformance
From: Roelof Naude <roelof.naude@xxxxxxxxxx>
Date: Fri, 4 Apr 2008 09:14:59 +0200 (CEST)
hi

the adhoc command class currently does not write out the sessionid. the attached patch address this problem.

when performing a findExtension<T>, a const T* is returned. in the case where T = DataForm, i have to query the fields. currently no fields() const method is provided. the attached patch also add such an overload method.

regards
roelof.
diff -u gloox-1.0-beta2/src/adhoc.cpp gloox-1.0-beta2.mod/src/adhoc.cpp
--- gloox-1.0-beta2/src/adhoc.cpp       2008-01-22 19:20:41.000000000 +0200
+++ gloox-1.0-beta2.mod/src/adhoc.cpp   2008-04-04 08:47:18.000000000 +0200
@@ -164,6 +164,8 @@
       c->addAttribute( "action", actionString( m_action ) );
     if( m_status != InvalidStatus )
       c->addAttribute( "status", statusString( m_status ) );
+    if ( !m_sessionid.empty() )
+      c->addAttribute( "sessionid", m_sessionid );
 
     if( m_form && *m_form )
       c->addChild( m_form->tag() );
diff -u gloox-1.0-beta2/src/dataformfieldcontainer.h 
gloox-1.0-beta2.mod/src/dataformfieldcontainer.h
--- gloox-1.0-beta2/src/dataformfieldcontainer.h        2008-03-01 
05:30:53.000000000 +0200
+++ gloox-1.0-beta2.mod/src/dataformfieldcontainer.h    2008-04-04 
08:48:33.000000000 +0200
@@ -71,6 +71,12 @@
         * @return The list of fields the form contains.
         */
       FieldList& fields() { return m_fields; }
+      
+      /**
+        * Use this function to retrieve the list of fields of a form.
+        * @return The list of fields the form contains.
+        */
+      const FieldList& fields() const { return m_fields; }
 
       /**
         * Use this function to set the fields the form contains.
Common subdirectories: gloox-1.0-beta2/src/examples and 
gloox-1.0-beta2.mod/src/examples
Common subdirectories: gloox-1.0-beta2/src/tests and 
gloox-1.0-beta2.mod/src/tests