Logo Search packages:      
Sourcecode: kdbus version File versions  Download package

DBusMethodOrSignal::DBusMethodOrSignal ( QListViewItem *  parent,
QDomElement const &  elem,
QString const &  type 
) throw ( QDBusXmlError )

Parameters:
parent parent QListViewItem
elem QDomElement representing this method or signal as returned by org.freedesktop.DBus.Introspectable.Introspect.
type "Method" or "Signal"

Definition at line 27 of file dbusmethodorsignal.cpp.

  : DBusAnnotatable( parent, "(unknown)", type )
{
    m_args.setAutoDelete( true );

    ensureElementIsNamed( elem, type.lower() );
    ensureElementHasAttribute( elem, "name" );

    m_name = elem.attribute( "name" );

    // Is it permissible to have empty signals or methods... ?
    // We'll assume it is...
    if ( !elem.hasChildNodes() ) {
        m_signature = m_name + "()";
    }
    else {
        // Now look for arguments or annotations.
        QDomElement child = elem.firstChild().toElement();

        do {
            if ( child.tagName() == "arg" )
                m_args.append( new DBusMethodArgument( child ) );
            else if ( child.tagName() == "annotation" )
                addAnnotation( child );
            else
                kdWarning() << "Unhandled node in introspect data: "
                            << child.tagName() << endl;
            child = child.nextSibling().toElement();
        } while ( !child.isNull() );

        m_signature = discoverSignature();
    }

    setText(0, m_signature);

    m_object = discoverObject();
    m_service = discoverService();
    m_interface = discoverInterface();
}


Generated by  Doxygen 1.6.0   Back to index