Пример #1
0
        public DBusDatastore()
        {
            string activityId="";

            if (dataStoreInterfaceObj!=null) {
                return;
            }

            try {
                bus = Bus.Session;
                bus_name = "org.laptop.sugar.DataStore";
                path = new ObjectPath ("/org/laptop/sugar/DataStore");

                if (bus.RequestName (bus_name) == RequestNameReply.PrimaryOwner) {

                    System.Console.Out.WriteLine("Non found the service DataStore.");

                } else {
                    IBus ibus = bus.GetObject<IBus> (bus_name, path);

                    //import a remote to a local proxy
                    dataStoreInterfaceObj = bus.GetObject<DataStoreInterface> (bus_name, path);
                }
            } catch (Exception ex) {
                System.Console.Out.WriteLine("Exception during the DBus  Datastore Instance handling: "+ex.Message);
                System.Console.Out.WriteLine("Stack: "+ex.StackTrace);
            }
        }
Пример #2
0
        private void Initialize(object object_id, DSMetadata metadata, object file_path)
        {
            this._object_id = object_id;
                this._metadata = metadata;
                this._file_path = file_path;
                this._destroyed = false;
                this._owns_file = false;

            if (dbus_helpers==null) {
                DBusDatastore datastore=new DBusDatastore();
                dbus_helpers=datastore.getDataStore();
            }
        }