X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dbind%2Fdbtest.c;h=42c191947a53c5a4e0468c5cf0f402d110d38251;hb=3f3b64df9928cfda09f68aa9554ed148deffd76a;hp=8203c275c541b34b3efc51670d8ba08e203410b9;hpb=dfc071dcf2f98f282616911cb0eb1636c93f3e77;p=platform%2Fupstream%2Fat-spi2-core.git diff --git a/dbind/dbtest.c b/dbind/dbtest.c index 8203c27..42c1919 100644 --- a/dbind/dbtest.c +++ b/dbind/dbtest.c @@ -1,3 +1,22 @@ +/* + * Copyright 2008-2011 Novell, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + #include #include #include @@ -8,7 +27,7 @@ #define DESKICE_PATH "/Novell/ICEDesktop/Daemon" #define DESKICE_NAMESPACE "Novell.ICEDesktop.Daemon" -void marshal (DBusMessage *msg, char *type, void *ptr) +void marshal (DBusMessage *msg, const char *type, void *ptr) { DBusMessageIter iter; @@ -16,7 +35,7 @@ void marshal (DBusMessage *msg, char *type, void *ptr) dbind_any_marshal (&iter, &type, &ptr); } -void demarshal (DBusMessage *msg, char *type, void *ptr) +void demarshal (DBusMessage *msg, const char *type, void *ptr) { DBusMessageIter iter; @@ -298,8 +317,8 @@ void test_twovals () DBusMessage *msg; DBusMessageIter iter; TwoVal i, o; - char *type_twoval = TYPEOF_TWOVAL; - char *type; + const char *type_twoval = TYPEOF_TWOVAL; + const char *type; void *ptr; msg = dbus_message_new (DBUS_MESSAGE_TYPE_METHOD_CALL); @@ -383,15 +402,15 @@ void test_helpers () dbind_find_c_alignment ("(sss)"); dbind_find_c_alignment ("a(sss)"); dbind_find_c_alignment ("(s(s)yd(d)s)"); + dbind_find_c_alignment ("a{ss}"); fprintf (stderr, "helpers passed\n"); } int main (int argc, char **argv) { DBusConnection *bus; - DBusError err; - bus = dbus_bus_get (DBUS_BUS_SESSION, &err); + bus = dbus_bus_get (DBUS_BUS_SESSION, NULL); test_helpers (); test_marshalling ();