[evolution-data-server] CamelNNTPStore: Override new CamelNetworkService properties.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] CamelNNTPStore: Override new CamelNetworkService properties.
- Date: Thu, 21 Feb 2013 22:19:35 +0000 (UTC)
commit 229cc66e1dff9581e37d2c5b909a875e2300b903
Author: Matthew Barnes <mbarnes redhat com>
Date: Thu Feb 21 14:23:16 2013 -0500
CamelNNTPStore: Override new CamelNetworkService properties.
camel/providers/nntp/camel-nntp-store.c | 62 +++++++++++++++++++++++++++++++
1 files changed, 62 insertions(+), 0 deletions(-)
---
diff --git a/camel/providers/nntp/camel-nntp-store.c b/camel/providers/nntp/camel-nntp-store.c
index af02279..8b02f12 100644
--- a/camel/providers/nntp/camel-nntp-store.c
+++ b/camel/providers/nntp/camel-nntp-store.c
@@ -56,6 +56,12 @@
#define DUMP_EXTENSIONS
+enum {
+ PROP_0,
+ PROP_CONNECTABLE,
+ PROP_HOST_REACHABLE
+};
+
static GInitableIface *parent_initable_interface;
/* Forward Declarations */
@@ -78,6 +84,48 @@ G_DEFINE_TYPE_WITH_CODE (
camel_subscribable_init))
static void
+nntp_store_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ switch (property_id) {
+ case PROP_CONNECTABLE:
+ camel_network_service_set_connectable (
+ CAMEL_NETWORK_SERVICE (object),
+ g_value_get_object (value));
+ return;
+ }
+
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+}
+
+static void
+nntp_store_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ switch (property_id) {
+ case PROP_CONNECTABLE:
+ g_value_take_object (
+ value,
+ camel_network_service_ref_connectable (
+ CAMEL_NETWORK_SERVICE (object)));
+ return;
+
+ case PROP_HOST_REACHABLE:
+ g_value_set_boolean (
+ value,
+ camel_network_service_get_host_reachable (
+ CAMEL_NETWORK_SERVICE (object)));
+ return;
+ }
+
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+}
+
+static void
nntp_store_dispose (GObject *object)
{
CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE (object);
@@ -1478,6 +1526,8 @@ camel_nntp_store_class_init (CamelNNTPStoreClass *class)
CamelDiscoStoreClass *disco_store_class;
object_class = G_OBJECT_CLASS (class);
+ object_class->set_property = nntp_store_set_property;
+ object_class->get_property = nntp_store_get_property;
object_class->dispose = nntp_store_dispose;
object_class->finalize = nntp_store_finalize;
@@ -1506,6 +1556,18 @@ camel_nntp_store_class_init (CamelNNTPStoreClass *class)
disco_store_class->get_folder_info_online = nntp_get_folder_info_online;
disco_store_class->get_folder_info_resyncing = nntp_get_folder_info_online;
disco_store_class->get_folder_info_offline = nntp_get_folder_info_offline;
+
+ /* Inherited from CamelNetworkService. */
+ g_object_class_override_property (
+ object_class,
+ PROP_CONNECTABLE,
+ "connectable");
+
+ /* Inherited from CamelNetworkService. */
+ g_object_class_override_property (
+ object_class,
+ PROP_HOST_REACHABLE,
+ "host-reachable");
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]