diff options
author | Sascha Silbe <sascha-pgp@silbe.org> | 2011-04-08 22:13:20 (GMT) |
---|---|---|
committer | Sascha Silbe <sascha-pgp@silbe.org> | 2011-04-08 22:13:20 (GMT) |
commit | c7d8a1b1864116159d82e6fc90fe1bac218cd8f9 (patch) | |
tree | 00814affbe00ad0045466310e7e7a34b13e887db /bin | |
parent | c60d53a020591b75562e6f3249150e2c553fb198 (diff) |
add framework for Sugar data store API v1
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/datastore-service | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/bin/datastore-service b/bin/datastore-service index c82e92e..c18d141 100755 --- a/bin/datastore-service +++ b/bin/datastore-service @@ -1,4 +1,22 @@ #!/usr/bin/env python +# +# Author: Sascha Silbe <sascha-pgp@silbe.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3 +# as published by the Free Software Foundation. +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +""" +Gdatastore DBus service main loop +""" + import logging import os import signal @@ -9,7 +27,7 @@ import dbus.mainloop.glib import dbus.glib import gobject -import datastore +from gdatastore import datastore BASE_DIR = os.path.join(os.path.expanduser('~/.gdatastore')) @@ -36,7 +54,8 @@ def main(): dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) bus = dbus.SessionBus() - service = datastore.DataStore(BASE_DIR) + internal_api = datastore.InternalApi(BASE_DIR) + dbus_api_sugar_v1 = datastore.DBusApiSugarV1(internal_api) mainloop = gobject.MainLoop() bus.set_exit_on_disconnect(False) @@ -56,7 +75,7 @@ def main(): except: logging.exception('Data store shut down with error') - service.stop() + internal_api.stop() main() |