Documentation expanded
[platform/upstream/dbus.git] / dbus / dbus-marshal-recursive.c
index 400eda1..4adfd2e 100644 (file)
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  *
  */
 
+#include <config.h>
 #include "dbus-marshal-recursive.h"
 #include "dbus-marshal-basic.h"
 #include "dbus-signature.h"
  * @{
  */
 
+static dbus_bool_t _dbus_type_reader_greater_than              (const DBusTypeReader  *lhs,
+                                                                const DBusTypeReader  *rhs);
+
+static void       _dbus_type_writer_set_enabled           (DBusTypeWriter        *writer,
+                                                           dbus_bool_t            enabled);
+static dbus_bool_t _dbus_type_writer_write_reader_partial (DBusTypeWriter        *writer,
+                                                           DBusTypeReader        *reader,
+                                                           const DBusTypeReader  *start_after,
+                                                           int                    start_after_new_pos,
+                                                           int                    start_after_new_len,
+                                                           DBusList             **fixups);
+
 /** turn this on to get deluged in TypeReader verbose spam */
 #define RECURSIVE_MARSHAL_READ_TRACE  0
 
@@ -690,6 +703,7 @@ static const DBusTypeReaderClass variant_reader_class = {
   base_reader_next
 };
 
+#ifndef DBUS_DISABLE_ASSERT
 static const DBusTypeReaderClass * const
 all_reader_classes[] = {
   &body_reader_class,
@@ -702,6 +716,7 @@ all_reader_classes[] = {
   &array_types_only_reader_class,
   &variant_reader_class
 };
+#endif
 
 /**
  * Initializes a type reader.
@@ -1425,7 +1440,7 @@ _dbus_type_reader_delete (DBusTypeReader        *reader,
   return retval;
 }
 
-/**
+/*
  * Compares two readers, which must be iterating over the same value data.
  * Returns #TRUE if the first parameter is further along than the second parameter.
  *
@@ -1433,7 +1448,7 @@ _dbus_type_reader_delete (DBusTypeReader        *reader,
  * @param rhs left-hand-side (first) parameter
  * @returns whether lhs is greater than rhs
  */
-dbus_bool_t
+static dbus_bool_t
 _dbus_type_reader_greater_than (const DBusTypeReader  *lhs,
                                 const DBusTypeReader  *rhs)
 {
@@ -1652,7 +1667,7 @@ writer_recurse_init_and_check (DBusTypeWriter *writer,
                                      _dbus_type_to_string (expected),
                                      _dbus_string_get_const_data (writer->type_str), writer->type_pos);
           else
-            _dbus_warn_check_failed ("Writing an element of type %s, but no value is expected here\n",
+            _dbus_warn_check_failed ("Writing an element of type %s, but no value is expected here\n"
                                      "The overall signature expected here was '%s' and we are on byte %d of that signature.\n",
                                      _dbus_type_to_string (sub->container_type),
                                      _dbus_string_get_const_data (writer->type_str), writer->type_pos);
@@ -2624,7 +2639,7 @@ writer_write_reader_helper (DBusTypeWriter       *writer,
   return FALSE;
 }
 
-/**
+/*
  * Iterate through all values in the given reader, writing a copy of
  * each value to the writer.  The reader will be moved forward to its
  * end position.
@@ -2655,7 +2670,7 @@ writer_write_reader_helper (DBusTypeWriter       *writer,
  * @param fixups list to append #DBusArrayLenFixup if the write was partial
  * @returns #FALSE if no memory
  */
-dbus_bool_t
+static dbus_bool_t
 _dbus_type_writer_write_reader_partial (DBusTypeWriter       *writer,
                                         DBusTypeReader       *reader,
                                         const DBusTypeReader *start_after,
@@ -2716,7 +2731,7 @@ _dbus_type_writer_write_reader (DBusTypeWriter       *writer,
   return _dbus_type_writer_write_reader_partial (writer, reader, NULL, 0, 0, NULL);
 }
 
-/**
+/*
  * If disabled, a writer can still be iterated forward and recursed/unrecursed
  * but won't write any values. Types will still be written unless the
  * writer is a "values only" writer, because the writer needs access to
@@ -2725,7 +2740,7 @@ _dbus_type_writer_write_reader (DBusTypeWriter       *writer,
  * @param writer the type writer
  * @param enabled #TRUE if values should be written
  */
-void
+static void
 _dbus_type_writer_set_enabled (DBusTypeWriter   *writer,
                                dbus_bool_t       enabled)
 {