#include <stdio.h>
#include <stdlib.h>
+/* returns FALSE on fatal failure */
+typedef dbus_bool_t (* DBusForeachMessageFileFunc) (const DBusString *filename,
+ DBusValidity expected_validity,
+ void *data);
+
+static dbus_bool_t try_message_data (const DBusString *data,
+ DBusValidity expected_validity);
+
static int validities_seen[DBUS_VALIDITY_LAST + _DBUS_NEGATIVE_VALIDITY_COUNT];
static void
* @param data string to load message into
* @returns #TRUE if the message was loaded
*/
-dbus_bool_t
-dbus_internal_do_not_use_load_message_file (const DBusString *filename,
- DBusString *data)
+static dbus_bool_t
+load_message_file (const DBusString *filename,
+ DBusString *data)
{
dbus_bool_t retval;
DBusError error = DBUS_ERROR_INIT;
* @returns #TRUE if the message has the expected validity
*/
static dbus_bool_t
-dbus_internal_do_not_use_try_message_file (const DBusString *filename,
- DBusValidity expected_validity,
- void *unused)
+try_message_file (const DBusString *filename,
+ DBusValidity expected_validity,
+ void *unused)
{
DBusString data;
dbus_bool_t retval;
if (!_dbus_string_init (&data))
_dbus_test_fatal ("could not allocate string");
- if (!dbus_internal_do_not_use_load_message_file (filename, &data))
+ if (!load_message_file (filename, &data))
goto failed;
- retval = dbus_internal_do_not_use_try_message_data (&data, expected_validity);
+ retval = try_message_data (&data, expected_validity);
failed:
* @param expected_validity what the message has to be like to return #TRUE
* @returns #TRUE if the message has the expected validity
*/
-dbus_bool_t
-dbus_internal_do_not_use_try_message_data (const DBusString *data,
- DBusValidity expected_validity)
+static dbus_bool_t
+try_message_data (const DBusString *data,
+ DBusValidity expected_validity)
{
DBusMessageLoader *loader;
dbus_bool_t retval;
* @param user_data data for function
* @returns #FALSE if there's a failure
*/
-dbus_bool_t
-dbus_internal_do_not_use_foreach_message_file (const char *test_data_dir,
- DBusForeachMessageFileFunc func,
- void *user_data)
+static dbus_bool_t
+foreach_message_file (const char *test_data_dir,
+ DBusForeachMessageFileFunc func,
+ void *user_data)
{
DBusString test_directory;
dbus_bool_t retval;
while (_dbus_message_data_iter_get_and_next (&diter,
&mdata))
{
- if (!dbus_internal_do_not_use_try_message_data (&mdata.data,
- mdata.expected_validity))
+ if (!try_message_data (&mdata.data, mdata.expected_validity))
{
_dbus_test_fatal ("expected validity %d and did not get it",
mdata.expected_validity);
initial_fds = _dbus_check_fdleaks_enter ();
- if (!dbus_internal_do_not_use_foreach_message_file (test_data_dir,
- dbus_internal_do_not_use_try_message_file,
- NULL))
+ if (!foreach_message_file (test_data_dir, try_message_file, NULL))
_dbus_test_fatal ("foreach_message_file test failed");
_dbus_check_fdleaks_leave (initial_fds);
void _dbus_run_tests (const char *test_data_dir,
const char *specific_test);
-dbus_bool_t dbus_internal_do_not_use_try_message_data (const DBusString *data,
- DBusValidity expected_validity);
-dbus_bool_t dbus_internal_do_not_use_load_message_file (const DBusString *filename,
- DBusString *data);
-
-
-/* returns FALSE on fatal failure */
-typedef dbus_bool_t (* DBusForeachMessageFileFunc) (const DBusString *filename,
- DBusValidity expected_validity,
- void *data);
-
-dbus_bool_t dbus_internal_do_not_use_foreach_message_file (const char *test_data_dir,
- DBusForeachMessageFileFunc func,
- void *user_data);
dbus_bool_t dbus_internal_do_not_use_generate_bodies (int sequence,
int byte_order,
DBusString *signature,