Beispiel #1
0
DBus::Variant contentAccessModuleServer::createVariantUint16(uint16_t value)
{
    DBus::Variant var;
    DBus::MessageIter iter = var.writer();
    iter.append_uint16(value);
    return var;
}
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;
}