Back to index

libunity  5.92.0
Classes | Defines | Typedefs | Functions | Variables
unity-scope-factory.c File Reference
#include <glib.h>
#include <glib-object.h>
#include <gee.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <unity-protocol.h>
#include "unity.h"
#include <dee.h>
#include <unity-trace.h>
#include <config.h>

Go to the source code of this file.

Classes

struct  _UnityScopeProxyIface
struct  _UnityScopeFactory
struct  _UnityScopeFactoryClass
struct  _UnityScopeFactoryPrivate
struct  _UnityScopeFactoryListLensDirectoryData

Defines

#define UNITY_TYPE_SCOPE_FACTORY   (unity_scope_factory_get_type ())
#define UNITY_SCOPE_FACTORY(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_SCOPE_FACTORY, UnityScopeFactory))
#define UNITY_SCOPE_FACTORY_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TYPE_SCOPE_FACTORY, UnityScopeFactoryClass))
#define UNITY_IS_SCOPE_FACTORY(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_SCOPE_FACTORY))
#define UNITY_IS_SCOPE_FACTORY_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TYPE_SCOPE_FACTORY))
#define UNITY_SCOPE_FACTORY_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TYPE_SCOPE_FACTORY, UnityScopeFactoryClass))
#define UNITY_TYPE_SCOPE_PROXY   (unity_scope_proxy_get_type ())
#define UNITY_SCOPE_PROXY(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_SCOPE_PROXY, UnityScopeProxy))
#define UNITY_IS_SCOPE_PROXY(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_SCOPE_PROXY))
#define UNITY_SCOPE_PROXY_GET_INTERFACE(obj)   (G_TYPE_INSTANCE_GET_INTERFACE ((obj), UNITY_TYPE_SCOPE_PROXY, UnityScopeProxyIface))
#define _g_free0(var)   (var = (g_free (var), NULL))
#define _g_object_unref0(var)   ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define __g_list_free__g_object_unref0_0(var)   ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
#define _g_error_free0(var)   ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define UNITY_TYPE_SCOPE_PROXY_REMOTE   (unity_scope_proxy_remote_get_type ())
#define UNITY_SCOPE_PROXY_REMOTE(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_SCOPE_PROXY_REMOTE, UnityScopeProxyRemote))
#define UNITY_SCOPE_PROXY_REMOTE_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TYPE_SCOPE_PROXY_REMOTE, UnityScopeProxyRemoteClass))
#define UNITY_IS_SCOPE_PROXY_REMOTE(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_SCOPE_PROXY_REMOTE))
#define UNITY_IS_SCOPE_PROXY_REMOTE_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TYPE_SCOPE_PROXY_REMOTE))
#define UNITY_SCOPE_PROXY_REMOTE_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TYPE_SCOPE_PROXY_REMOTE, UnityScopeProxyRemoteClass))
#define _g_key_file_free0(var)   ((var == NULL) ? NULL : (var = (g_key_file_free (var), NULL)))
#define UNITY_TYPE_SCOPE_PROXY_LOCAL   (unity_scope_proxy_local_get_type ())
#define UNITY_SCOPE_PROXY_LOCAL(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_SCOPE_PROXY_LOCAL, UnityScopeProxyLocal))
#define UNITY_SCOPE_PROXY_LOCAL_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TYPE_SCOPE_PROXY_LOCAL, UnityScopeProxyLocalClass))
#define UNITY_IS_SCOPE_PROXY_LOCAL(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_SCOPE_PROXY_LOCAL))
#define UNITY_IS_SCOPE_PROXY_LOCAL_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TYPE_SCOPE_PROXY_LOCAL))
#define UNITY_SCOPE_PROXY_LOCAL_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TYPE_SCOPE_PROXY_LOCAL, UnityScopeProxyLocalClass))
#define UNITY_SCOPE_FACTORY_GET_PRIVATE(o)   (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_TYPE_SCOPE_FACTORY, UnityScopeFactoryPrivate))

Typedefs

typedef struct _UnityScopeFactory
typedef struct _UnityScopeFactoryClass
typedef struct _UnityScopeFactoryPrivate
typedef struct _UnityScopeProxy
typedef struct _UnityScopeProxyIface
typedef struct _UnityScopeFactoryListLensDirectoryData
typedef struct _UnityScopeProxyRemote
typedef struct _UnityScopeProxyRemoteClass
typedef struct _UnityScopeProxyLocal
typedef struct _UnityScopeProxyLocalClass

Functions

GType unity_scope_factory_get_type (void)
UnityScopeFactory * unity_scope_factory_new (const gchar *lens_id_, const gchar *lenses_directory_)
UnityScopeFactory * unity_scope_factory_construct (GType object_type, const gchar *lens_id_, const gchar *lenses_directory_)
static void unity_scope_factory_list_lens_directory_data_free (gpointer _data)
static void unity_scope_factory_list_lens_directory (UnityScopeFactory *self, GAsyncReadyCallback _callback_, gpointer _user_data_)
static void unity_scope_factory_list_lens_directory_finish (UnityScopeFactory *self, GAsyncResult *_res_)
static gboolean unity_scope_factory_list_lens_directory_co (UnityScopeFactoryListLensDirectoryData *_data_)
const gchar * unity_scope_factory_get_lenses_directory (UnityScopeFactory *self)
static void unity_scope_factory_list_lens_directory_ready (GObject *source_object, GAsyncResult *_res_, gpointer _user_data_)
static void _g_object_unref0_ (gpointer var)
static void _g_list_free__g_object_unref0_ (GList *self)
static void unity_scope_factory_load_scope_file (UnityScopeFactory *self, const gchar *name)
UnityScopeProxyRemote * unity_scope_proxy_remote_new (const gchar *dbus_name_, const gchar *dbus_path_)
UnityScopeProxyRemote * unity_scope_proxy_remote_construct (GType object_type, const gchar *dbus_name_, const gchar *dbus_path_)
GType unity_scope_proxy_remote_get_type (void)
static gpointer _g_object_ref0 (gpointer self)
void unity_scope_factory_add_local_scope (UnityScopeFactory *self, UnityScope *scope)
const gchar * unity_scope_factory_get_lens_id (UnityScopeFactory *self)
static void unity_scope_factory_set_lens_id (UnityScopeFactory *self, const gchar *value)
static void unity_scope_factory_set_lenses_directory (UnityScopeFactory *self, const gchar *value)
static GObject * unity_scope_factory_constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_properties)
static void unity_scope_factory_class_init (UnityScopeFactoryClass *klass)
static void unity_scope_factory_instance_init (UnityScopeFactory *self)
static void unity_scope_factory_finalize (GObject *obj)
static void _vala_unity_scope_factory_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
static void _vala_unity_scope_factory_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)

Variables

static gpointer unity_scope_factory_parent_class = NULL

Class Documentation

struct _UnityScopeFactory

Definition at line 1006 of file unity-internal.h.

Collaboration diagram for _UnityScopeFactory:
Class Members
GObject parent_instance
UnityScopeFactoryPrivate * priv
GeeArrayList * scopes
struct _UnityScopeFactoryClass

Definition at line 1012 of file unity-internal.h.

Class Members
GObjectClass parent_class
struct _UnityScopeFactoryPrivate

Definition at line 118 of file unity-scope-factory.c.

Class Members
gchar * _lens_id
gchar * _lenses_directory
struct _UnityScopeFactoryListLensDirectoryData

Definition at line 123 of file unity-scope-factory.c.

Collaboration diagram for _UnityScopeFactoryListLensDirectoryData:
Class Members
GSimpleAsyncResult * _async_result
GError * _error_
GError * _inner_error_
GAsyncResult * _res_
GObject * _source_object_
int _state_
const gchar * _tmp0_
GFileInfo * _tmp10_
const gchar * _tmp11_
gchar * _tmp12_
const gchar * _tmp13_
gboolean _tmp14_
const gchar * _tmp15_
GError * _tmp16_
const gchar * _tmp17_
const gchar * _tmp1_
GFile * _tmp2_
GFile * _tmp3_
GFileEnumerator * _tmp4_
GFileEnumerator * _tmp5_
GList * _tmp6_
GList * _tmp7_
GList * _tmp8_
GFileInfo * _tmp9_
GFile * dir
GFileEnumerator * e
GList * files
GFileInfo * info
GList * info_collection
GList * info_it
gchar * name
UnityScopeFactory * self

Define Documentation

#define __g_list_free__g_object_unref0_0 (   var)    ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))

Definition at line 57 of file unity-scope-factory.c.

#define _g_error_free0 (   var)    ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

Definition at line 58 of file unity-scope-factory.c.

#define _g_free0 (   var)    (var = (g_free (var), NULL))

Definition at line 55 of file unity-scope-factory.c.

#define _g_key_file_free0 (   var)    ((var == NULL) ? NULL : (var = (g_key_file_free (var), NULL)))

Definition at line 70 of file unity-scope-factory.c.

#define _g_object_unref0 (   var)    ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

Definition at line 56 of file unity-scope-factory.c.

#define UNITY_IS_SCOPE_FACTORY (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_SCOPE_FACTORY))

Definition at line 40 of file unity-scope-factory.c.

#define UNITY_IS_SCOPE_FACTORY_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TYPE_SCOPE_FACTORY))

Definition at line 41 of file unity-scope-factory.c.

#define UNITY_IS_SCOPE_PROXY (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_SCOPE_PROXY))

Definition at line 50 of file unity-scope-factory.c.

#define UNITY_IS_SCOPE_PROXY_LOCAL (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_SCOPE_PROXY_LOCAL))

Definition at line 75 of file unity-scope-factory.c.

#define UNITY_IS_SCOPE_PROXY_LOCAL_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TYPE_SCOPE_PROXY_LOCAL))

Definition at line 76 of file unity-scope-factory.c.

#define UNITY_IS_SCOPE_PROXY_REMOTE (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_SCOPE_PROXY_REMOTE))

Definition at line 64 of file unity-scope-factory.c.

#define UNITY_IS_SCOPE_PROXY_REMOTE_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TYPE_SCOPE_PROXY_REMOTE))

Definition at line 65 of file unity-scope-factory.c.

#define UNITY_SCOPE_FACTORY (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_SCOPE_FACTORY, UnityScopeFactory))

Definition at line 38 of file unity-scope-factory.c.

#define UNITY_SCOPE_FACTORY_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TYPE_SCOPE_FACTORY, UnityScopeFactoryClass))

Definition at line 39 of file unity-scope-factory.c.

#define UNITY_SCOPE_FACTORY_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TYPE_SCOPE_FACTORY, UnityScopeFactoryClass))

Definition at line 42 of file unity-scope-factory.c.

#define UNITY_SCOPE_FACTORY_GET_PRIVATE (   o)    (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_TYPE_SCOPE_FACTORY, UnityScopeFactoryPrivate))
#define UNITY_SCOPE_PROXY (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_SCOPE_PROXY, UnityScopeProxy))

Definition at line 49 of file unity-scope-factory.c.

#define UNITY_SCOPE_PROXY_GET_INTERFACE (   obj)    (G_TYPE_INSTANCE_GET_INTERFACE ((obj), UNITY_TYPE_SCOPE_PROXY, UnityScopeProxyIface))

Definition at line 51 of file unity-scope-factory.c.

#define UNITY_SCOPE_PROXY_LOCAL (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_SCOPE_PROXY_LOCAL, UnityScopeProxyLocal))

Definition at line 73 of file unity-scope-factory.c.

#define UNITY_SCOPE_PROXY_LOCAL_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TYPE_SCOPE_PROXY_LOCAL, UnityScopeProxyLocalClass))

Definition at line 74 of file unity-scope-factory.c.

#define UNITY_SCOPE_PROXY_LOCAL_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TYPE_SCOPE_PROXY_LOCAL, UnityScopeProxyLocalClass))

Definition at line 77 of file unity-scope-factory.c.

#define UNITY_SCOPE_PROXY_REMOTE (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_SCOPE_PROXY_REMOTE, UnityScopeProxyRemote))

Definition at line 62 of file unity-scope-factory.c.

#define UNITY_SCOPE_PROXY_REMOTE_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TYPE_SCOPE_PROXY_REMOTE, UnityScopeProxyRemoteClass))

Definition at line 63 of file unity-scope-factory.c.

#define UNITY_SCOPE_PROXY_REMOTE_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TYPE_SCOPE_PROXY_REMOTE, UnityScopeProxyRemoteClass))

Definition at line 66 of file unity-scope-factory.c.

Definition at line 37 of file unity-scope-factory.c.

Definition at line 48 of file unity-scope-factory.c.

Definition at line 72 of file unity-scope-factory.c.

Definition at line 61 of file unity-scope-factory.c.


Typedef Documentation

typedef struct _UnityScopeFactory

Definition at line 44 of file unity-scope-factory.c.

typedef struct _UnityScopeFactoryClass

Definition at line 45 of file unity-scope-factory.c.

Definition at line 59 of file unity-scope-factory.c.

typedef struct _UnityScopeFactoryPrivate

Definition at line 46 of file unity-scope-factory.c.

typedef struct _UnityScopeProxy

Definition at line 53 of file unity-scope-factory.c.

typedef struct _UnityScopeProxyIface

Definition at line 54 of file unity-scope-factory.c.

typedef struct _UnityScopeProxyLocal

Definition at line 79 of file unity-scope-factory.c.

Definition at line 80 of file unity-scope-factory.c.

typedef struct _UnityScopeProxyRemote

Definition at line 68 of file unity-scope-factory.c.

Definition at line 69 of file unity-scope-factory.c.


Function Documentation

static void _g_list_free__g_object_unref0_ ( GList *  self) [static]

Definition at line 260 of file unity-scope-factory.c.

                                                         {
       g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
       g_list_free (self);
}

Here is the call graph for this function:

static gpointer _g_object_ref0 ( gpointer  self) [static]

Definition at line 223 of file unity-scope-factory.c.

                                               {
       return self ? g_object_ref (self) : NULL;
}

Here is the caller graph for this function:

static void _g_object_unref0_ ( gpointer  var) [static]

Definition at line 255 of file unity-scope-factory.c.

                                             {
       (var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}

Here is the caller graph for this function:

static void _vala_unity_scope_factory_get_property ( GObject *  object,
guint  property_id,
GValue *  value,
GParamSpec *  pspec 
) [static]

Definition at line 615 of file unity-scope-factory.c.

                                                                                                                             {
       UnityScopeFactory * self;
       self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_SCOPE_FACTORY, UnityScopeFactory);
       switch (property_id) {
              case UNITY_SCOPE_FACTORY_LENS_ID:
              g_value_set_string (value, unity_scope_factory_get_lens_id (self));
              break;
              case UNITY_SCOPE_FACTORY_LENSES_DIRECTORY:
              g_value_set_string (value, unity_scope_factory_get_lenses_directory (self));
              break;
              default:
              G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
              break;
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void _vala_unity_scope_factory_set_property ( GObject *  object,
guint  property_id,
const GValue *  value,
GParamSpec *  pspec 
) [static]

Definition at line 632 of file unity-scope-factory.c.

                                                                                                                                   {
       UnityScopeFactory * self;
       self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_SCOPE_FACTORY, UnityScopeFactory);
       switch (property_id) {
              case UNITY_SCOPE_FACTORY_LENS_ID:
              unity_scope_factory_set_lens_id (self, g_value_get_string (value));
              break;
              case UNITY_SCOPE_FACTORY_LENSES_DIRECTORY:
              unity_scope_factory_set_lenses_directory (self, g_value_get_string (value));
              break;
              default:
              G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
              break;
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void unity_scope_factory_add_local_scope ( UnityScopeFactory *  self,
UnityScope *  scope 
)

Definition at line 483 of file unity-scope-factory.c.

                                                                                      {
       UnityScope* _tmp0_;
       UnityScopeProxyLocal* _tmp1_;
       UnityScopeProxyLocal* proxy;
       UnityScope* _tmp2_;
       GeeArrayList* _tmp3_;
       g_return_if_fail (self != NULL);
       g_return_if_fail (scope != NULL);
       _tmp0_ = scope;
       _tmp1_ = unity_scope_proxy_local_new (_tmp0_);
       proxy = _tmp1_;
       _tmp2_ = scope;
       unity_scope_set_local (_tmp2_, TRUE);
       _tmp3_ = self->scopes;
       gee_abstract_collection_add ((GeeAbstractCollection*) _tmp3_, (UnityScopeProxy*) proxy);
       g_signal_emit_by_name (self, "scope-added", (UnityScopeProxy*) proxy);
       _g_object_unref0 (proxy);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void unity_scope_factory_class_init ( UnityScopeFactoryClass *  klass) [static]

Definition at line 575 of file unity-scope-factory.c.

                                                                            {
       unity_scope_factory_parent_class = g_type_class_peek_parent (klass);
       g_type_class_add_private (klass, sizeof (UnityScopeFactoryPrivate));
       G_OBJECT_CLASS (klass)->get_property = _vala_unity_scope_factory_get_property;
       G_OBJECT_CLASS (klass)->set_property = _vala_unity_scope_factory_set_property;
       G_OBJECT_CLASS (klass)->constructor = unity_scope_factory_constructor;
       G_OBJECT_CLASS (klass)->finalize = unity_scope_factory_finalize;
       g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_SCOPE_FACTORY_LENS_ID, g_param_spec_string ("lens-id", "lens-id", "lens-id", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
       g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_SCOPE_FACTORY_LENSES_DIRECTORY, g_param_spec_string ("lenses-directory", "lenses-directory", "lenses-directory", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
       g_signal_new ("scope_added", UNITY_TYPE_SCOPE_FACTORY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, UNITY_TYPE_SCOPE_PROXY);
}

Here is the call graph for this function:

Here is the caller graph for this function:

UnityScopeFactory* unity_scope_factory_construct ( GType  object_type,
const gchar *  lens_id_,
const gchar *  lenses_directory_ 
)
static GObject* unity_scope_factory_constructor ( GType  type,
guint  n_construct_properties,
GObjectConstructParam *  construct_properties 
) [static]

Definition at line 547 of file unity-scope-factory.c.

                                                                                                                                          {
       GObject * obj;
       GObjectClass * parent_class;
       UnityScopeFactory * self;
       const gchar* _tmp0_;
       GeeArrayList* _tmp4_;
       parent_class = G_OBJECT_CLASS (unity_scope_factory_parent_class);
       obj = parent_class->constructor (type, n_construct_properties, construct_properties);
       self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_SCOPE_FACTORY, UnityScopeFactory);
       _tmp0_ = self->priv->_lenses_directory;
       if (g_strcmp0 (_tmp0_, "") == 0) {
              const gchar* _tmp1_;
              gchar* _tmp2_ = NULL;
              gchar* _tmp3_;
              _tmp1_ = self->priv->_lens_id;
              _tmp2_ = g_strdup_printf ("%s/unity/lenses/%s", DATADIR, _tmp1_);
              _tmp3_ = _tmp2_;
              unity_scope_factory_set_lenses_directory (self, _tmp3_);
              _g_free0 (_tmp3_);
       }
       _tmp4_ = gee_array_list_new (UNITY_TYPE_SCOPE_PROXY, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL);
       _g_object_unref0 (self->scopes);
       self->scopes = _tmp4_;
       unity_scope_factory_list_lens_directory (self, NULL, NULL);
       return obj;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void unity_scope_factory_finalize ( GObject *  obj) [static]

Definition at line 593 of file unity-scope-factory.c.

                                                        {
       UnityScopeFactory * self;
       self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_SCOPE_FACTORY, UnityScopeFactory);
       _g_free0 (self->priv->_lens_id);
       _g_free0 (self->priv->_lenses_directory);
       _g_object_unref0 (self->scopes);
       G_OBJECT_CLASS (unity_scope_factory_parent_class)->finalize (obj);
}

Here is the caller graph for this function:

const gchar* unity_scope_factory_get_lens_id ( UnityScopeFactory *  self)

Definition at line 503 of file unity-scope-factory.c.

                                                                       {
       const gchar* result;
       const gchar* _tmp0_;
       g_return_val_if_fail (self != NULL, NULL);
       _tmp0_ = self->priv->_lens_id;
       result = _tmp0_;
       return result;
}

Here is the caller graph for this function:

const gchar* unity_scope_factory_get_lenses_directory ( UnityScopeFactory *  self)

Definition at line 525 of file unity-scope-factory.c.

                                                                                {
       const gchar* result;
       const gchar* _tmp0_;
       g_return_val_if_fail (self != NULL, NULL);
       _tmp0_ = self->priv->_lenses_directory;
       result = _tmp0_;
       return result;
}

Here is the caller graph for this function:

GType unity_scope_factory_get_type ( void  )

Definition at line 161 of file unity-scope-factory.c.

      {
       UNITY_SCOPE_FACTORY_DUMMY_PROPERTY,
       UNITY_SCOPE_FACTORY_LENS_ID,
       UNITY_SCOPE_FACTORY_LENSES_DIRECTORY
};

Here is the call graph for this function:

static void unity_scope_factory_instance_init ( UnityScopeFactory *  self) [static]

Definition at line 588 of file unity-scope-factory.c.

                                                                         {
       self->priv = UNITY_SCOPE_FACTORY_GET_PRIVATE (self);
}

Here is the caller graph for this function:

static void unity_scope_factory_list_lens_directory ( UnityScopeFactory *  self,
GAsyncReadyCallback  _callback_,
gpointer  _user_data_ 
) [static]

Definition at line 228 of file unity-scope-factory.c.

                                                                                                                                    {
       UnityScopeFactoryListLensDirectoryData* _data_;
       UnityScopeFactory* _tmp0_;
       _data_ = g_slice_new0 (UnityScopeFactoryListLensDirectoryData);
       _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, unity_scope_factory_list_lens_directory);
       g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_scope_factory_list_lens_directory_data_free);
       _tmp0_ = _g_object_ref0 (self);
       _data_->self = _tmp0_;
       unity_scope_factory_list_lens_directory_co (_data_);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static gboolean unity_scope_factory_list_lens_directory_co ( UnityScopeFactoryListLensDirectoryData *  _data_) [static]

Definition at line 266 of file unity-scope-factory.c.

                                                                                                            {
       switch (_data_->_state_) {
              case 0:
              goto _state_0;
              case 1:
              goto _state_1;
              case 2:
              goto _state_2;
              default:
              g_assert_not_reached ();
       }
       _state_0:
       _data_->_tmp0_ = _data_->self->priv->_lenses_directory;
       unity_trace_log_object ((GObject*) _data_->self, "Searching for Scopes in %s", _data_->_tmp0_);
       _data_->_tmp1_ = _data_->self->priv->_lenses_directory;
       _data_->_tmp2_ = NULL;
       _data_->_tmp2_ = g_file_new_for_path (_data_->_tmp1_);
       _data_->dir = _data_->_tmp2_;
       {
              _data_->_tmp3_ = _data_->dir;
              _data_->_state_ = 1;
              g_file_enumerate_children_async (_data_->_tmp3_, G_FILE_ATTRIBUTE_STANDARD_NAME, 0, G_PRIORITY_DEFAULT, NULL, unity_scope_factory_list_lens_directory_ready, _data_);
              return FALSE;
              _state_1:
              _data_->_tmp4_ = NULL;
              _data_->_tmp4_ = g_file_enumerate_children_finish (_data_->_tmp3_, _data_->_res_, &_data_->_inner_error_);
              _data_->e = _data_->_tmp4_;
              if (_data_->_inner_error_ != NULL) {
                     goto __catch21_g_error;
              }
              while (TRUE) {
                     _data_->_tmp5_ = _data_->e;
                     _data_->_state_ = 2;
                     g_file_enumerator_next_files_async (_data_->_tmp5_, 10, G_PRIORITY_DEFAULT, NULL, unity_scope_factory_list_lens_directory_ready, _data_);
                     return FALSE;
                     _state_2:
                     _data_->_tmp6_ = NULL;
                     _data_->_tmp6_ = g_file_enumerator_next_files_finish (_data_->_tmp5_, _data_->_res_, &_data_->_inner_error_);
                     _data_->files = _data_->_tmp6_;
                     if (_data_->_inner_error_ != NULL) {
                            _g_object_unref0 (_data_->e);
                            goto __catch21_g_error;
                     }
                     _data_->_tmp7_ = _data_->files;
                     if (_data_->_tmp7_ == NULL) {
                            __g_list_free__g_object_unref0_0 (_data_->files);
                            break;
                     }
                     _data_->_tmp8_ = _data_->files;
                     {
                            _data_->info_collection = _data_->_tmp8_;
                            for (_data_->info_it = _data_->info_collection; _data_->info_it != NULL; _data_->info_it = _data_->info_it->next) {
                                   _data_->_tmp9_ = _g_object_ref0 ((GFileInfo*) _data_->info_it->data);
                                   _data_->info = _data_->_tmp9_;
                                   {
                                          _data_->_tmp10_ = _data_->info;
                                          _data_->_tmp11_ = NULL;
                                          _data_->_tmp11_ = g_file_info_get_name (_data_->_tmp10_);
                                          _data_->_tmp12_ = g_strdup (_data_->_tmp11_);
                                          _data_->name = _data_->_tmp12_;
                                          _data_->_tmp13_ = _data_->name;
                                          _data_->_tmp14_ = FALSE;
                                          _data_->_tmp14_ = g_str_has_suffix (_data_->_tmp13_, ".scope");
                                          if (_data_->_tmp14_) {
                                                 _data_->_tmp15_ = _data_->name;
                                                 unity_scope_factory_load_scope_file (_data_->self, _data_->_tmp15_);
                                          }
                                          _g_free0 (_data_->name);
                                          _g_object_unref0 (_data_->info);
                                   }
                            }
                     }
                     __g_list_free__g_object_unref0_0 (_data_->files);
              }
              _g_object_unref0 (_data_->e);
       }
       goto __finally21;
       __catch21_g_error:
       {
              _data_->_error_ = _data_->_inner_error_;
              _data_->_inner_error_ = NULL;
              _data_->_tmp16_ = _data_->_error_;
              _data_->_tmp17_ = _data_->_tmp16_->message;
              g_warning ("unity-scope-factory.vala:78: Unable to search for scopes: %s", _data_->_tmp17_);
              _g_error_free0 (_data_->_error_);
       }
       __finally21:
       if (_data_->_inner_error_ != NULL) {
              _g_object_unref0 (_data_->dir);
              g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
              g_clear_error (&_data_->_inner_error_);
              return FALSE;
       }
       _g_object_unref0 (_data_->dir);
       if (_data_->_state_ == 0) {
              g_simple_async_result_complete_in_idle (_data_->_async_result);
       } else {
              g_simple_async_result_complete (_data_->_async_result);
       }
       g_object_unref (_data_->_async_result);
       return FALSE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void unity_scope_factory_list_lens_directory_data_free ( gpointer  _data) [static]

Definition at line 215 of file unity-scope-factory.c.

                                                                               {
       UnityScopeFactoryListLensDirectoryData* _data_;
       _data_ = _data;
       _g_object_unref0 (_data_->self);
       g_slice_free (UnityScopeFactoryListLensDirectoryData, _data_);
}

Here is the caller graph for this function:

static void unity_scope_factory_list_lens_directory_finish ( UnityScopeFactory *  self,
GAsyncResult *  _res_ 
) [static]

Definition at line 240 of file unity-scope-factory.c.

                                                                                                          {
       UnityScopeFactoryListLensDirectoryData* _data_;
       _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}
static void unity_scope_factory_list_lens_directory_ready ( GObject *  source_object,
GAsyncResult *  _res_,
gpointer  _user_data_ 
) [static]

Definition at line 246 of file unity-scope-factory.c.

                                                                                                                              {
       UnityScopeFactoryListLensDirectoryData* _data_;
       _data_ = _user_data_;
       _data_->_source_object_ = source_object;
       _data_->_res_ = _res_;
       unity_scope_factory_list_lens_directory_co (_data_);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void unity_scope_factory_load_scope_file ( UnityScopeFactory *  self,
const gchar *  name 
) [static]

Definition at line 370 of file unity-scope-factory.c.

                                                                                             {
       static const char GROUP[] = "Scope";
       static const char DBUS_NAME[] = "DBusName";
       static const char DBUS_PATH[] = "DBusPath";
       const gchar* _tmp0_;
       const gchar* _tmp1_;
       gchar* _tmp2_ = NULL;
       gchar* path;
       GKeyFile* _tmp3_;
       GKeyFile* key_file;
       GError * _inner_error_ = NULL;
       g_return_if_fail (self != NULL);
       g_return_if_fail (name != NULL);
       _tmp0_ = self->priv->_lenses_directory;
       _tmp1_ = name;
       _tmp2_ = g_build_filename (_tmp0_, _tmp1_, NULL);
       path = _tmp2_;
       _tmp3_ = g_key_file_new ();
       key_file = _tmp3_;
       {
              GKeyFile* _tmp4_;
              const gchar* _tmp5_;
              GKeyFile* _tmp6_;
              gboolean _tmp7_ = FALSE;
              _tmp4_ = key_file;
              _tmp5_ = path;
              g_key_file_load_from_file (_tmp4_, _tmp5_, G_KEY_FILE_NONE, &_inner_error_);
              if (_inner_error_ != NULL) {
                     goto __catch22_g_error;
              }
              _tmp6_ = key_file;
              _tmp7_ = g_key_file_has_group (_tmp6_, "Scope");
              if (_tmp7_) {
                     GKeyFile* _tmp8_;
                     gchar* _tmp9_ = NULL;
                     gchar* dbus_name;
                     GKeyFile* _tmp10_;
                     gchar* _tmp11_ = NULL;
                     gchar* dbus_path;
                     const gchar* _tmp12_;
                     const gchar* _tmp13_;
                     UnityScopeProxyRemote* _tmp14_;
                     UnityScopeProxyRemote* scope;
                     GeeArrayList* _tmp15_;
                     UnityScopeProxyRemote* _tmp16_;
                     UnityScopeProxyRemote* _tmp17_;
                     const gchar* _tmp18_;
                     const gchar* _tmp19_;
                     const gchar* _tmp20_;
                     _tmp8_ = key_file;
                     _tmp9_ = g_key_file_get_string (_tmp8_, GROUP, DBUS_NAME, &_inner_error_);
                     dbus_name = _tmp9_;
                     if (_inner_error_ != NULL) {
                            goto __catch22_g_error;
                     }
                     _tmp10_ = key_file;
                     _tmp11_ = g_key_file_get_string (_tmp10_, GROUP, DBUS_PATH, &_inner_error_);
                     dbus_path = _tmp11_;
                     if (_inner_error_ != NULL) {
                            _g_free0 (dbus_name);
                            goto __catch22_g_error;
                     }
                     _tmp12_ = dbus_name;
                     _tmp13_ = dbus_path;
                     _tmp14_ = unity_scope_proxy_remote_new (_tmp12_, _tmp13_);
                     scope = _tmp14_;
                     _tmp15_ = self->scopes;
                     _tmp16_ = scope;
                     gee_abstract_collection_add ((GeeAbstractCollection*) _tmp15_, (UnityScopeProxy*) _tmp16_);
                     _tmp17_ = scope;
                     g_signal_emit_by_name (self, "scope-added", (UnityScopeProxy*) _tmp17_);
                     _tmp18_ = path;
                     _tmp19_ = dbus_path;
                     _tmp20_ = dbus_name;
                     unity_trace_log_object ((GObject*) self, "Successfully loaded %s: %s@%s", _tmp18_, _tmp19_, _tmp20_);
                     _g_object_unref0 (scope);
                     _g_free0 (dbus_path);
                     _g_free0 (dbus_name);
              } else {
                     const gchar* _tmp21_;
                     _tmp21_ = path;
                     g_warning ("unity-scope-factory.vala:107: Unable to load %s: Does not contain 'Sco" \
"pe' group", _tmp21_);
              }
       }
       goto __finally22;
       __catch22_g_error:
       {
              GError* e = NULL;
              const gchar* _tmp22_;
              GError* _tmp23_;
              const gchar* _tmp24_;
              e = _inner_error_;
              _inner_error_ = NULL;
              _tmp22_ = path;
              _tmp23_ = e;
              _tmp24_ = _tmp23_->message;
              g_warning ("unity-scope-factory.vala:110: Unable to load %s: %s", _tmp22_, _tmp24_);
              _g_error_free0 (e);
       }
       __finally22:
       if (_inner_error_ != NULL) {
              _g_key_file_free0 (key_file);
              _g_free0 (path);
              g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
              g_clear_error (&_inner_error_);
              return;
       }
       _g_key_file_free0 (key_file);
       _g_free0 (path);
}

Here is the call graph for this function:

Here is the caller graph for this function:

UnityScopeFactory* unity_scope_factory_new ( const gchar *  lens_id_,
const gchar *  lenses_directory_ 
)

Definition at line 210 of file unity-scope-factory.c.

                                                                                                   {
       return unity_scope_factory_construct (UNITY_TYPE_SCOPE_FACTORY, lens_id_, lenses_directory_);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void unity_scope_factory_set_lens_id ( UnityScopeFactory *  self,
const gchar *  value 
) [static]

Definition at line 513 of file unity-scope-factory.c.

                                                                                          {
       const gchar* _tmp0_;
       gchar* _tmp1_;
       g_return_if_fail (self != NULL);
       _tmp0_ = value;
       _tmp1_ = g_strdup (_tmp0_);
       _g_free0 (self->priv->_lens_id);
       self->priv->_lens_id = _tmp1_;
       g_object_notify ((GObject *) self, "lens-id");
}

Here is the caller graph for this function:

static void unity_scope_factory_set_lenses_directory ( UnityScopeFactory *  self,
const gchar *  value 
) [static]

Definition at line 535 of file unity-scope-factory.c.

                                                                                                   {
       const gchar* _tmp0_;
       gchar* _tmp1_;
       g_return_if_fail (self != NULL);
       _tmp0_ = value;
       _tmp1_ = g_strdup (_tmp0_);
       _g_free0 (self->priv->_lenses_directory);
       self->priv->_lenses_directory = _tmp1_;
       g_object_notify ((GObject *) self, "lenses-directory");
}

Here is the caller graph for this function:

UnityScopeProxyRemote* unity_scope_proxy_remote_construct ( GType  object_type,
const gchar *  dbus_name_,
const gchar *  dbus_path_ 
)

Definition at line 393 of file unity-scope-proxy-remote.c.

                                                                                                                                {
       UnityScopeProxyRemote * self = NULL;
       const gchar* _tmp0_;
       const gchar* _tmp1_;
       g_return_val_if_fail (dbus_name_ != NULL, NULL);
       g_return_val_if_fail (dbus_path_ != NULL, NULL);
       _tmp0_ = dbus_name_;
       _tmp1_ = dbus_path_;
       self = (UnityScopeProxyRemote*) g_object_new (object_type, "dbus-name", _tmp0_, "dbus-path", _tmp1_, NULL);
       return self;
}

Definition at line 182 of file unity-scope-factory.c.

                                                                                                                            {
       UnityScopeFactory * self = NULL;
       const gchar* _tmp0_;
       const gchar* _tmp1_;
       g_return_val_if_fail (lens_id_ != NULL, NULL);
       g_return_val_if_fail (lenses_directory_ != NULL, NULL);
       _tmp0_ = lens_id_;
       _tmp1_ = lenses_directory_;
       self = (UnityScopeFactory*) g_object_new (object_type, "lens-id", _tmp0_, "lenses-directory", _tmp1_, NULL);
       return self;
}
UnityScopeProxyRemote* unity_scope_proxy_remote_new ( const gchar *  dbus_name_,
const gchar *  dbus_path_ 
)

Definition at line 406 of file unity-scope-proxy-remote.c.

Here is the call graph for this function:


Variable Documentation

gpointer unity_scope_factory_parent_class = NULL [static]

Definition at line 159 of file unity-scope-factory.c.