Bug 19518 - dbus-c++ problems in generation of type with complex array
Summary: dbus-c++ problems in generation of type with complex array
Status: RESOLVED NOTOURBUG
Alias: None
Product: dbus
Classification: Unclassified
Component: GLib (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: red1
QA Contact: John (J5) Palmieri
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-12 01:57 UTC by red1
Modified: 2011-01-10 07:00 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
patch (9.31 KB, patch)
2009-01-12 01:59 UTC, red1
Details | Splinter Review
patch_1 (9.35 KB, patch)
2009-01-21 08:32 UTC, red1
Details | Splinter Review

Description red1 2009-01-12 01:57:55 UTC
I would like to submit a patch fixing this problem and adding some features : 

	Bug fix :
	     problem in type generation with complex array

	feature :
	    Add nonblock function for each method in the proxy generation

dispatcher/connection

	feature:
	    Add constructor to create a connection passing a dispatcher (instead of creating a connection with default dispatcher and use setup after)
        Add fd to allow dispatcher to leave directly when leave method is called (instead of waiting for the timeout on the select)

Red1
Comment 1 red1 2009-01-12 01:59:37 UTC
Created attachment 21893 [details] [review]
patch
Comment 2 Andreas Volz 2009-01-16 14:07:46 UTC
Some questions:

I don't understand the problem with complex array that you've fixed with only the patch. Could you try to explain the problem?

The feature to add invoke_method_noreply() looks like what I've done in the gitorious branch. Maybe you could test this one. I plan to merge it to fdo, but it still has one or two little bugs.

What is about:

@@ -361,8 +400,11 @@ void generate_proxy(Xml::Document &doc, const char *filename)
 			{
 				file << tab << signature_to_type(args_out.front()->get("type")) << " ";
 			}
-
+				
+			if(my_i==0)
 			file << method.get("name") << "(";
+			else
+				file << method.get("name") << "ASync( ";

It seems you generate a ASync function from XML. But I see no reference to ASync in your patch. Did you forget to add it?

Comment 3 red1 2009-01-16 14:57:05 UTC
For the complex array i'll give an exemple wich doesn't work with the source code avaible in the git.

Regarding aSync methods, I saw that you added invoke_method_noreply() so when we generate a proxy (from introspect) for each method i added a non block method with ASync suffix (using invoke_method_noreply() inside).

Wich mean that if you have a function called MyFunc() in the adaptator.h you'll have two functions MyFunc and MyFuncAsync.


I'll add details on complex array ASAP.

Red1

Comment 4 red1 2009-01-21 05:39:33 UTC
Introspect:

    <method name="function"> 
      <arg type="(iiiua(ayayayiiiii))" name="evt" direction="in"/>
      <arg type="i" name="id" direction="in"/>
    </method>

With fix :      
     
     function(const ::DBus::Struct< int32_t, int32_t, int32_t, uint32_t, std::vector< ::DBus::Struct< std::vector< uint8_t >, std::vector< uint8_t >, std::vector< uint8_t >, int32_t, int32_t, int32_t, int32_t, int32_t > > >& evt, const int32_t& id) = 0;
     

without fix:     
     function(const ::DBus::Struct< int32_t, int32_t, int32_t, uint32_t, std::vector< ::DBus::Struct< std::vector< uint8_t, std::vector< uint8_t, std::vector< uint8_t, int32_t, int32_t, int32_t, int32_t, int32_t > > > >,  > >, & evt, const int32_t& id) = 0;
     
     
Comment 5 red1 2009-01-21 08:32:52 UTC
Created attachment 22134 [details] [review]
patch_1
Comment 6 red1 2009-01-29 03:16:59 UTC
up
Comment 7 Simon McVittie 2011-01-10 07:00:55 UTC
dbus-c++ <http://sourceforge.net/projects/dbus-cplusplus/> has its own bug
tracker and isn't hosted here. Please open a bug on Sourceforge if this is still applicable.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.