Re: Function g_signal_by_name problem



On Mo, 2013-06-10 at 23:54 +0200, Poalo Vecchiotti wrote:
Hello all of you!

I am trying to make a device I created using gupnp libs send a
message.
So I defined that device (called dev) that way:

GUPnPRootDevice *dev;
GUPnPContext *context;
context = gupnp_context_new (NULL, NULL, 0, NULL);
gupnp_context_host_path (context, "BasicDevice1.xml",
"/BasicDevice1.xml");
dev = gupnp_root_device_new (context, "BasicDevice1.xml",
"/home/paolo/Desktop/Paolo/prova1" );
gupnp_root_device_set_available (dev, TRUE);

/* than I said to emit the signal calling g_signal_emit*/

g_signal_emit_by_name ( GUPnPRootDevice::dev,
"service-proxy-available");

What are you trying to achieve here? This signal does not exist on
GUPnPRootDevice or any of its ancestors, it's missing its parameters and
should not be emitted by the user.


/*next I enter a main loop*/

The problem comes out when I compile the source code, as I get this
error:

dev1.cpp:28:25: error: ‘dev’ is not a member of ‘GUPnPRootDevice {aka
_GUPnPRootDevice}’

I cannot understand why if I defined dev as GUPnPRootDevice it should
be not a member of. Where is the problem? I tried different inputs to
that instances but I always get errors.

Because what you've written down there would be the equivalent of
accessing static member of a C++ class. It should be just "dev". 





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]