diff options
Diffstat (limited to 'src/mm-bearer.h')
-rw-r--r-- | src/mm-bearer.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/src/mm-bearer.h b/src/mm-bearer.h new file mode 100644 index 00000000..ea598e59 --- /dev/null +++ b/src/mm-bearer.h @@ -0,0 +1,61 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details: + * + * Author: Aleksander Morgado <aleksander@lanedo.com> + * + * Copyright (C) 2011 Google, Inc. + */ + +#ifndef MM_BEARER_H +#define MM_BEARER_H + +#include <glib.h> +#include <glib-object.h> + +#include <mm-gdbus-bearer.h> +#include "mm-base-modem.h" + +#define MM_TYPE_BEARER (mm_bearer_get_type ()) +#define MM_BEARER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_BEARER, MMBearer)) +#define MM_BEARER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MM_TYPE_BEARER, MMBearerClass)) +#define MM_IS_BEARER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MM_TYPE_BEARER)) +#define MM_IS_BEARER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MM_TYPE_BEARER)) +#define MM_BEARER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MM_TYPE_BEARER, MMBearerClass)) + +typedef struct _MMBearer MMBearer; +typedef struct _MMBearerClass MMBearerClass; +typedef struct _MMBearerPrivate MMBearerPrivate; + +#define MM_BEARER_PATH "bearer-path" +#define MM_BEARER_CONNECTION "bearer-connection" +#define MM_BEARER_MODEM "bearer-modem" + +struct _MMBearer { + MmGdbusBearerSkeleton parent; + MMBearerPrivate *priv; +}; + +struct _MMBearerClass { + MmGdbusBearerSkeletonClass parent; +}; + +GType mm_bearer_get_type (void); + +void mm_bearer_new (MMBaseModem *modem, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +MMBearer *mm_bearer_new_finish (GAsyncInitable *initable, + GAsyncResult *res, + GError **error); + +#endif /* MM_BEARER_H */ |