[the-board/wip/http-api: 4/5] [ui] Export Application DBus json methods via HTTP



commit 3712cc06f81fc3410df102e4eaa5b10504e6a9a9
Author: Lucas Rocha <lucasr gnome org>
Date:   Tue Nov 23 01:29:24 2010 +0000

    [ui] Export Application DBus json methods via HTTP
    
    This is to allow browser extensions to communicate with The Board.

 src/js/ui/application.js |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/js/ui/application.js b/src/js/ui/application.js
index 6e26722..4250e96 100644
--- a/src/js/ui/application.js
+++ b/src/js/ui/application.js
@@ -10,9 +10,11 @@ const Mx = imports.gi.Mx;
 const MainWindow = imports.ui.mainWindow;
 
 // util imports
+const Http = imports.util.http;
 const Path = imports.util.path;
 
 const _THE_BOARD_DBUS_PATH = "/org/gnome/TheBoard";
+const _THE_BOARD_HTTP_PORT = 2010;
 
 const TheBoardIface = {
     name: "org.gnome.TheBoard",
@@ -75,6 +77,7 @@ Application.prototype = {
         log('Application: acquired ' + TheBoardIface.name);
 
         DBus.session.exportObject(_THE_BOARD_DBUS_PATH, this);
+        Http.exportObject(_THE_BOARD_HTTP_PORT, TheBoardIface, this);
 
         this._defineStyleAndThemes();
         this._createMainWindow();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]