Tracker.EndpointHttp
Description: Reference for Tracker.EndpointHttp

### Class

# TrackerEndpointHttp

since: 3.1

#### Description [src]

    final class Tracker.EndpointHttp : Tracker.Endpoint
      implements Gio.Initable {
      /* No available fields */
    }

`TrackerEndpointHttp` makes the RDF data in a `TrackerSparqlConnection` accessible to other hosts via HTTP.

This object is a `TrackerEndpoint` subclass that exports a `TrackerSparqlConnection` so its RDF data is accessible via HTTP requests on the given port. This endpoint implementation is compliant with the SPARQL protocol specifications and may interoperate with other implementations.

    // This host has "example.local" hostname
    endpoint = tracker_endpoint_http_new (sparql_connection,
                                          8080,
                                          tls_certificate,
                                          NULL,
                                          &error);

    // From another host
    connection = tracker_sparql_connection_remote_new ("http://example.local:8080/sparql");

Access to HTTP endpoints may be managed via the `TrackerEndpointHttp::block-remote-address` signal, the boolean return value expressing whether the connection is blocked or not. Inspection of the requester address is left up to the user. The default value allows all requests independently of their provenance, users are encouraged to add a handler.

If the provided `GTlsCertificate` is `NULL`, the endpoint will allow plain HTTP connections. Users are encouraged to provide a certificate in order to use HTTPS.

As a security measure, and in compliance specifications, the HTTP endpoint does not handle database updates or modifications in any way. The database content is considered to be entirely managed by the process that creates the HTTP endpoint and owns the `TrackerSparqlConnection`.

A `TrackerEndpointHttp` may be created on a different thread/main context from the one that created `TrackerSparqlConnection`.

Available since: 3.1

#### Ancestors

- TrackerEndpoint
- GObject

#### Implements

- GInitable

#### Constructors

###### tracker_endpoint_http_new

Sets up a Tracker endpoint to listen via HTTP, in the given `port`. If `certificate` is not `NULL`, HTTPS may be used to connect to the endpoint.

since: 3.1

#### Instance methods

##### Methods inherited from TrackerEndpoint (1)

###### tracker_endpoint_get_sparql_connection

Returns the `TrackerSparqlConnection` that this endpoint proxies to a wider audience.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

##### Methods inherited from GInitable (1)

###### g_initable_init

Initializes the object implementing the interface.

since: 2.22

#### Properties

###### Tracker.EndpointHttp:http-certificate

`GTlsCertificate` to encrypt the communication.

###### Tracker.EndpointHttp:http-port

HTTP port used to listen requests.

##### Properties inherited from TrackerEndpoint (1)

###### Tracker.Endpoint:sparql-connection

The `TrackerSparqlConnection` being proxied by this endpoint.

#### Signals

###### Tracker.EndpointHttp::block-remote-address

Allows control over the connections stablished. The given address is that of the requesting peer.

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.