Exemplo n.º 1
0
bool
App::can_control(const Client::PortModel* port) const
{
	return port->is_a(uris().lv2_ControlPort)
		|| port->is_a(uris().lv2_CVPort)
		|| (port->is_a(uris().atom_AtomPort)
		    && (port->supports(uris().atom_Float)
		        || port->supports(uris().atom_String)));
}
Exemplo n.º 2
0
void
App::property_change(const Raul::URI& subject,
                     const Raul::URI& key,
                     const Atom&      value)
{
	if (subject == Raul::URI("ingen:/engine") && key == uris().param_sampleRate) {
		if (value.type() == forge().Int) {
			log().info(fmt("Sample rate: %1%\n") % uris().forge.str(value));
			_sample_rate = value.get<int32_t>();
		} else {
			log().error("Engine sample rate property is not an integer\n");
		}
	}
}
 // Serilize Constructor
 HTTPMessageCommand()
     : Message( PROTOCOL_VERSION , 10100 , 0 )
 {
     cmd( "" );
     uris(  );
     runAsUser( "root" );
     executors(  );
 }
Exemplo n.º 4
0
String DataObjectGtk::url()
{
    Vector<KURL> uris(uriList());
    for (size_t i = 0; i < uris.size(); i++) {
        KURL& uri = uris[0];
        if (uri.isValid())
            return uri;
    }

    return String();
}
Exemplo n.º 5
0
static void didResolveProxy(GProxyResolver* resolver, GAsyncResult* result, bool* isUsingProxyType, bool* isUsingProxy)
{
    GUniqueOutPtr<GError> error;
    GUniquePtr<char*> uris(g_proxy_resolver_lookup_finish(resolver, result, &error.outPtr()));
    if (error) {
        WTFLogAlways("Error determining system proxy settings: %s", error->message);
        return;
    }

    *isUsingProxyType = didResolveProxy(uris.get());
    *isUsingProxy = isUsingHttpProxy || isUsingHttpsProxy;
}
Exemplo n.º 6
0
Vector<String> DataObjectGtk::files()
{
    Vector<KURL> uris(uriList());
    Vector<String> files;

    for (size_t i = 0; i < uris.size(); i++) {
        KURL& uri = uris[0];
        if (!uri.isValid() || !uri.isLocalFile())
            continue;

        files.append(uri.string());
    }

    return files;
}
Exemplo n.º 7
0
void
App::set_property(const Raul::URI& subject,
                  const Raul::URI& key,
                  const Atom&      value)
{
	// Send message to server
	interface()->set_property(subject, key, value);

	/* The server does not feed back set messages (kludge to prevent control
	   feedback and bandwidth wastage, see Delta.cpp).  So, assume everything
	   went as planned here and fire the signal ourselves as if the server
	   feedback came back immediately. */
	if (key != uris().ingen_activity) {
		_client->signal_property_change().emit(subject, key, value);
	}
}