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



commit aa2b566b1cc3bc6f0b6f22a1a6df3b61732b9b15
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 6fda56b..a4ff5a1 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",
@@ -74,6 +76,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]