remote.h 1.01 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/* WirePlumber
 *
 * Copyright © 2019 Collabora Ltd.
 *    @author George Kiagiadakis <george.kiagiadakis@collabora.com>
 *
 * SPDX-License-Identifier: MIT
 */

#ifndef __WIREPLUMBER_REMOTE_H__
#define __WIREPLUMBER_REMOTE_H__

#include "core.h"

G_BEGIN_DECLS

Julian Bouzas's avatar
Julian Bouzas committed
16 17 18 19 20 21 22 23 24
/**
 * WpRemoteState:
 * @WP_REMOTE_STATE_ERROR: remote is in error
 * @WP_REMOTE_STATE_UNCONNECTED: not connected
 * @WP_REMOTE_STATE_CONNECTING: connecting to remote service
 * @WP_REMOTE_STATE_CONNECTED: remote is connected and ready
 *
 * The different states the remote can be
 */
25
typedef enum {
Julian Bouzas's avatar
Julian Bouzas committed
26 27 28 29
  WP_REMOTE_STATE_ERROR = -1,
  WP_REMOTE_STATE_UNCONNECTED = 0,
  WP_REMOTE_STATE_CONNECTING = 1,
  WP_REMOTE_STATE_CONNECTED = 2,
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
} WpRemoteState;

#define WP_TYPE_REMOTE (wp_remote_get_type ())
G_DECLARE_DERIVABLE_TYPE (WpRemote, wp_remote, WP, REMOTE, GObject)

struct _WpRemoteClass
{
  GObjectClass parent_class;

  gboolean (*connect) (WpRemote *self);
};

WpCore *wp_remote_get_core (WpRemote *self);
gboolean wp_remote_connect (WpRemote *self);

G_END_DECLS

#endif