TrackerEndpoint: Tracker SPARQL Library Reference Manual

## TrackerEndpoint TrackerEndpoint — Expose a database outside the process |

## Stability Level

Stable, unless otherwise indicated

## Functions

TrackerSparqlConnection * | tracker_endpoint_get_sparql_connection ()
TrackerEndpointDBus * | tracker_endpoint_dbus_new ()
TrackerEndpointHttp * | tracker_endpoint_http_new ()

## Properties

TrackerSparqlConnection * | sparql-connection | Read / Write / Construct Only
GDBusConnection * | dbus-connection | Read / Write / Construct Only
char * | object-path | Read / Write / Construct Only
GTlsCertificate * | http-certificate | Read / Write / Construct Only
guint | http-port | Read / Write / Construct Only

## Signals

gboolean | block-remote-address |

## Types and Values

| TrackerEndpoint
| TrackerEndpointDBus
| TrackerEndpointHttp

## Object Hierarchy

        GObject
        ╰── TrackerEndpoint
            ├── TrackerEndpointDBus
            ╰── TrackerEndpointHttp

## Implemented Interfaces

TrackerEndpointDBus implements GInitable.

TrackerEndpointHttp implements GInitable.

## Includes

    #include <tracker-endpoint.h>

## Description

TrackerEndpoint allows sharing data, either with other processes on the system via a Tracker-specific D-Bus API, or remote peers via the HTTP SPARQL protocol.

When it is shared in this way, other peers can connect to your database using `tracker_sparql_connection_bus_new()` or `tracker_sparql_connection_remote_new()`, and can also fetch data directly from SPARQL queries using the `SELECT { SERVICE ... }` syntax.

## Functions

### tracker_endpoint_get_sparql_connection ()

    TrackerSparqlConnection *
    tracker_endpoint_get_sparql_connection
                                   (TrackerEndpoint *endpoint);

Returns the TrackerSparqlConnection that this endpoint proxies.

#### Parameters

endpoint | a TrackerEndpoint |

#### Returns

The proxied SPARQL connection.

[transfer none]

### tracker_endpoint_dbus_new ()

    TrackerEndpointDBus *
    tracker_endpoint_dbus_new (TrackerSparqlConnection *sparql_connection,
                               GDBusConnection *dbus_connection,
                               const gchar *object_path,
                               GCancellable *cancellable,
                               GError **error);

Registers a Tracker endpoint object at `object_path` on `dbus_connection` . The default object path is "/org/freedesktop/Tracker3/Endpoint".

#### Parameters

sparql_connection | a TrackerSparqlConnection |
dbus_connection | a GDBusConnection |
object_path | the object path to use, or `NULL` for the default. | [nullable]
cancellable | a GCancellable, or `NULL`. | [nullable]
error | pointer to a GError |

#### Returns

a TrackerEndpointDBus object.

[transfer full]

### tracker_endpoint_http_new ()

    TrackerEndpointHttp *
    tracker_endpoint_http_new (TrackerSparqlConnection *sparql_connection,
                               guint port,
                               GTlsCertificate *certificate,
                               GCancellable *cancellable,
                               GError **error);

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.

#### Parameters

sparql_connection | a TrackerSparqlConnection |
port | HTTP port to listen to |
certificate | certificate to use for encription, or `NULL`. | [nullable]
cancellable | a GCancellable, or `NULL`. | [nullable]
error | pointer to a GError |

#### Returns

a TrackerEndpointDBus object.

[transfer full]

Since: 3.1

## Types and Values

### TrackerEndpoint

    typedef struct _TrackerEndpoint TrackerEndpoint;

The TrackerEndpoint object represents a public connection to a TrackerSparqlConnection.

### TrackerEndpointDBus

    typedef struct _TrackerEndpointDBus TrackerEndpointDBus;

The TrackerEndpointDBus object represents a public connection to a TrackerSparqlConnection on a DBus object path.

### TrackerEndpointHttp

    typedef struct _TrackerEndpointHttp TrackerEndpointHttp;

The TrackerEndpointHttp object represents a public connection to a TrackerSparqlConnection on a HTTP port.

## Property Details

### The `“sparql-connection”` property

      “sparql-connection”        TrackerSparqlConnection *

Sparql connection.

Owner: TrackerEndpoint

Flags: Read / Write / Construct Only

### The `“dbus-connection”` property

      “dbus-connection”          GDBusConnection *

DBus connection.

Owner: TrackerEndpointDBus

Flags: Read / Write / Construct Only

### The `“object-path”` property

      “object-path”              char *

DBus object path.

Owner: TrackerEndpointDBus

Flags: Read / Write / Construct Only

Default value: NULL

### The `“http-certificate”` property

      “http-certificate”         GTlsCertificate *

HTTP certificate.

Owner: TrackerEndpointHttp

Flags: Read / Write / Construct Only

### The `“http-port”` property

      “http-port”                guint

HTTP Port.

Owner: TrackerEndpointHttp

Flags: Read / Write / Construct Only

Default value: 8080

## Signal Details

### The `“block-remote-address”` signal

    gboolean
    user_function (TrackerEndpointHttp *self,
                   GSocketAddress      *address,
                   gpointer             user_data)

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

Returning `FALSE` in this handler allows the connection, returning `TRUE` blocks it. The default with no signal handlers connected is `FALSE`.

#### Parameters

self | The TrackerNotifier |
address | The socket address of the remote connection |
user_data | user data set when the signal handler was connected. |