Ejemplo n.º 1
0
DBus::Variant contentAccessModuleServer::createVariantString(std::string str)
{
    DBus::Variant var;
    DBus::MessageIter iter = var.writer();
    iter.append_string(str.c_str());
    return var;
}
Ejemplo n.º 2
0
bool HalDevice::PropertyExists( const char* property )
{
	/*	build request
	*/	
	DBus::CallMessage msg
	(
		HAL_PATH,
		_udi.c_str(),
		HALDEV_IFACE,
		"PropertyExists"
	);

	DBus::MessageIter iter = msg.w_iter();
	iter.append_string(property);

	/*	invoke remote method
	*/
	DBus::Message reply = conn().send_blocking(msg, 1000);

	DBus::MessageIter ri = reply.r_iter();
	return ri.get_bool();
}
Ejemplo n.º 3
0
void SdpBrowser::on_read_response( u16 status, const Sdp::RecordList& data )
{
	DBus::MessageIter rw = _reply->w_iter();

	rw.append_uint16(status);

	DBus::MessageIter sa = rw.new_array(DBUS_TYPE_STRING);

	Sdp::RecordList::const_iterator rit = data.begin();
	while( rit != data.end() )
	{
		sa.append_string( _records[rit->handle()]->oname().c_str() );

		++rit;
	}

	rw.close_container(sa);
	_reply->append(DBUS_TYPE_INVALID);

	_bus.send(*_reply);
	delete _reply;
	_reply = NULL;
}