Merge lp:~manishsinha/zeitgeist-datasources/add-ff-36-support-bug-775817 into lp:zeitgeist-datasources/0.8
- add-ff-36-support-bug-775817
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 134 | ||||
Proposed branch: | lp:~manishsinha/zeitgeist-datasources/add-ff-36-support-bug-775817 | ||||
Merge into: | lp:zeitgeist-datasources/0.8 | ||||
Diff against target: |
2623 lines (+1584/-749) 41 files modified
configure.ac (+35/-13) firefox-36-libzg/Makefile.am (+15/-0) firefox-36-libzg/README (+43/-0) firefox-36-libzg/extension/Makefile.am (+42/-0) firefox-36-libzg/extension/chrome.manifest (+2/-0) firefox-36-libzg/extension/chrome/content/zeitgeist.xul (+164/-0) firefox-36-libzg/extension/components/Makefile.am (+60/-0) firefox-36-libzg/extension/components/ZeitgeistComponent.cpp (+39/-0) firefox-36-libzg/extension/components/ZeitgeistModule.cpp (+86/-0) firefox-36-libzg/extension/components/zeitgeist.idl (+30/-0) firefox-36-libzg/extension/components/zeitgeistextend.h (+45/-0) firefox-36-libzg/extension/defaults/preferences/zeitgeist.js (+2/-0) firefox-36-libzg/extension/install.rdf (+28/-0) firefox-36-libzg/extension/license.txt (+166/-0) firefox-40-libzg/Makefile.am (+16/-0) firefox-40-libzg/README (+43/-0) firefox-40-libzg/extension/Makefile.am (+42/-0) firefox-40-libzg/extension/chrome.manifest (+4/-0) firefox-40-libzg/extension/chrome/content/zeitgeist.xul (+164/-0) firefox-40-libzg/extension/components/Makefile.am (+60/-0) firefox-40-libzg/extension/components/ZeitgeistComponent.cpp (+50/-0) firefox-40-libzg/extension/components/ZeitgeistModule.cpp (+86/-0) firefox-40-libzg/extension/components/zeitgeist.h (+91/-0) firefox-40-libzg/extension/components/zeitgeist.idl (+30/-0) firefox-40-libzg/extension/components/zeitgeistextend.h (+45/-0) firefox-40-libzg/extension/defaults/preferences/zeitgeist.js (+2/-0) firefox-40-libzg/extension/install.rdf (+28/-0) firefox-40-libzg/extension/license.txt (+166/-0) firefox-libzg/Makefile.am (+0/-16) firefox-libzg/README (+0/-43) firefox-libzg/extension/Makefile.am (+0/-42) firefox-libzg/extension/chrome.manifest (+0/-4) firefox-libzg/extension/chrome/content/zeitgeist.xul (+0/-164) firefox-libzg/extension/components/Makefile.am (+0/-60) firefox-libzg/extension/components/ZeitgeistComponent.cpp (+0/-50) firefox-libzg/extension/components/ZeitgeistModule.cpp (+0/-86) firefox-libzg/extension/components/zeitgeist.idl (+0/-30) firefox-libzg/extension/components/zeitgeistextend.h (+0/-45) firefox-libzg/extension/defaults/preferences/zeitgeist.js (+0/-2) firefox-libzg/extension/install.rdf (+0/-28) firefox-libzg/extension/license.txt (+0/-166) |
||||
To merge this branch: | bzr merge lp:~manishsinha/zeitgeist-datasources/add-ff-36-support-bug-775817 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Artem (community) | Approve | ||
Zeitgeist Data-Sources Team | Pending | ||
Review via email: mp+59704@code.launchpad.net |
Commit message
Description of the change
Added support for Firefox 3.6
The firefox 3.6 dataprovider is given the name firefox-36-libzg
and it needs xulrunner-1.92-dev to build
Steps
./autogen.sh
make
then test local install by
$ cd firefox-36-libzg
$ make local-install
Open firefox 3.6 to test
if works then
$ make local-uninstall
Then check system-wide install
$ sudo make install
Then open browser and check if it works. If it works then
$ sudo make uninstall
- 133. By Manish Sinha (मनीष सिन्हा)
-
Bumped the version number of Firefox 3.6 dataprovider from 0.1 to 0.3
Artem (leipreachan) wrote : | # |
Artem (leipreachan) wrote : | # |
I've changed
PKG_CHECK_
to
PKG_CHECK_
now make fails with the following listing
make[4]: Entering directory `/home/
CXX libzeitgeist_
cc1plus: fatal error: xpcom-config.h: No such file or directory
compilation terminated.
thanks
- 134. By Manish Sinha (मनीष सिन्हा)
-
Fixed the macro which detects the presence of xul >= 1.9.2 and xul < 2.0
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote : | # |
I hope this would fix the issues.
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote : | # |
I tested it on my desktop and laptop. Works on both of them
Artem (leipreachan) wrote : | # |
I tested against 3.6.17.
Everything is okay.
Thanks
Preview Diff
1 | === modified file 'configure.ac' |
2 | --- configure.ac 2011-05-02 18:28:16 +0000 |
3 | +++ configure.ac 2011-05-03 18:52:25 +0000 |
4 | @@ -65,7 +65,7 @@ |
5 | AC_MSG_NOTICE([Requested to enable all plugins: ${all_plugins}]) |
6 | |
7 | # The full list of plugins |
8 | -allowed_plugins="bzr chrome eog geany vim emacs tomboy telepathy xchat firefox-libzg" |
9 | +allowed_plugins="bzr chrome eog geany vim emacs tomboy telepathy xchat firefox-40-libzg firefox-36-libzg" |
10 | # currently disabled = "epiphany" |
11 | |
12 | # npapi-plugin has a template Makefile.am, but don't use it directly |
13 | @@ -107,7 +107,7 @@ |
14 | # not supported atm |
15 | continue |
16 | ;; |
17 | - firefox-libzg) |
18 | + firefox-40-libzg) |
19 | if test "${HAVE_LIBZG}" != "yes" ; then |
20 | plugin_error_or_ignore "libzeitgeist not found" |
21 | continue |
22 | @@ -115,7 +115,7 @@ |
23 | PKG_CHECK_MODULES(LIBXUL_2_0, libxul >= 2.0, |
24 | [HAVE_LIBXUL=yes], [HAVE_LIBXUL=no]) |
25 | if test "${HAVE_LIBXUL}" != "yes" ; then |
26 | - plugin_error_or_ignore "libxul 2.0+ not found" |
27 | + plugin_error_or_ignore "libxul 2.0+ for firefox-40-libzg not found" |
28 | continue |
29 | fi |
30 | XPIDL_BIN="`$PKG_CONFIG --variable=sdkdir libxul`/bin/xpidl" |
31 | @@ -124,15 +124,31 @@ |
32 | AC_SUBST(XUL_IDLDIR) |
33 | AC_DEFINE(MOZ_NO_MOZALLOC, ["For Mozilla Firefox 4"]) |
34 | ;; |
35 | + firefox-36-libzg) |
36 | + if test "${HAVE_LIBZG}" != "yes" ; then |
37 | + plugin_error_or_ignore "libzeitgeist not found" |
38 | + continue |
39 | + fi |
40 | + PKG_CHECK_MODULES(LIBXUL_1_9_2, [libxul >= 1.9.2 libxul < 2.0], |
41 | + [HAVE_LIBXUL=yes], [HAVE_LIBXUL=no]) |
42 | + if test "${HAVE_LIBXUL}" != "yes" ; then |
43 | + plugin_error_or_ignore "libxul 1.92 for firefox-36-libzg not found" |
44 | + continue |
45 | + fi |
46 | + XPIDL_BIN="`$PKG_CONFIG --variable=sdkdir libxul`/bin/xpidl" |
47 | + AC_SUBST(XPIDL_BIN) |
48 | + XUL_IDLDIR="`$PKG_CONFIG --variable=idldir libxul`" |
49 | + AC_SUBST(XUL_IDLDIR) |
50 | + ;; |
51 | geany) |
52 | if test "${HAVE_LIBZG}" != "yes" ; then |
53 | plugin_error_or_ignore "libzeitgeist not found" |
54 | continue |
55 | fi |
56 | - if test "x$HAVE_GTK" = "xno"; then |
57 | + if test "x$HAVE_GTK" = "xno"; then |
58 | plugin_error_or_ignore "You need to install gtk development headers" |
59 | continue |
60 | - fi |
61 | + fi |
62 | PKG_CHECK_MODULES(GEANY, geany, |
63 | [HAVE_GEANY=yes], [HAVE_GEANY=no]) |
64 | if test "${HAVE_GEANY}" != "yes" ; then |
65 | @@ -140,8 +156,6 @@ |
66 | continue |
67 | fi |
68 | ;; |
69 | - gedit) |
70 | - ;; |
71 | npapi-plugin) |
72 | if test "${HAVE_LIBZG}" != "yes" ; then |
73 | plugin_error_or_ignore "libzeitgeist not found" |
74 | @@ -155,7 +169,7 @@ |
75 | PKG_CHECK_MODULES(ZEITGEIST_SHARP, zeitgeist-sharp, |
76 | ENABLE_ZEITGEIST_SHARP=yes, ENABLE_ZEITGEIST_SHARP=no) |
77 | PKG_CHECK_MODULES(TOMBOY_ADDINS, tomboy-addins, |
78 | - HAS_TOMBOY_ADDINS=yes, HAS_TOMBOY_ADDINS=no) |
79 | + HAS_TOMBOY_ADDINS=yes, HAS_TOMBOY_ADDINS=no) |
80 | PKG_CHECK_MODULES(GTK_SHARP, gtk-sharp-2.0, |
81 | HAS_GTK_SHARP=yes, GTK_SHARP=no) |
82 | if test "${ENABLE_ZEITGEIST_SHARP}" = "no" ; then |
83 | @@ -243,11 +257,19 @@ |
84 | AC_CONFIG_FILES([eog/Makefile]) |
85 | continue 2 |
86 | ;; |
87 | - firefox-libzg) |
88 | - AC_CONFIG_FILES([ |
89 | - firefox-libzg/Makefile |
90 | - firefox-libzg/extension/Makefile |
91 | - firefox-libzg/extension/components/Makefile |
92 | + firefox-40-libzg) |
93 | + AC_CONFIG_FILES([ |
94 | + firefox-40-libzg/Makefile |
95 | + firefox-40-libzg/extension/Makefile |
96 | + firefox-40-libzg/extension/components/Makefile |
97 | + ]) |
98 | + continue 2 |
99 | + ;; |
100 | + firefox-36-libzg) |
101 | + AC_CONFIG_FILES([ |
102 | + firefox-36-libzg/Makefile |
103 | + firefox-36-libzg/extension/Makefile |
104 | + firefox-36-libzg/extension/components/Makefile |
105 | ]) |
106 | continue 2 |
107 | ;; |
108 | |
109 | === added directory 'firefox-36-libzg' |
110 | === added file 'firefox-36-libzg/Makefile.am' |
111 | --- firefox-36-libzg/Makefile.am 1970-01-01 00:00:00 +0000 |
112 | +++ firefox-36-libzg/Makefile.am 2011-05-03 18:52:25 +0000 |
113 | @@ -0,0 +1,15 @@ |
114 | +SUBDIRS = extension |
115 | + |
116 | +# identifier for the FF profile in which 'make install' installs this extension |
117 | +TARGET_PROFILE = *default* |
118 | + |
119 | +local-install: all |
120 | + $(MAKE) -C extension $@ |
121 | + cd ~/.mozilla/firefox/$(TARGET_PROFILE)/ && mkdir -p extensions |
122 | + cp ZeitgeistDataprovider.xpi ~/.mozilla/firefox/$(TARGET_PROFILE)/extensions |
123 | + |
124 | +local-uninstall: |
125 | + $(MAKE) -C extension $@ |
126 | + -rm -rf ~/.mozilla/firefox/$(TARGET_PROFILE)/extensions/xpcom_firefox\@zeitgeist-project.com |
127 | + -rm -rf ~/.mozilla/firefox/$(TARGET_PROFILE)/extensions/ZeitgeistDataprovider.xpi |
128 | + |
129 | |
130 | === added file 'firefox-36-libzg/README' |
131 | --- firefox-36-libzg/README 1970-01-01 00:00:00 +0000 |
132 | +++ firefox-36-libzg/README 2011-05-03 18:52:25 +0000 |
133 | @@ -0,0 +1,43 @@ |
134 | +Links |
135 | +===== |
136 | + |
137 | +Code is based on: |
138 | + http://www.ibm.com/developerworks/opensource/library/os-xpcomfirefox/index.html |
139 | + |
140 | +Other useful ressources: |
141 | + https://developer.mozilla.org/en/XPCOM_Glue |
142 | + http://www.iosart.com/firefox/xpcom/ |
143 | + http://www.ibm.com/developerworks/webservices/library/co-xpcom5.html (with link to the complete series) |
144 | + http://blog.lazytech.info/2007/05/26/xpcom-javascript-function-call/ (about implementing JS callbacks) |
145 | + |
146 | + |
147 | +Unknown symbols in ubuntu lucid |
148 | +=============================== |
149 | + |
150 | +On ubuntu lucid `ldd -r *.so` shows libxpcom as unknown symbol, to fix this create |
151 | + |
152 | + /etc/ld.so.conf.d/libxpcom.conf |
153 | + |
154 | +with this content: |
155 | + |
156 | + # for xpcom |
157 | + /usr/lib/xulrunner-1.9.2.3 |
158 | + |
159 | + |
160 | +And rebuild the cache |
161 | + $ sudo ldconfig |
162 | + |
163 | +You have to do the same for libzeitgeist! |
164 | + |
165 | + |
166 | +Component UUID |
167 | +============== |
168 | + |
169 | +the uuid for the component is |
170 | + d879c08c-517d-44f0-83e1-3ef75a527ddf |
171 | + |
172 | + |
173 | +TODO |
174 | +==== |
175 | + * add JS callback to .insert() so user can be notified of issues while inserting event |
176 | + * add events for downloads, see https://developer.mozilla.org/en/nsIDownloadProgressListener |
177 | |
178 | === added directory 'firefox-36-libzg/extension' |
179 | === added file 'firefox-36-libzg/extension/Makefile.am' |
180 | --- firefox-36-libzg/extension/Makefile.am 1970-01-01 00:00:00 +0000 |
181 | +++ firefox-36-libzg/extension/Makefile.am 2011-05-03 18:52:25 +0000 |
182 | @@ -0,0 +1,42 @@ |
183 | +SUBDIRS = components |
184 | + |
185 | +extensiondir = $(datadir)/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384} |
186 | +EXTENSIONS_SYMLINK = $(extensiondir)/xpcom_firefox@zeitgeist-project.com |
187 | + |
188 | +xul_extdir = $(datadir)/xul-ext-zeitgeist |
189 | +dist_xul_ext_DATA = \ |
190 | + license.txt \ |
191 | + chrome.manifest \ |
192 | + install.rdf \ |
193 | + $(NULL) |
194 | + |
195 | +contentdir = $(xul_extdir)/chrome/content |
196 | +dist_content_DATA = \ |
197 | + chrome/content/zeitgeist.xul \ |
198 | + chrome/content/zeitgeist.png \ |
199 | + $(NULL) |
200 | + |
201 | +prefsdir = $(xul_extdir)/defaults/preferences |
202 | +dist_prefs_DATA = \ |
203 | + defaults/preferences/zeitgeist.js \ |
204 | + $(NULL) |
205 | + |
206 | +install-exec-hook: |
207 | + $(MKDIR_P) $(DESTDIR)$(extensiondir) |
208 | + test -h "$(DESTDIR)$(EXTENSIONS_SYMLINK)" || $(LN_S) -f "$(DESTDIR)$(xul_extdir)" "$(DESTDIR)$(EXTENSIONS_SYMLINK)" |
209 | + |
210 | +# we want to allow also local install |
211 | +EXTENSION_CONTENT = \ |
212 | + $(dist_xul_ext_DATA) \ |
213 | + defaults \ |
214 | + chrome \ |
215 | + components/libzeitgeist_xpcom.so \ |
216 | + components/zeitgeist.xpt \ |
217 | + $(NULL) |
218 | + |
219 | +local-install: all |
220 | + $(MAKE) -C components $@ |
221 | + zip -r ../ZeitgeistDataprovider.xpi $(EXTENSION_CONTENT) |
222 | + |
223 | +local-uninstall: |
224 | + $(MAKE) -C components $@ |
225 | |
226 | === added directory 'firefox-36-libzg/extension/chrome' |
227 | === added file 'firefox-36-libzg/extension/chrome.manifest' |
228 | --- firefox-36-libzg/extension/chrome.manifest 1970-01-01 00:00:00 +0000 |
229 | +++ firefox-36-libzg/extension/chrome.manifest 2011-05-03 18:52:25 +0000 |
230 | @@ -0,0 +1,2 @@ |
231 | +content zeitgeist chrome/content/ |
232 | +overlay chrome://browser/content/browser.xul chrome://zeitgeist/content/zeitgeist.xul |
233 | |
234 | === added directory 'firefox-36-libzg/extension/chrome/content' |
235 | === added file 'firefox-36-libzg/extension/chrome/content/zeitgeist.png' |
236 | Binary files firefox-36-libzg/extension/chrome/content/zeitgeist.png 1970-01-01 00:00:00 +0000 and firefox-36-libzg/extension/chrome/content/zeitgeist.png 2011-05-03 18:52:25 +0000 differ |
237 | === added file 'firefox-36-libzg/extension/chrome/content/zeitgeist.xul' |
238 | --- firefox-36-libzg/extension/chrome/content/zeitgeist.xul 1970-01-01 00:00:00 +0000 |
239 | +++ firefox-36-libzg/extension/chrome/content/zeitgeist.xul 2011-05-03 18:52:25 +0000 |
240 | @@ -0,0 +1,164 @@ |
241 | +<?xml version="1.0"?> |
242 | +<overlay id="zeitgeist" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> |
243 | + |
244 | + <script type="application/x-javascript"><![CDATA[ |
245 | + var zeitgeistgluexpcominterface = null; |
246 | + |
247 | + var enable_googlemail = false; |
248 | + var googlemail_view_regex = new RegExp("mail\\.google\\.com"); |
249 | + var pbs = Components.classes["@mozilla.org/privatebrowsing;1"] |
250 | + .getService(Components.interfaces.nsIPrivateBrowsingService); |
251 | + |
252 | + var debug = function (aMessage) { |
253 | + var consoleService = Components.classes["@mozilla.org/consoleservice;1"] |
254 | + .getService(Components.interfaces.nsIConsoleService); |
255 | + consoleService.logStringMessage("Zeitgeist Extension: " + aMessage); |
256 | + window.dump("Zeitgeist Extension:" + aMessage + "\n"); |
257 | + } |
258 | + |
259 | + var make_pattern = function(pattern) { |
260 | + for (item in pattern) { |
261 | + // alert(pattern[item]); |
262 | + pattern[item] = new RegExp(pattern[item]); |
263 | + }; |
264 | + return pattern; |
265 | + }; |
266 | + |
267 | + var ZeitgeistPrefObserver = { |
268 | + register: function() { |
269 | + // First we'll need the preference services to look for preferences. |
270 | + var prefService = Components.classes["@mozilla.org/preferences-service;1"] |
271 | + .getService(Components.interfaces.nsIPrefService); |
272 | + |
273 | + // For this._branch we ask that the preferences for extensions.myextension. and children |
274 | + this._branch = prefService.getBranch("extensions.zeitgeist."); |
275 | + |
276 | + // Now we queue the interface called nsIPrefBranch2. This interface is described as: |
277 | + // "nsIPrefBranch2 allows clients to observe changes to pref values." |
278 | + this._branch.QueryInterface(Components.interfaces.nsIPrefBranch2); |
279 | + |
280 | + // Finally add the observer. |
281 | + this._branch.addObserver("", this, false); |
282 | + }, |
283 | + |
284 | + unregister: function() { |
285 | + if(!this._branch) return; |
286 | + this._branch.removeObserver("", this); |
287 | + }, |
288 | + |
289 | + observe: function(aSubject, aTopic, aData) { |
290 | + if(aTopic != "nsPref:changed") return; |
291 | + // aSubject is the nsIPrefBranch we're observing (after appropriate QI) |
292 | + // aData is the name of the pref that's been changed (relative to aSubject) |
293 | + switch (aData) { |
294 | + case "ignored_uris": |
295 | + // extensions.zeitgeist.ignored_uris was changed |
296 | + pattern = this.get_string(aData); |
297 | + // alert(pattern); |
298 | + ignored_uris = make_pattern(pattern); |
299 | + break; |
300 | + case "enable_googlemail": |
301 | + enable_googlemail = this.get_bool(aData); |
302 | + //alert("changed gmail to"+enable_googlemail); |
303 | + break |
304 | + } |
305 | + }, |
306 | + get_string: function(key) { |
307 | + try { |
308 | + return JSON.parse(this._branch.getCharPref(key)); |
309 | + } catch(err) { |
310 | + // this means there is no such config value |
311 | + // ignoring this error |
312 | + //alert(key + " : " + err); |
313 | + }; |
314 | + }, |
315 | + get_bool: function(key) { |
316 | + try { |
317 | + return this._branch.getBoolPref(key); |
318 | + } catch(err) { |
319 | + // this means there is no such config value |
320 | + // ignoring this error |
321 | + //alert(key + " : " + err); |
322 | + }; |
323 | + } |
324 | + } |
325 | + ZeitgeistPrefObserver.register(); |
326 | + ignored_uris = make_pattern(ZeitgeistPrefObserver.get_string("ignored_uris")); |
327 | + debug("We are ignoring this uris: " + ignored_uris); |
328 | + var enable_googlemail = ZeitgeistPrefObserver.get_bool("enable_googlemail"); |
329 | + debug("the googlemail handler extension is activated? ["+enable_googlemail+"]"); |
330 | + |
331 | + ignore_uri = function(uri) { |
332 | + for (pattern in ignored_uris) { |
333 | + if (ignored_uris[pattern].test(uri)) { |
334 | + // alert("ignored " + uri); |
335 | + return true; |
336 | + }; |
337 | + }; |
338 | + return false; |
339 | + }; |
340 | + |
341 | + try { |
342 | + if(zeitgeistgluexpcominterface == null) { |
343 | + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); |
344 | + zeitgeistgluexpcominterface = Components. |
345 | + classes["@zeitgeist-project.com/DATAPROVIDER/firefox-xpcom;1"]. |
346 | + createInstance(Components.interfaces.zeitgeist); |
347 | + } |
348 | + } catch(err) { |
349 | + alert(err); |
350 | + } |
351 | + |
352 | + var ZeitgeistProgressListener = { |
353 | + onStateChange: function(aBrowser, aProgress, aRequest, aStateFlags) { |
354 | + var inPrivateBrowsingMode = pbs.privateBrowsingEnabled; |
355 | + if (inPrivateBrowsingMode) return; |
356 | + if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP) { |
357 | + var uri = aBrowser.currentURI.spec; |
358 | + var mimetype = aBrowser.contentDocument.contentType; |
359 | + if (aRequest.name == uri && !ignore_uri(uri)) { |
360 | + zeitgeistgluexpcominterface.insert( |
361 | + uri, |
362 | + mimetype, |
363 | + aBrowser.contentTitle |
364 | + ); |
365 | + //alert("THATS WHAT WE HAVE "+enable_googlemail+" | "+uri+" | "+(enable_googlemail & googlemail_view_regex.test(uri))); |
366 | + if (enable_googlemail & googlemail_view_regex.test(uri)) { |
367 | + debug("let's begin the google fun'"); |
368 | + var dmt = aBrowser.contentDocument; |
369 | + var head = dmt.getElementsByTagName("title")[0]; |
370 | + head.addEventListener("DOMSubtreeModified", function(event){ |
371 | + if (dmt.title) { |
372 | + zeitgeistgluexpcominterface.insert( |
373 | + dmt.location.href, |
374 | + dmt.contentType, |
375 | + dmt.title |
376 | + ); |
377 | + }; |
378 | + }, false); |
379 | + } |
380 | + } |
381 | + } |
382 | + }, |
383 | + // we don't implement this methods |
384 | + onStatusChange: function(){}, |
385 | + onLocationChange: function(){}, |
386 | + onSecurityChange: function(){}, |
387 | + onProgressChange: function(){}, |
388 | + }; |
389 | + |
390 | + |
391 | + var zeitgeist = { |
392 | + init: function() { |
393 | + gBrowser.addTabsProgressListener(ZeitgeistProgressListener); |
394 | + }, |
395 | + uninit: function() { |
396 | + gBrowser.removeTabsProgressListener(ZeitgeistProgressListener); |
397 | + }, |
398 | + }; |
399 | + |
400 | + window.addEventListener("load", function() {zeitgeist.init()}, false); |
401 | + window.addEventListener("unload", function() {zeitgeist.uninit()}, false); |
402 | + |
403 | + ]]></script> |
404 | +</overlay> |
405 | |
406 | === added directory 'firefox-36-libzg/extension/components' |
407 | === added file 'firefox-36-libzg/extension/components/Makefile.am' |
408 | --- firefox-36-libzg/extension/components/Makefile.am 1970-01-01 00:00:00 +0000 |
409 | +++ firefox-36-libzg/extension/components/Makefile.am 2011-05-03 18:52:25 +0000 |
410 | @@ -0,0 +1,60 @@ |
411 | +zeitgeistmoduledir = $(libdir)/xul-ext-zeitgeist |
412 | +zeitgeistmodule_LTLIBRARIES = libzeitgeist_xpcom.la |
413 | +zeitgeistmodule_DATA = zeitgeist.xpt |
414 | + |
415 | +xul_extdir = $(datadir)/xul-ext-zeitgeist |
416 | + |
417 | +libzeitgeist_xpcom_la_SOURCES = \ |
418 | + ZeitgeistComponent.cpp \ |
419 | + ZeitgeistModule.cpp \ |
420 | + $(NULL) |
421 | + |
422 | +libzeitgeist_xpcom_la_CXXFLAGS = \ |
423 | + -include "xpcom-config.h" \ |
424 | + $(ZEITGEIST_CFLAGS) \ |
425 | + $(LIBXUL_1_9_2_CFLAGS) \ |
426 | + $(NULL) |
427 | + |
428 | +libzeitgeist_xpcom_la_LIBADD = \ |
429 | + $(ZEITGEIST_LIBS) \ |
430 | + $(LIBXUL_1_9_2_LIBS) \ |
431 | + $(NULL) |
432 | + |
433 | +libzeitgeist_xpcom_la_LDFLAGS = \ |
434 | + -module -avoid-version \ |
435 | + $(NULL) |
436 | + |
437 | +BUILT_SOURCES = \ |
438 | + zeitgeist-library.h \ |
439 | + zeitgeist.h \ |
440 | + zeitgeist.xpt \ |
441 | + $(NULL) |
442 | + |
443 | +EXTRA_DIST = \ |
444 | + zeitgeist.idl \ |
445 | + zeitgeistextend.h \ |
446 | + $(NULL) |
447 | + |
448 | +DISTCLEANFILES = \ |
449 | + $(BUILT_SOURCES) \ |
450 | + $(NULL) |
451 | + |
452 | + |
453 | +zeitgeist.h: zeitgeist.idl |
454 | + $(AM_V_GEN)$(XPIDL_BIN) -m header -I $(XUL_IDLDIR) -o zeitgeist $< |
455 | + |
456 | +zeitgeist.xpt: zeitgeist.idl |
457 | + $(AM_V_GEN)$(XPIDL_BIN) -m typelib -I $(XUL_IDLDIR) -o zeitgeist $< |
458 | + |
459 | +zeitgeist-library.h: |
460 | + $(AM_V_GEN)$(LN_S) "`$(PKG_CONFIG) --variable includedir zeitgeist-1.0`/zeitgeist-1.0/zeitgeist.h" $@ |
461 | + |
462 | +install-exec-hook: |
463 | + test -d $(DESTDIR)$(xul_extdir) || $(MKDIR_P) $(DESTDIR)$(xul_extdir) |
464 | + test -h $(DESTDIR)$(xul_extdir)/components || $(LN_S) -f $(DESTDIR)$(zeitgeistmoduledir) $(DESTDIR)$(xul_extdir)/components |
465 | + |
466 | +# small helper with local install |
467 | +local-install: all |
468 | + cp .libs/libzeitgeist_xpcom.so ./ |
469 | + |
470 | +local-uninstall: ; |
471 | |
472 | === added file 'firefox-36-libzg/extension/components/ZeitgeistComponent.cpp' |
473 | --- firefox-36-libzg/extension/components/ZeitgeistComponent.cpp 1970-01-01 00:00:00 +0000 |
474 | +++ firefox-36-libzg/extension/components/ZeitgeistComponent.cpp 2011-05-03 18:52:25 +0000 |
475 | @@ -0,0 +1,39 @@ |
476 | +/* |
477 | + * ZeitgeistComponent.cpp |
478 | + * This file is part of zeitgeist dataprovider for firefox |
479 | + * |
480 | + * Copyright (C) 2010 - Markus Korn <thekorn@gmx.de> |
481 | + * |
482 | + * zeitgeist dataprovider for firefox is free software; you can redistribute it and/or |
483 | + * modify it under the terms of the GNU Lesser General Public |
484 | + * License as published by the Free Software Foundation; either |
485 | + * version 3 of the License, or (at your option) any later version. |
486 | + * |
487 | + * zeitgeist dataprovider for firefox is distributed in the hope that it will be useful, |
488 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
489 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
490 | + * Lesser General Public License for more details. |
491 | + * |
492 | + * You should have received a copy of the GNU Lesser General Public |
493 | + * License along with this library; if not, write to the Free Software |
494 | + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
495 | + */ |
496 | + |
497 | + |
498 | +#include "nsIGenericFactory.h" |
499 | +#include "zeitgeist.h" |
500 | +#include "zeitgeistextend.h" |
501 | + |
502 | +NS_GENERIC_FACTORY_CONSTRUCTOR(zeitgeistextend) |
503 | + |
504 | +static nsModuleComponentInfo components[] = |
505 | +{ |
506 | + { |
507 | + ZEITGEIST_COMPONENT_CLASSNAME, |
508 | + ZEITGEIST_COMPONENT_CID, |
509 | + ZEITGEIST_COMPONENT_CONTRACTID, |
510 | + zeitgeistextendConstructor, |
511 | + } |
512 | +}; |
513 | + |
514 | +NS_IMPL_NSGETMODULE("ZeitgeistModule", components) |
515 | |
516 | === added file 'firefox-36-libzg/extension/components/ZeitgeistModule.cpp' |
517 | --- firefox-36-libzg/extension/components/ZeitgeistModule.cpp 1970-01-01 00:00:00 +0000 |
518 | +++ firefox-36-libzg/extension/components/ZeitgeistModule.cpp 2011-05-03 18:52:25 +0000 |
519 | @@ -0,0 +1,86 @@ |
520 | +/* |
521 | + * ZeitgeistModule.cpp |
522 | + * This file is part of zeitgeist dataprovider for firefox |
523 | + * |
524 | + * Copyright (C) 2010 - Markus Korn <thekorn@gmx.de> |
525 | + * Copyright (C) 2010 - Michal Hruby <michal.mhr@gmail.com> |
526 | + * |
527 | + * zeitgeist dataprovider for firefox is free software; you can redistribute it and/or |
528 | + * modify it under the terms of the GNU Lesser General Public |
529 | + * License as published by the Free Software Foundation; either |
530 | + * version 3 of the License, or (at your option) any later version. |
531 | + * |
532 | + * zeitgeist dataprovider for firefox is distributed in the hope that it will be useful, |
533 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
534 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
535 | + * Lesser General Public License for more details. |
536 | + * |
537 | + * You should have received a copy of the GNU Lesser General Public |
538 | + * License along with this library; if not, write to the Free Software |
539 | + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
540 | + */ |
541 | + |
542 | + |
543 | +#include "zeitgeist.h" |
544 | +#include "zeitgeistextend.h" |
545 | + |
546 | +#include <nsStringAPI.h> |
547 | +#include <glib.h> |
548 | +#include <glib-object.h> |
549 | +#include <zeitgeist.h> |
550 | + |
551 | + |
552 | +using namespace std; |
553 | + |
554 | +NS_IMPL_ISUPPORTS1(zeitgeistextend, zeitgeist) |
555 | + |
556 | +zeitgeistextend::zeitgeistextend() |
557 | +{ |
558 | + g_debug("constructor of zeitgeistextend"); |
559 | + g_type_init (); |
560 | + |
561 | + log = (ZeitgeistLog *)g_object_new (ZEITGEIST_TYPE_LOG, NULL); |
562 | +} |
563 | + |
564 | +zeitgeistextend::~zeitgeistextend() |
565 | +{ |
566 | + g_debug("destructor of zeitgeistextend"); |
567 | +} |
568 | + |
569 | +NS_IMETHODIMP zeitgeistextend::Insert(const char *url, |
570 | + const char *mimetype, |
571 | + const nsACString &title_str) |
572 | +{ |
573 | + ZeitgeistEvent *event; |
574 | + gchar *title = NULL; |
575 | + |
576 | + g_debug("zeitgeist start - creating event"); |
577 | + |
578 | + if (!title_str.IsEmpty ()) |
579 | + { |
580 | + gsize title_len = title_str.EndReading () - title_str.BeginReading (); |
581 | + title = g_strndup (title_str.BeginReading (), title_len); |
582 | + } |
583 | + |
584 | + event = zeitgeist_event_new_full ( |
585 | + ZEITGEIST_ZG_ACCESS_EVENT, |
586 | + ZEITGEIST_ZG_USER_ACTIVITY, |
587 | + "application://firefox.desktop", |
588 | + zeitgeist_subject_new_full ( |
589 | + url, |
590 | + ZEITGEIST_NFO_WEBSITE, |
591 | + ZEITGEIST_NFO_REMOTE_DATA_OBJECT, |
592 | + mimetype, |
593 | + url, |
594 | + title, |
595 | + "net"), |
596 | + NULL); |
597 | + |
598 | + if (title) g_free (title); |
599 | + g_debug("inserting event"); |
600 | + zeitgeist_log_insert_events_no_reply(log, event, NULL); |
601 | + g_debug("zeitgeist end"); |
602 | + |
603 | + return NS_OK; |
604 | +} |
605 | + |
606 | |
607 | === added file 'firefox-36-libzg/extension/components/zeitgeist.idl' |
608 | --- firefox-36-libzg/extension/components/zeitgeist.idl 1970-01-01 00:00:00 +0000 |
609 | +++ firefox-36-libzg/extension/components/zeitgeist.idl 2011-05-03 18:52:25 +0000 |
610 | @@ -0,0 +1,30 @@ |
611 | +/* |
612 | + * zeitgeist.idl |
613 | + * This file is part of zeitgeist dataprovider for firefox |
614 | + * |
615 | + * Copyright (C) 2010 - Markus Korn <thekorn@gmx.de> |
616 | + * Copyright (C) 2010 - Michal Hruby <michal.mhr@gmail.com> |
617 | + * |
618 | + * zeitgeist dataprovider for firefox is free software; you can redistribute it and/or |
619 | + * modify it under the terms of the GNU Lesser General Public |
620 | + * License as published by the Free Software Foundation; either |
621 | + * version 3 of the License, or (at your option) any later version. |
622 | + * |
623 | + * zeitgeist dataprovider for firefox is distributed in the hope that it will be useful, |
624 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
625 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
626 | + * Lesser General Public License for more details. |
627 | + * |
628 | + * You should have received a copy of the GNU Lesser General Public |
629 | + * License along with this library; if not, write to the Free Software |
630 | + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
631 | + */ |
632 | + |
633 | + |
634 | +#include "nsISupports.idl" |
635 | +[scriptable, uuid(d879c08c-517d-44f0-83e1-3ef75a527ddf)] |
636 | +interface zeitgeist : nsISupports |
637 | +{ |
638 | + void insert(in string url, in string mimetype, in AUTF8String title); |
639 | +}; |
640 | + |
641 | |
642 | === added file 'firefox-36-libzg/extension/components/zeitgeistextend.h' |
643 | --- firefox-36-libzg/extension/components/zeitgeistextend.h 1970-01-01 00:00:00 +0000 |
644 | +++ firefox-36-libzg/extension/components/zeitgeistextend.h 2011-05-03 18:52:25 +0000 |
645 | @@ -0,0 +1,45 @@ |
646 | +/* |
647 | + * zeitgeistextend.h |
648 | + * This file is part of zeitgeist dataprovider for firefox |
649 | + * |
650 | + * Copyright (C) 2010 - Markus Korn <thekorn@gmx.de> |
651 | + * |
652 | + * zeitgeist dataprovider for firefox is free software; you can redistribute it and/or |
653 | + * modify it under the terms of the GNU Lesser General Public |
654 | + * License as published by the Free Software Foundation; either |
655 | + * version 3 of the License, or (at your option) any later version. |
656 | + * |
657 | + * zeitgeist dataprovider for firefox is distributed in the hope that it will be useful, |
658 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
659 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
660 | + * Lesser General Public License for more details. |
661 | + * |
662 | + * You should have received a copy of the GNU Lesser General Public |
663 | + * License along with this library; if not, write to the Free Software |
664 | + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
665 | + */ |
666 | + |
667 | + |
668 | +#ifndef _ZEITGEISTEXTEND_H_ |
669 | +#define _ZEITGEISTEXTEND_H_ |
670 | + |
671 | +#include "zeitgeist.h" |
672 | +#include "zeitgeist-library.h" |
673 | + |
674 | +#define ZEITGEIST_COMPONENT_CONTRACTID "@zeitgeist-project.com/DATAPROVIDER/firefox-xpcom;1" |
675 | +#define ZEITGEIST_COMPONENT_CLASSNAME "zeitgeist dataprovider for firefox" |
676 | +#define ZEITGEIST_COMPONENT_CID { 0xd879c08c, 0x517d, 0x44f0, { 0x83, 0xe1, 0x3e, 0xf7, 0x5a, 0x52, 0x7d, 0xdf } } |
677 | + |
678 | +//d879c08c-517d-44f0-83e1-3ef75a527ddf |
679 | +class zeitgeistextend : public zeitgeist |
680 | +{ |
681 | + public: |
682 | + NS_DECL_ISUPPORTS |
683 | + NS_DECL_ZEITGEIST |
684 | + |
685 | + zeitgeistextend(); |
686 | + virtual ~zeitgeistextend(); |
687 | + ZeitgeistLog *log; |
688 | + |
689 | +}; |
690 | +#endif |
691 | |
692 | === added directory 'firefox-36-libzg/extension/defaults' |
693 | === added directory 'firefox-36-libzg/extension/defaults/preferences' |
694 | === added file 'firefox-36-libzg/extension/defaults/preferences/zeitgeist.js' |
695 | --- firefox-36-libzg/extension/defaults/preferences/zeitgeist.js 1970-01-01 00:00:00 +0000 |
696 | +++ firefox-36-libzg/extension/defaults/preferences/zeitgeist.js 2011-05-03 18:52:25 +0000 |
697 | @@ -0,0 +1,2 @@ |
698 | +pref("extensions.zeitgeist.ignored_uris", "[\"^about:*\"]"); |
699 | +pref("extensions.zeitgeist.enable_googlemail", false); |
700 | |
701 | === added file 'firefox-36-libzg/extension/install.rdf' |
702 | --- firefox-36-libzg/extension/install.rdf 1970-01-01 00:00:00 +0000 |
703 | +++ firefox-36-libzg/extension/install.rdf 2011-05-03 18:52:25 +0000 |
704 | @@ -0,0 +1,28 @@ |
705 | +<?xml version="1.0"?> |
706 | + |
707 | +<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
708 | + xmlns:em="http://www.mozilla.org/2004/em-rdf#"> |
709 | + |
710 | + <Description about="urn:mozilla:install-manifest"> |
711 | + <em:id>xpcom_firefox@zeitgeist-project.com</em:id> |
712 | + <em:version>0.3</em:version> |
713 | + <em:type>2</em:type> |
714 | + |
715 | + <!-- Target Application this extension can install into, |
716 | + with minimum and maximum supported versions. --> |
717 | + <em:targetApplication> |
718 | + <Description> |
719 | + <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> |
720 | + <em:minVersion>3.5</em:minVersion> |
721 | + <em:maxVersion>3.6.*</em:maxVersion> |
722 | + </Description> |
723 | + </em:targetApplication> |
724 | + |
725 | + <!-- Front End MetaData --> |
726 | + <em:name>zeitgeist</em:name> |
727 | + <em:description>dataprovider for the zeitgeist framework, using xpcom and libzeitgeist</em:description> |
728 | + <em:creator>Markus Korn</em:creator> |
729 | + <em:homepageURL>http://launchpad.net/zeitgeist</em:homepageURL> |
730 | + <em:iconURL>chrome://zeitgeist/content/zeitgeist.png</em:iconURL> |
731 | + </Description> |
732 | +</RDF> |
733 | |
734 | === added file 'firefox-36-libzg/extension/license.txt' |
735 | --- firefox-36-libzg/extension/license.txt 1970-01-01 00:00:00 +0000 |
736 | +++ firefox-36-libzg/extension/license.txt 2011-05-03 18:52:25 +0000 |
737 | @@ -0,0 +1,166 @@ |
738 | + GNU LESSER GENERAL PUBLIC LICENSE |
739 | + Version 3, 29 June 2007 |
740 | + |
741 | + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> |
742 | + Everyone is permitted to copy and distribute verbatim copies |
743 | + of this license document, but changing it is not allowed. |
744 | + |
745 | + |
746 | + This version of the GNU Lesser General Public License incorporates |
747 | +the terms and conditions of version 3 of the GNU General Public |
748 | +License, supplemented by the additional permissions listed below. |
749 | + |
750 | + 0. Additional Definitions. |
751 | + |
752 | + As used herein, "this License" refers to version 3 of the GNU Lesser |
753 | +General Public License, and the "GNU GPL" refers to version 3 of the GNU |
754 | +General Public License. |
755 | + |
756 | + "The Library" refers to a covered work governed by this License, |
757 | +other than an Application or a Combined Work as defined below. |
758 | + |
759 | + An "Application" is any work that makes use of an interface provided |
760 | +by the Library, but which is not otherwise based on the Library. |
761 | +Defining a subclass of a class defined by the Library is deemed a mode |
762 | +of using an interface provided by the Library. |
763 | + |
764 | + A "Combined Work" is a work produced by combining or linking an |
765 | +Application with the Library. The particular version of the Library |
766 | +with which the Combined Work was made is also called the "Linked |
767 | +Version". |
768 | + |
769 | + The "Minimal Corresponding Source" for a Combined Work means the |
770 | +Corresponding Source for the Combined Work, excluding any source code |
771 | +for portions of the Combined Work that, considered in isolation, are |
772 | +based on the Application, and not on the Linked Version. |
773 | + |
774 | + The "Corresponding Application Code" for a Combined Work means the |
775 | +object code and/or source code for the Application, including any data |
776 | +and utility programs needed for reproducing the Combined Work from the |
777 | +Application, but excluding the System Libraries of the Combined Work. |
778 | + |
779 | + 1. Exception to Section 3 of the GNU GPL. |
780 | + |
781 | + You may convey a covered work under sections 3 and 4 of this License |
782 | +without being bound by section 3 of the GNU GPL. |
783 | + |
784 | + 2. Conveying Modified Versions. |
785 | + |
786 | + If you modify a copy of the Library, and, in your modifications, a |
787 | +facility refers to a function or data to be supplied by an Application |
788 | +that uses the facility (other than as an argument passed when the |
789 | +facility is invoked), then you may convey a copy of the modified |
790 | +version: |
791 | + |
792 | + a) under this License, provided that you make a good faith effort to |
793 | + ensure that, in the event an Application does not supply the |
794 | + function or data, the facility still operates, and performs |
795 | + whatever part of its purpose remains meaningful, or |
796 | + |
797 | + b) under the GNU GPL, with none of the additional permissions of |
798 | + this License applicable to that copy. |
799 | + |
800 | + 3. Object Code Incorporating Material from Library Header Files. |
801 | + |
802 | + The object code form of an Application may incorporate material from |
803 | +a header file that is part of the Library. You may convey such object |
804 | +code under terms of your choice, provided that, if the incorporated |
805 | +material is not limited to numerical parameters, data structure |
806 | +layouts and accessors, or small macros, inline functions and templates |
807 | +(ten or fewer lines in length), you do both of the following: |
808 | + |
809 | + a) Give prominent notice with each copy of the object code that the |
810 | + Library is used in it and that the Library and its use are |
811 | + covered by this License. |
812 | + |
813 | + b) Accompany the object code with a copy of the GNU GPL and this license |
814 | + document. |
815 | + |
816 | + 4. Combined Works. |
817 | + |
818 | + You may convey a Combined Work under terms of your choice that, |
819 | +taken together, effectively do not restrict modification of the |
820 | +portions of the Library contained in the Combined Work and reverse |
821 | +engineering for debugging such modifications, if you also do each of |
822 | +the following: |
823 | + |
824 | + a) Give prominent notice with each copy of the Combined Work that |
825 | + the Library is used in it and that the Library and its use are |
826 | + covered by this License. |
827 | + |
828 | + b) Accompany the Combined Work with a copy of the GNU GPL and this license |
829 | + document. |
830 | + |
831 | + c) For a Combined Work that displays copyright notices during |
832 | + execution, include the copyright notice for the Library among |
833 | + these notices, as well as a reference directing the user to the |
834 | + copies of the GNU GPL and this license document. |
835 | + |
836 | + d) Do one of the following: |
837 | + |
838 | + 0) Convey the Minimal Corresponding Source under the terms of this |
839 | + License, and the Corresponding Application Code in a form |
840 | + suitable for, and under terms that permit, the user to |
841 | + recombine or relink the Application with a modified version of |
842 | + the Linked Version to produce a modified Combined Work, in the |
843 | + manner specified by section 6 of the GNU GPL for conveying |
844 | + Corresponding Source. |
845 | + |
846 | + 1) Use a suitable shared library mechanism for linking with the |
847 | + Library. A suitable mechanism is one that (a) uses at run time |
848 | + a copy of the Library already present on the user's computer |
849 | + system, and (b) will operate properly with a modified version |
850 | + of the Library that is interface-compatible with the Linked |
851 | + Version. |
852 | + |
853 | + e) Provide Installation Information, but only if you would otherwise |
854 | + be required to provide such information under section 6 of the |
855 | + GNU GPL, and only to the extent that such information is |
856 | + necessary to install and execute a modified version of the |
857 | + Combined Work produced by recombining or relinking the |
858 | + Application with a modified version of the Linked Version. (If |
859 | + you use option 4d0, the Installation Information must accompany |
860 | + the Minimal Corresponding Source and Corresponding Application |
861 | + Code. If you use option 4d1, you must provide the Installation |
862 | + Information in the manner specified by section 6 of the GNU GPL |
863 | + for conveying Corresponding Source.) |
864 | + |
865 | + 5. Combined Libraries. |
866 | + |
867 | + You may place library facilities that are a work based on the |
868 | +Library side by side in a single library together with other library |
869 | +facilities that are not Applications and are not covered by this |
870 | +License, and convey such a combined library under terms of your |
871 | +choice, if you do both of the following: |
872 | + |
873 | + a) Accompany the combined library with a copy of the same work based |
874 | + on the Library, uncombined with any other library facilities, |
875 | + conveyed under the terms of this License. |
876 | + |
877 | + b) Give prominent notice with the combined library that part of it |
878 | + is a work based on the Library, and explaining where to find the |
879 | + accompanying uncombined form of the same work. |
880 | + |
881 | + 6. Revised Versions of the GNU Lesser General Public License. |
882 | + |
883 | + The Free Software Foundation may publish revised and/or new versions |
884 | +of the GNU Lesser General Public License from time to time. Such new |
885 | +versions will be similar in spirit to the present version, but may |
886 | +differ in detail to address new problems or concerns. |
887 | + |
888 | + Each version is given a distinguishing version number. If the |
889 | +Library as you received it specifies that a certain numbered version |
890 | +of the GNU Lesser General Public License "or any later version" |
891 | +applies to it, you have the option of following the terms and |
892 | +conditions either of that published version or of any later version |
893 | +published by the Free Software Foundation. If the Library as you |
894 | +received it does not specify a version number of the GNU Lesser |
895 | +General Public License, you may choose any version of the GNU Lesser |
896 | +General Public License ever published by the Free Software Foundation. |
897 | + |
898 | + If the Library as you received it specifies that a proxy can decide |
899 | +whether future versions of the GNU Lesser General Public License shall |
900 | +apply, that proxy's public statement of acceptance of any version is |
901 | +permanent authorization for you to choose that version for the |
902 | +Library. |
903 | + |
904 | |
905 | === added directory 'firefox-40-libzg' |
906 | === added file 'firefox-40-libzg/Makefile.am' |
907 | --- firefox-40-libzg/Makefile.am 1970-01-01 00:00:00 +0000 |
908 | +++ firefox-40-libzg/Makefile.am 2011-05-03 18:52:25 +0000 |
909 | @@ -0,0 +1,16 @@ |
910 | +SUBDIRS = extension |
911 | + |
912 | +# identifier for the FF profile in which 'make install' installs this extension |
913 | +TARGET_PROFILE = *default* |
914 | + |
915 | +local-install: all |
916 | + $(MAKE) -C extension $@ |
917 | + unzip -o ZeitgeistDataprovider.xpi -d ~/xpcom_firefox\@zeitgeist-project.com |
918 | + cd ~/.mozilla/firefox/$(TARGET_PROFILE)/ && mkdir -p extensions |
919 | + cp -r ~/xpcom_firefox\@zeitgeist-project.com/ ~/.mozilla/firefox/$(TARGET_PROFILE)/extensions/ |
920 | + |
921 | +local-uninstall: |
922 | + $(MAKE) -C extension $@ |
923 | + -rm -rf ~/.mozilla/firefox/$(TARGET_PROFILE)/extensions/xpcom_firefox\@zeitgeist-project.com |
924 | + -rm -rf ~/.mozilla/firefox/$(TARGET_PROFILE)/extensions/ZeitgeistDataprovider.xpi |
925 | + |
926 | |
927 | === added file 'firefox-40-libzg/README' |
928 | --- firefox-40-libzg/README 1970-01-01 00:00:00 +0000 |
929 | +++ firefox-40-libzg/README 2011-05-03 18:52:25 +0000 |
930 | @@ -0,0 +1,43 @@ |
931 | +Links |
932 | +===== |
933 | + |
934 | +Code is based on: |
935 | + http://www.ibm.com/developerworks/opensource/library/os-xpcomfirefox/index.html |
936 | + |
937 | +Other useful ressources: |
938 | + https://developer.mozilla.org/en/XPCOM_Glue |
939 | + http://www.iosart.com/firefox/xpcom/ |
940 | + http://www.ibm.com/developerworks/webservices/library/co-xpcom5.html (with link to the complete series) |
941 | + http://blog.lazytech.info/2007/05/26/xpcom-javascript-function-call/ (about implementing JS callbacks) |
942 | + |
943 | + |
944 | +Unknown symbols in ubuntu lucid |
945 | +=============================== |
946 | + |
947 | +On ubuntu lucid `ldd -r *.so` shows libxpcom as unknown symbol, to fix this create |
948 | + |
949 | + /etc/ld.so.conf.d/libxpcom.conf |
950 | + |
951 | +with this content: |
952 | + |
953 | + # for xpcom |
954 | + /usr/lib/xulrunner-1.9.2.3 |
955 | + |
956 | + |
957 | +And rebuild the cache |
958 | + $ sudo ldconfig |
959 | + |
960 | +You have to do the same for libzeitgeist! |
961 | + |
962 | + |
963 | +Component UUID |
964 | +============== |
965 | + |
966 | +the uuid for the component is |
967 | + d879c08c-517d-44f0-83e1-3ef75a527ddf |
968 | + |
969 | + |
970 | +TODO |
971 | +==== |
972 | + * add JS callback to .insert() so user can be notified of issues while inserting event |
973 | + * add events for downloads, see https://developer.mozilla.org/en/nsIDownloadProgressListener |
974 | |
975 | === added directory 'firefox-40-libzg/extension' |
976 | === added file 'firefox-40-libzg/extension/Makefile.am' |
977 | --- firefox-40-libzg/extension/Makefile.am 1970-01-01 00:00:00 +0000 |
978 | +++ firefox-40-libzg/extension/Makefile.am 2011-05-03 18:52:25 +0000 |
979 | @@ -0,0 +1,42 @@ |
980 | +SUBDIRS = components |
981 | + |
982 | +extensiondir = $(datadir)/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384} |
983 | +EXTENSIONS_SYMLINK = $(extensiondir)/xpcom_firefox@zeitgeist-project.com |
984 | + |
985 | +xul_extdir = $(datadir)/xul-ext-zeitgeist |
986 | +dist_xul_ext_DATA = \ |
987 | + license.txt \ |
988 | + chrome.manifest \ |
989 | + install.rdf \ |
990 | + $(NULL) |
991 | + |
992 | +contentdir = $(xul_extdir)/chrome/content |
993 | +dist_content_DATA = \ |
994 | + chrome/content/zeitgeist.xul \ |
995 | + chrome/content/zeitgeist.png \ |
996 | + $(NULL) |
997 | + |
998 | +prefsdir = $(xul_extdir)/defaults/preferences |
999 | +dist_prefs_DATA = \ |
1000 | + defaults/preferences/zeitgeist.js \ |
1001 | + $(NULL) |
1002 | + |
1003 | +install-exec-hook: |
1004 | + $(MKDIR_P) $(DESTDIR)$(extensiondir) |
1005 | + test -h "$(DESTDIR)$(EXTENSIONS_SYMLINK)" || $(LN_S) -f "$(DESTDIR)$(xul_extdir)" "$(DESTDIR)$(EXTENSIONS_SYMLINK)" |
1006 | + |
1007 | +# we want to allow also local install |
1008 | +EXTENSION_CONTENT = \ |
1009 | + $(dist_xul_ext_DATA) \ |
1010 | + defaults \ |
1011 | + chrome \ |
1012 | + components/libzeitgeist_xpcom.so \ |
1013 | + components/zeitgeist.xpt \ |
1014 | + $(NULL) |
1015 | + |
1016 | +local-install: all |
1017 | + $(MAKE) -C components $@ |
1018 | + zip -r ../ZeitgeistDataprovider.xpi $(EXTENSION_CONTENT) |
1019 | + |
1020 | +local-uninstall: |
1021 | + $(MAKE) -C components $@ |
1022 | |
1023 | === added directory 'firefox-40-libzg/extension/chrome' |
1024 | === added file 'firefox-40-libzg/extension/chrome.manifest' |
1025 | --- firefox-40-libzg/extension/chrome.manifest 1970-01-01 00:00:00 +0000 |
1026 | +++ firefox-40-libzg/extension/chrome.manifest 2011-05-03 18:52:25 +0000 |
1027 | @@ -0,0 +1,4 @@ |
1028 | +binary-component components/libzeitgeist_xpcom.so |
1029 | +interfaces components/zeitgeist.xpt |
1030 | +content zeitgeist chrome/content/ |
1031 | +overlay chrome://browser/content/browser.xul chrome://zeitgeist/content/zeitgeist.xul |
1032 | |
1033 | === added directory 'firefox-40-libzg/extension/chrome/content' |
1034 | === added file 'firefox-40-libzg/extension/chrome/content/zeitgeist.png' |
1035 | Binary files firefox-40-libzg/extension/chrome/content/zeitgeist.png 1970-01-01 00:00:00 +0000 and firefox-40-libzg/extension/chrome/content/zeitgeist.png 2011-05-03 18:52:25 +0000 differ |
1036 | === added file 'firefox-40-libzg/extension/chrome/content/zeitgeist.xul' |
1037 | --- firefox-40-libzg/extension/chrome/content/zeitgeist.xul 1970-01-01 00:00:00 +0000 |
1038 | +++ firefox-40-libzg/extension/chrome/content/zeitgeist.xul 2011-05-03 18:52:25 +0000 |
1039 | @@ -0,0 +1,164 @@ |
1040 | +<?xml version="1.0"?> |
1041 | +<overlay id="zeitgeist" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> |
1042 | + |
1043 | + <script type="application/x-javascript"><![CDATA[ |
1044 | + var zeitgeistgluexpcominterface = null; |
1045 | + |
1046 | + var enable_googlemail = false; |
1047 | + var googlemail_view_regex = new RegExp("mail\\.google\\.com"); |
1048 | + var pbs = Components.classes["@mozilla.org/privatebrowsing;1"] |
1049 | + .getService(Components.interfaces.nsIPrivateBrowsingService); |
1050 | + |
1051 | + var debug = function (aMessage) { |
1052 | + var consoleService = Components.classes["@mozilla.org/consoleservice;1"] |
1053 | + .getService(Components.interfaces.nsIConsoleService); |
1054 | + consoleService.logStringMessage("Zeitgeist Extension: " + aMessage); |
1055 | + window.dump("Zeitgeist Extension:" + aMessage + "\n"); |
1056 | + } |
1057 | + |
1058 | + var make_pattern = function(pattern) { |
1059 | + for (item in pattern) { |
1060 | + // alert(pattern[item]); |
1061 | + pattern[item] = new RegExp(pattern[item]); |
1062 | + }; |
1063 | + return pattern; |
1064 | + }; |
1065 | + |
1066 | + var ZeitgeistPrefObserver = { |
1067 | + register: function() { |
1068 | + // First we'll need the preference services to look for preferences. |
1069 | + var prefService = Components.classes["@mozilla.org/preferences-service;1"] |
1070 | + .getService(Components.interfaces.nsIPrefService); |
1071 | + |
1072 | + // For this._branch we ask that the preferences for extensions.myextension. and children |
1073 | + this._branch = prefService.getBranch("extensions.zeitgeist."); |
1074 | + |
1075 | + // Now we queue the interface called nsIPrefBranch2. This interface is described as: |
1076 | + // "nsIPrefBranch2 allows clients to observe changes to pref values." |
1077 | + this._branch.QueryInterface(Components.interfaces.nsIPrefBranch2); |
1078 | + |
1079 | + // Finally add the observer. |
1080 | + this._branch.addObserver("", this, false); |
1081 | + }, |
1082 | + |
1083 | + unregister: function() { |
1084 | + if(!this._branch) return; |
1085 | + this._branch.removeObserver("", this); |
1086 | + }, |
1087 | + |
1088 | + observe: function(aSubject, aTopic, aData) { |
1089 | + if(aTopic != "nsPref:changed") return; |
1090 | + // aSubject is the nsIPrefBranch we're observing (after appropriate QI) |
1091 | + // aData is the name of the pref that's been changed (relative to aSubject) |
1092 | + switch (aData) { |
1093 | + case "ignored_uris": |
1094 | + // extensions.zeitgeist.ignored_uris was changed |
1095 | + pattern = this.get_string(aData); |
1096 | + // alert(pattern); |
1097 | + ignored_uris = make_pattern(pattern); |
1098 | + break; |
1099 | + case "enable_googlemail": |
1100 | + enable_googlemail = this.get_bool(aData); |
1101 | + //alert("changed gmail to"+enable_googlemail); |
1102 | + break |
1103 | + } |
1104 | + }, |
1105 | + get_string: function(key) { |
1106 | + try { |
1107 | + return JSON.parse(this._branch.getCharPref(key)); |
1108 | + } catch(err) { |
1109 | + // this means there is no such config value |
1110 | + // ignoring this error |
1111 | + //alert(key + " : " + err); |
1112 | + }; |
1113 | + }, |
1114 | + get_bool: function(key) { |
1115 | + try { |
1116 | + return this._branch.getBoolPref(key); |
1117 | + } catch(err) { |
1118 | + // this means there is no such config value |
1119 | + // ignoring this error |
1120 | + //alert(key + " : " + err); |
1121 | + }; |
1122 | + } |
1123 | + } |
1124 | + ZeitgeistPrefObserver.register(); |
1125 | + ignored_uris = make_pattern(ZeitgeistPrefObserver.get_string("ignored_uris")); |
1126 | + debug("We are ignoring this uris: " + ignored_uris); |
1127 | + var enable_googlemail = ZeitgeistPrefObserver.get_bool("enable_googlemail"); |
1128 | + debug("the googlemail handler extension is activated? ["+enable_googlemail+"]"); |
1129 | + |
1130 | + ignore_uri = function(uri) { |
1131 | + for (pattern in ignored_uris) { |
1132 | + if (ignored_uris[pattern].test(uri)) { |
1133 | + // alert("ignored " + uri); |
1134 | + return true; |
1135 | + }; |
1136 | + }; |
1137 | + return false; |
1138 | + }; |
1139 | + |
1140 | + try { |
1141 | + if(zeitgeistgluexpcominterface == null) { |
1142 | + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); |
1143 | + zeitgeistgluexpcominterface = Components. |
1144 | + classes["@zeitgeist-project.com/DATAPROVIDER/firefox-xpcom;1"]. |
1145 | + createInstance(Components.interfaces.zeitgeist); |
1146 | + } |
1147 | + } catch(err) { |
1148 | + alert(err); |
1149 | + } |
1150 | + |
1151 | + var ZeitgeistProgressListener = { |
1152 | + onStateChange: function(aBrowser, aProgress, aRequest, aStateFlags) { |
1153 | + var inPrivateBrowsingMode = pbs.privateBrowsingEnabled; |
1154 | + if (inPrivateBrowsingMode) return; |
1155 | + if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP) { |
1156 | + var uri = aBrowser.currentURI.spec; |
1157 | + var mimetype = aBrowser.contentDocument.contentType; |
1158 | + if (aRequest.name == uri && !ignore_uri(uri)) { |
1159 | + zeitgeistgluexpcominterface.insert( |
1160 | + uri, |
1161 | + mimetype, |
1162 | + aBrowser.contentTitle |
1163 | + ); |
1164 | + //alert("THATS WHAT WE HAVE "+enable_googlemail+" | "+uri+" | "+(enable_googlemail & googlemail_view_regex.test(uri))); |
1165 | + if (enable_googlemail & googlemail_view_regex.test(uri)) { |
1166 | + debug("let's begin the google fun'"); |
1167 | + var dmt = aBrowser.contentDocument; |
1168 | + var head = dmt.getElementsByTagName("title")[0]; |
1169 | + head.addEventListener("DOMSubtreeModified", function(event){ |
1170 | + if (dmt.title) { |
1171 | + zeitgeistgluexpcominterface.insert( |
1172 | + dmt.location.href, |
1173 | + dmt.contentType, |
1174 | + dmt.title |
1175 | + ); |
1176 | + }; |
1177 | + }, false); |
1178 | + } |
1179 | + } |
1180 | + } |
1181 | + }, |
1182 | + // we don't implement this methods |
1183 | + onStatusChange: function(){}, |
1184 | + onLocationChange: function(){}, |
1185 | + onSecurityChange: function(){}, |
1186 | + onProgressChange: function(){}, |
1187 | + }; |
1188 | + |
1189 | + |
1190 | + var zeitgeist = { |
1191 | + init: function() { |
1192 | + gBrowser.addTabsProgressListener(ZeitgeistProgressListener); |
1193 | + }, |
1194 | + uninit: function() { |
1195 | + gBrowser.removeTabsProgressListener(ZeitgeistProgressListener); |
1196 | + }, |
1197 | + }; |
1198 | + |
1199 | + window.addEventListener("load", function() {zeitgeist.init()}, false); |
1200 | + window.addEventListener("unload", function() {zeitgeist.uninit()}, false); |
1201 | + |
1202 | + ]]></script> |
1203 | +</overlay> |
1204 | |
1205 | === added directory 'firefox-40-libzg/extension/components' |
1206 | === added file 'firefox-40-libzg/extension/components/Makefile.am' |
1207 | --- firefox-40-libzg/extension/components/Makefile.am 1970-01-01 00:00:00 +0000 |
1208 | +++ firefox-40-libzg/extension/components/Makefile.am 2011-05-03 18:52:25 +0000 |
1209 | @@ -0,0 +1,60 @@ |
1210 | +zeitgeistmoduledir = $(libdir)/xul-ext-zeitgeist |
1211 | +zeitgeistmodule_LTLIBRARIES = libzeitgeist_xpcom.la |
1212 | +zeitgeistmodule_DATA = zeitgeist.xpt |
1213 | + |
1214 | +xul_extdir = $(datadir)/xul-ext-zeitgeist |
1215 | + |
1216 | +libzeitgeist_xpcom_la_SOURCES = \ |
1217 | + ZeitgeistComponent.cpp \ |
1218 | + ZeitgeistModule.cpp \ |
1219 | + $(NULL) |
1220 | + |
1221 | +libzeitgeist_xpcom_la_CXXFLAGS = \ |
1222 | + -include "xpcom-config.h" \ |
1223 | + $(ZEITGEIST_CFLAGS) \ |
1224 | + $(LIBXUL_2_0_CFLAGS) \ |
1225 | + $(NULL) |
1226 | + |
1227 | +libzeitgeist_xpcom_la_LIBADD = \ |
1228 | + $(ZEITGEIST_LIBS) \ |
1229 | + $(LIBXUL_2_0_LIBS) \ |
1230 | + $(NULL) |
1231 | + |
1232 | +libzeitgeist_xpcom_la_LDFLAGS = \ |
1233 | + -module -avoid-version \ |
1234 | + $(NULL) |
1235 | + |
1236 | +BUILT_SOURCES = \ |
1237 | + zeitgeist-library.h \ |
1238 | + zeitgeist.h \ |
1239 | + zeitgeist.xpt \ |
1240 | + $(NULL) |
1241 | + |
1242 | +EXTRA_DIST = \ |
1243 | + zeitgeist.idl \ |
1244 | + zeitgeistextend.h \ |
1245 | + $(NULL) |
1246 | + |
1247 | +DISTCLEANFILES = \ |
1248 | + $(BUILT_SOURCES) \ |
1249 | + $(NULL) |
1250 | + |
1251 | + |
1252 | +zeitgeist.h: zeitgeist.idl |
1253 | + $(AM_V_GEN)$(XPIDL_BIN) -m header -I $(XUL_IDLDIR) -o zeitgeist $< |
1254 | + |
1255 | +zeitgeist.xpt: zeitgeist.idl |
1256 | + $(AM_V_GEN)$(XPIDL_BIN) -m typelib -I $(XUL_IDLDIR) -o zeitgeist $< |
1257 | + |
1258 | +zeitgeist-library.h: |
1259 | + $(AM_V_GEN)$(LN_S) "`$(PKG_CONFIG) --variable includedir zeitgeist-1.0`/zeitgeist-1.0/zeitgeist.h" $@ |
1260 | + |
1261 | +install-exec-hook: |
1262 | + test -d $(DESTDIR)$(xul_extdir) || $(MKDIR_P) $(DESTDIR)$(xul_extdir) |
1263 | + test -h $(DESTDIR)$(xul_extdir)/components || $(LN_S) -f $(DESTDIR)$(zeitgeistmoduledir) $(DESTDIR)$(xul_extdir)/components |
1264 | + |
1265 | +# small helper with local install |
1266 | +local-install: all |
1267 | + cp .libs/libzeitgeist_xpcom.so ./ |
1268 | + |
1269 | +local-uninstall: ; |
1270 | |
1271 | === added file 'firefox-40-libzg/extension/components/ZeitgeistComponent.cpp' |
1272 | --- firefox-40-libzg/extension/components/ZeitgeistComponent.cpp 1970-01-01 00:00:00 +0000 |
1273 | +++ firefox-40-libzg/extension/components/ZeitgeistComponent.cpp 2011-05-03 18:52:25 +0000 |
1274 | @@ -0,0 +1,50 @@ |
1275 | +/* |
1276 | + * ZeitgeistComponent.cpp |
1277 | + * This file is part of zeitgeist dataprovider for firefox |
1278 | + * |
1279 | + * Copyright (C) 2010 - Markus Korn <thekorn@gmx.de> |
1280 | + * |
1281 | + * zeitgeist dataprovider for firefox is free software; you can redistribute it and/or |
1282 | + * modify it under the terms of the GNU Lesser General Public |
1283 | + * License as published by the Free Software Foundation; either |
1284 | + * version 3 of the License, or (at your option) any later version. |
1285 | + * |
1286 | + * zeitgeist dataprovider for firefox is distributed in the hope that it will be useful, |
1287 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1288 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1289 | + * Lesser General Public License for more details. |
1290 | + * |
1291 | + * You should have received a copy of the GNU Lesser General Public |
1292 | + * License along with this library; if not, write to the Free Software |
1293 | + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
1294 | + */ |
1295 | + |
1296 | + |
1297 | +#include "mozilla/ModuleUtils.h" |
1298 | +#include "zeitgeist.h" |
1299 | +#include "zeitgeistextend.h" |
1300 | + |
1301 | +NS_GENERIC_FACTORY_CONSTRUCTOR(zeitgeistextend) |
1302 | + |
1303 | +NS_DEFINE_NAMED_CID(ZEITGEIST_COMPONENT_CID); |
1304 | + |
1305 | +static const mozilla::Module::CIDEntry kZeitgeistCIDs[] = { |
1306 | + { &kZEITGEIST_COMPONENT_CID, false, NULL, zeitgeistextendConstructor }, |
1307 | + { NULL } |
1308 | +}; |
1309 | + |
1310 | +static const mozilla::Module::ContractIDEntry kZeitgeistContracts[] = { |
1311 | + { ZEITGEIST_COMPONENT_CONTRACTID, &kZEITGEIST_COMPONENT_CID }, |
1312 | + { NULL } |
1313 | +}; |
1314 | + |
1315 | +static const mozilla::Module kZeitgeistModule = { |
1316 | + mozilla::Module::kVersion, |
1317 | + kZeitgeistCIDs, |
1318 | + kZeitgeistContracts, |
1319 | + NULL |
1320 | +}; |
1321 | + |
1322 | +NSMODULE_DEFN(ZeitgeistModule) = &kZeitgeistModule; |
1323 | + |
1324 | +NS_IMPL_MOZILLA192_NSGETMODULE(&kZeitgeistModule) |
1325 | |
1326 | === added file 'firefox-40-libzg/extension/components/ZeitgeistModule.cpp' |
1327 | --- firefox-40-libzg/extension/components/ZeitgeistModule.cpp 1970-01-01 00:00:00 +0000 |
1328 | +++ firefox-40-libzg/extension/components/ZeitgeistModule.cpp 2011-05-03 18:52:25 +0000 |
1329 | @@ -0,0 +1,86 @@ |
1330 | +/* |
1331 | + * ZeitgeistModule.cpp |
1332 | + * This file is part of zeitgeist dataprovider for firefox |
1333 | + * |
1334 | + * Copyright (C) 2010 - Markus Korn <thekorn@gmx.de> |
1335 | + * Copyright (C) 2010 - Michal Hruby <michal.mhr@gmail.com> |
1336 | + * |
1337 | + * zeitgeist dataprovider for firefox is free software; you can redistribute it and/or |
1338 | + * modify it under the terms of the GNU Lesser General Public |
1339 | + * License as published by the Free Software Foundation; either |
1340 | + * version 3 of the License, or (at your option) any later version. |
1341 | + * |
1342 | + * zeitgeist dataprovider for firefox is distributed in the hope that it will be useful, |
1343 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1344 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1345 | + * Lesser General Public License for more details. |
1346 | + * |
1347 | + * You should have received a copy of the GNU Lesser General Public |
1348 | + * License along with this library; if not, write to the Free Software |
1349 | + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
1350 | + */ |
1351 | + |
1352 | + |
1353 | +#include "zeitgeist.h" |
1354 | +#include "zeitgeistextend.h" |
1355 | + |
1356 | +#include <nsStringAPI.h> |
1357 | +#include <glib.h> |
1358 | +#include <glib-object.h> |
1359 | +#include <zeitgeist.h> |
1360 | + |
1361 | + |
1362 | +using namespace std; |
1363 | + |
1364 | +NS_IMPL_ISUPPORTS1(zeitgeistextend, zeitgeist) |
1365 | + |
1366 | +zeitgeistextend::zeitgeistextend() |
1367 | +{ |
1368 | + g_debug("constructor of zeitgeistextend"); |
1369 | + g_type_init (); |
1370 | + |
1371 | + log = (ZeitgeistLog *)g_object_new (ZEITGEIST_TYPE_LOG, NULL); |
1372 | +} |
1373 | + |
1374 | +zeitgeistextend::~zeitgeistextend() |
1375 | +{ |
1376 | + g_debug("destructor of zeitgeistextend"); |
1377 | +} |
1378 | + |
1379 | +NS_IMETHODIMP zeitgeistextend::Insert(const char *url, |
1380 | + const char *mimetype, |
1381 | + const nsACString &title_str) |
1382 | +{ |
1383 | + ZeitgeistEvent *event; |
1384 | + gchar *title = NULL; |
1385 | + |
1386 | + g_debug("zeitgeist start - creating event"); |
1387 | + |
1388 | + if (!title_str.IsEmpty ()) |
1389 | + { |
1390 | + gsize title_len = title_str.EndReading () - title_str.BeginReading (); |
1391 | + title = g_strndup (title_str.BeginReading (), title_len); |
1392 | + } |
1393 | + |
1394 | + event = zeitgeist_event_new_full ( |
1395 | + ZEITGEIST_ZG_ACCESS_EVENT, |
1396 | + ZEITGEIST_ZG_USER_ACTIVITY, |
1397 | + "application://firefox.desktop", |
1398 | + zeitgeist_subject_new_full ( |
1399 | + url, |
1400 | + ZEITGEIST_NFO_WEBSITE, |
1401 | + ZEITGEIST_NFO_REMOTE_DATA_OBJECT, |
1402 | + mimetype, |
1403 | + url, |
1404 | + title, |
1405 | + "net"), |
1406 | + NULL); |
1407 | + |
1408 | + if (title) g_free (title); |
1409 | + g_debug("inserting event"); |
1410 | + zeitgeist_log_insert_events_no_reply(log, event, NULL); |
1411 | + g_debug("zeitgeist end"); |
1412 | + |
1413 | + return NS_OK; |
1414 | +} |
1415 | + |
1416 | |
1417 | === added symlink 'firefox-40-libzg/extension/components/zeitgeist-library.h' |
1418 | === target is u'/usr/include/zeitgeist-1.0/zeitgeist.h' |
1419 | === added file 'firefox-40-libzg/extension/components/zeitgeist.h' |
1420 | --- firefox-40-libzg/extension/components/zeitgeist.h 1970-01-01 00:00:00 +0000 |
1421 | +++ firefox-40-libzg/extension/components/zeitgeist.h 2011-05-03 18:52:25 +0000 |
1422 | @@ -0,0 +1,91 @@ |
1423 | +/* |
1424 | + * DO NOT EDIT. THIS FILE IS GENERATED FROM zeitgeist.idl |
1425 | + */ |
1426 | + |
1427 | +#ifndef __gen_zeitgeist_h__ |
1428 | +#define __gen_zeitgeist_h__ |
1429 | + |
1430 | + |
1431 | +#ifndef __gen_nsISupports_h__ |
1432 | +#include "nsISupports.h" |
1433 | +#endif |
1434 | + |
1435 | +/* For IDL files that don't want to include root IDL files. */ |
1436 | +#ifndef NS_NO_VTABLE |
1437 | +#define NS_NO_VTABLE |
1438 | +#endif |
1439 | + |
1440 | +/* starting interface: zeitgeist */ |
1441 | +#define ZEITGEIST_IID_STR "d879c08c-517d-44f0-83e1-3ef75a527ddf" |
1442 | + |
1443 | +#define ZEITGEIST_IID \ |
1444 | + {0xd879c08c, 0x517d, 0x44f0, \ |
1445 | + { 0x83, 0xe1, 0x3e, 0xf7, 0x5a, 0x52, 0x7d, 0xdf }} |
1446 | + |
1447 | +class NS_NO_VTABLE NS_SCRIPTABLE zeitgeist : public nsISupports { |
1448 | + public: |
1449 | + |
1450 | + NS_DECLARE_STATIC_IID_ACCESSOR(ZEITGEIST_IID) |
1451 | + |
1452 | + /* void insert (in string url, in string mimetype, in AUTF8String title); */ |
1453 | + NS_SCRIPTABLE NS_IMETHOD Insert(const char *url, const char *mimetype, const nsACString & title) = 0; |
1454 | + |
1455 | +}; |
1456 | + |
1457 | + NS_DEFINE_STATIC_IID_ACCESSOR(zeitgeist, ZEITGEIST_IID) |
1458 | + |
1459 | +/* Use this macro when declaring classes that implement this interface. */ |
1460 | +#define NS_DECL_ZEITGEIST \ |
1461 | + NS_SCRIPTABLE NS_IMETHOD Insert(const char *url, const char *mimetype, const nsACString & title); |
1462 | + |
1463 | +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ |
1464 | +#define NS_FORWARD_ZEITGEIST(_to) \ |
1465 | + NS_SCRIPTABLE NS_IMETHOD Insert(const char *url, const char *mimetype, const nsACString & title) { return _to Insert(url, mimetype, title); } |
1466 | + |
1467 | +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ |
1468 | +#define NS_FORWARD_SAFE_ZEITGEIST(_to) \ |
1469 | + NS_SCRIPTABLE NS_IMETHOD Insert(const char *url, const char *mimetype, const nsACString & title) { return !_to ? NS_ERROR_NULL_POINTER : _to->Insert(url, mimetype, title); } |
1470 | + |
1471 | +#if 0 |
1472 | +/* Use the code below as a template for the implementation class for this interface. */ |
1473 | + |
1474 | +/* Header file */ |
1475 | +class _MYCLASS_ : public zeitgeist |
1476 | +{ |
1477 | +public: |
1478 | + NS_DECL_ISUPPORTS |
1479 | + NS_DECL_ZEITGEIST |
1480 | + |
1481 | + _MYCLASS_(); |
1482 | + |
1483 | +private: |
1484 | + ~_MYCLASS_(); |
1485 | + |
1486 | +protected: |
1487 | + /* additional members */ |
1488 | +}; |
1489 | + |
1490 | +/* Implementation file */ |
1491 | +NS_IMPL_ISUPPORTS1(_MYCLASS_, zeitgeist) |
1492 | + |
1493 | +_MYCLASS_::_MYCLASS_() |
1494 | +{ |
1495 | + /* member initializers and constructor code */ |
1496 | +} |
1497 | + |
1498 | +_MYCLASS_::~_MYCLASS_() |
1499 | +{ |
1500 | + /* destructor code */ |
1501 | +} |
1502 | + |
1503 | +/* void insert (in string url, in string mimetype, in AUTF8String title); */ |
1504 | +NS_IMETHODIMP _MYCLASS_::Insert(const char *url, const char *mimetype, const nsACString & title) |
1505 | +{ |
1506 | + return NS_ERROR_NOT_IMPLEMENTED; |
1507 | +} |
1508 | + |
1509 | +/* End of implementation class template. */ |
1510 | +#endif |
1511 | + |
1512 | + |
1513 | +#endif /* __gen_zeitgeist_h__ */ |
1514 | |
1515 | === added file 'firefox-40-libzg/extension/components/zeitgeist.idl' |
1516 | --- firefox-40-libzg/extension/components/zeitgeist.idl 1970-01-01 00:00:00 +0000 |
1517 | +++ firefox-40-libzg/extension/components/zeitgeist.idl 2011-05-03 18:52:25 +0000 |
1518 | @@ -0,0 +1,30 @@ |
1519 | +/* |
1520 | + * zeitgeist.idl |
1521 | + * This file is part of zeitgeist dataprovider for firefox |
1522 | + * |
1523 | + * Copyright (C) 2010 - Markus Korn <thekorn@gmx.de> |
1524 | + * Copyright (C) 2010 - Michal Hruby <michal.mhr@gmail.com> |
1525 | + * |
1526 | + * zeitgeist dataprovider for firefox is free software; you can redistribute it and/or |
1527 | + * modify it under the terms of the GNU Lesser General Public |
1528 | + * License as published by the Free Software Foundation; either |
1529 | + * version 3 of the License, or (at your option) any later version. |
1530 | + * |
1531 | + * zeitgeist dataprovider for firefox is distributed in the hope that it will be useful, |
1532 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1533 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1534 | + * Lesser General Public License for more details. |
1535 | + * |
1536 | + * You should have received a copy of the GNU Lesser General Public |
1537 | + * License along with this library; if not, write to the Free Software |
1538 | + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
1539 | + */ |
1540 | + |
1541 | + |
1542 | +#include "nsISupports.idl" |
1543 | +[scriptable, uuid(d879c08c-517d-44f0-83e1-3ef75a527ddf)] |
1544 | +interface zeitgeist : nsISupports |
1545 | +{ |
1546 | + void insert(in string url, in string mimetype, in AUTF8String title); |
1547 | +}; |
1548 | + |
1549 | |
1550 | === added file 'firefox-40-libzg/extension/components/zeitgeist.xpt' |
1551 | Binary files firefox-40-libzg/extension/components/zeitgeist.xpt 1970-01-01 00:00:00 +0000 and firefox-40-libzg/extension/components/zeitgeist.xpt 2011-05-03 18:52:25 +0000 differ |
1552 | === added file 'firefox-40-libzg/extension/components/zeitgeistextend.h' |
1553 | --- firefox-40-libzg/extension/components/zeitgeistextend.h 1970-01-01 00:00:00 +0000 |
1554 | +++ firefox-40-libzg/extension/components/zeitgeistextend.h 2011-05-03 18:52:25 +0000 |
1555 | @@ -0,0 +1,45 @@ |
1556 | +/* |
1557 | + * zeitgeistextend.h |
1558 | + * This file is part of zeitgeist dataprovider for firefox |
1559 | + * |
1560 | + * Copyright (C) 2010 - Markus Korn <thekorn@gmx.de> |
1561 | + * |
1562 | + * zeitgeist dataprovider for firefox is free software; you can redistribute it and/or |
1563 | + * modify it under the terms of the GNU Lesser General Public |
1564 | + * License as published by the Free Software Foundation; either |
1565 | + * version 3 of the License, or (at your option) any later version. |
1566 | + * |
1567 | + * zeitgeist dataprovider for firefox is distributed in the hope that it will be useful, |
1568 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1569 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1570 | + * Lesser General Public License for more details. |
1571 | + * |
1572 | + * You should have received a copy of the GNU Lesser General Public |
1573 | + * License along with this library; if not, write to the Free Software |
1574 | + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
1575 | + */ |
1576 | + |
1577 | + |
1578 | +#ifndef _ZEITGEISTEXTEND_H_ |
1579 | +#define _ZEITGEISTEXTEND_H_ |
1580 | + |
1581 | +#include "zeitgeist.h" |
1582 | +#include "zeitgeist-library.h" |
1583 | + |
1584 | +#define ZEITGEIST_COMPONENT_CONTRACTID "@zeitgeist-project.com/DATAPROVIDER/firefox-xpcom;1" |
1585 | +#define ZEITGEIST_COMPONENT_CLASSNAME "zeitgeist dataprovider for firefox" |
1586 | +#define ZEITGEIST_COMPONENT_CID { 0xd879c08c, 0x517d, 0x44f0, { 0x83, 0xe1, 0x3e, 0xf7, 0x5a, 0x52, 0x7d, 0xdf } } |
1587 | + |
1588 | +//d879c08c-517d-44f0-83e1-3ef75a527ddf |
1589 | +class zeitgeistextend : public zeitgeist |
1590 | +{ |
1591 | + public: |
1592 | + NS_DECL_ISUPPORTS |
1593 | + NS_DECL_ZEITGEIST |
1594 | + |
1595 | + zeitgeistextend(); |
1596 | + virtual ~zeitgeistextend(); |
1597 | + ZeitgeistLog *log; |
1598 | + |
1599 | +}; |
1600 | +#endif |
1601 | |
1602 | === added directory 'firefox-40-libzg/extension/defaults' |
1603 | === added directory 'firefox-40-libzg/extension/defaults/preferences' |
1604 | === added file 'firefox-40-libzg/extension/defaults/preferences/zeitgeist.js' |
1605 | --- firefox-40-libzg/extension/defaults/preferences/zeitgeist.js 1970-01-01 00:00:00 +0000 |
1606 | +++ firefox-40-libzg/extension/defaults/preferences/zeitgeist.js 2011-05-03 18:52:25 +0000 |
1607 | @@ -0,0 +1,2 @@ |
1608 | +pref("extensions.zeitgeist.ignored_uris", "[\"^about:*\"]"); |
1609 | +pref("extensions.zeitgeist.enable_googlemail", false); |
1610 | |
1611 | === added file 'firefox-40-libzg/extension/install.rdf' |
1612 | --- firefox-40-libzg/extension/install.rdf 1970-01-01 00:00:00 +0000 |
1613 | +++ firefox-40-libzg/extension/install.rdf 2011-05-03 18:52:25 +0000 |
1614 | @@ -0,0 +1,28 @@ |
1615 | +<?xml version="1.0"?> |
1616 | + |
1617 | +<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
1618 | + xmlns:em="http://www.mozilla.org/2004/em-rdf#"> |
1619 | + |
1620 | + <Description about="urn:mozilla:install-manifest"> |
1621 | + <em:id>xpcom_firefox@zeitgeist-project.com</em:id> |
1622 | + <em:version>0.3</em:version> |
1623 | + <em:type>2</em:type> |
1624 | + |
1625 | + <!-- Target Application this extension can install into, |
1626 | + with minimum and maximum supported versions. --> |
1627 | + <em:targetApplication> |
1628 | + <Description> |
1629 | + <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> |
1630 | + <em:minVersion>4.0</em:minVersion> |
1631 | + <em:maxVersion>4.0.*</em:maxVersion> |
1632 | + </Description> |
1633 | + </em:targetApplication> |
1634 | + |
1635 | + <!-- Front End MetaData --> |
1636 | + <em:name>zeitgeist</em:name> |
1637 | + <em:description>dataprovider for the zeitgeist framework, using xpcom and libzeitgeist</em:description> |
1638 | + <em:creator>Markus Korn</em:creator> |
1639 | + <em:homepageURL>http://launchpad.net/zeitgeist</em:homepageURL> |
1640 | + <em:iconURL>chrome://zeitgeist/content/zeitgeist.png</em:iconURL> |
1641 | + </Description> |
1642 | +</RDF> |
1643 | |
1644 | === added file 'firefox-40-libzg/extension/license.txt' |
1645 | --- firefox-40-libzg/extension/license.txt 1970-01-01 00:00:00 +0000 |
1646 | +++ firefox-40-libzg/extension/license.txt 2011-05-03 18:52:25 +0000 |
1647 | @@ -0,0 +1,166 @@ |
1648 | + GNU LESSER GENERAL PUBLIC LICENSE |
1649 | + Version 3, 29 June 2007 |
1650 | + |
1651 | + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> |
1652 | + Everyone is permitted to copy and distribute verbatim copies |
1653 | + of this license document, but changing it is not allowed. |
1654 | + |
1655 | + |
1656 | + This version of the GNU Lesser General Public License incorporates |
1657 | +the terms and conditions of version 3 of the GNU General Public |
1658 | +License, supplemented by the additional permissions listed below. |
1659 | + |
1660 | + 0. Additional Definitions. |
1661 | + |
1662 | + As used herein, "this License" refers to version 3 of the GNU Lesser |
1663 | +General Public License, and the "GNU GPL" refers to version 3 of the GNU |
1664 | +General Public License. |
1665 | + |
1666 | + "The Library" refers to a covered work governed by this License, |
1667 | +other than an Application or a Combined Work as defined below. |
1668 | + |
1669 | + An "Application" is any work that makes use of an interface provided |
1670 | +by the Library, but which is not otherwise based on the Library. |
1671 | +Defining a subclass of a class defined by the Library is deemed a mode |
1672 | +of using an interface provided by the Library. |
1673 | + |
1674 | + A "Combined Work" is a work produced by combining or linking an |
1675 | +Application with the Library. The particular version of the Library |
1676 | +with which the Combined Work was made is also called the "Linked |
1677 | +Version". |
1678 | + |
1679 | + The "Minimal Corresponding Source" for a Combined Work means the |
1680 | +Corresponding Source for the Combined Work, excluding any source code |
1681 | +for portions of the Combined Work that, considered in isolation, are |
1682 | +based on the Application, and not on the Linked Version. |
1683 | + |
1684 | + The "Corresponding Application Code" for a Combined Work means the |
1685 | +object code and/or source code for the Application, including any data |
1686 | +and utility programs needed for reproducing the Combined Work from the |
1687 | +Application, but excluding the System Libraries of the Combined Work. |
1688 | + |
1689 | + 1. Exception to Section 3 of the GNU GPL. |
1690 | + |
1691 | + You may convey a covered work under sections 3 and 4 of this License |
1692 | +without being bound by section 3 of the GNU GPL. |
1693 | + |
1694 | + 2. Conveying Modified Versions. |
1695 | + |
1696 | + If you modify a copy of the Library, and, in your modifications, a |
1697 | +facility refers to a function or data to be supplied by an Application |
1698 | +that uses the facility (other than as an argument passed when the |
1699 | +facility is invoked), then you may convey a copy of the modified |
1700 | +version: |
1701 | + |
1702 | + a) under this License, provided that you make a good faith effort to |
1703 | + ensure that, in the event an Application does not supply the |
1704 | + function or data, the facility still operates, and performs |
1705 | + whatever part of its purpose remains meaningful, or |
1706 | + |
1707 | + b) under the GNU GPL, with none of the additional permissions of |
1708 | + this License applicable to that copy. |
1709 | + |
1710 | + 3. Object Code Incorporating Material from Library Header Files. |
1711 | + |
1712 | + The object code form of an Application may incorporate material from |
1713 | +a header file that is part of the Library. You may convey such object |
1714 | +code under terms of your choice, provided that, if the incorporated |
1715 | +material is not limited to numerical parameters, data structure |
1716 | +layouts and accessors, or small macros, inline functions and templates |
1717 | +(ten or fewer lines in length), you do both of the following: |
1718 | + |
1719 | + a) Give prominent notice with each copy of the object code that the |
1720 | + Library is used in it and that the Library and its use are |
1721 | + covered by this License. |
1722 | + |
1723 | + b) Accompany the object code with a copy of the GNU GPL and this license |
1724 | + document. |
1725 | + |
1726 | + 4. Combined Works. |
1727 | + |
1728 | + You may convey a Combined Work under terms of your choice that, |
1729 | +taken together, effectively do not restrict modification of the |
1730 | +portions of the Library contained in the Combined Work and reverse |
1731 | +engineering for debugging such modifications, if you also do each of |
1732 | +the following: |
1733 | + |
1734 | + a) Give prominent notice with each copy of the Combined Work that |
1735 | + the Library is used in it and that the Library and its use are |
1736 | + covered by this License. |
1737 | + |
1738 | + b) Accompany the Combined Work with a copy of the GNU GPL and this license |
1739 | + document. |
1740 | + |
1741 | + c) For a Combined Work that displays copyright notices during |
1742 | + execution, include the copyright notice for the Library among |
1743 | + these notices, as well as a reference directing the user to the |
1744 | + copies of the GNU GPL and this license document. |
1745 | + |
1746 | + d) Do one of the following: |
1747 | + |
1748 | + 0) Convey the Minimal Corresponding Source under the terms of this |
1749 | + License, and the Corresponding Application Code in a form |
1750 | + suitable for, and under terms that permit, the user to |
1751 | + recombine or relink the Application with a modified version of |
1752 | + the Linked Version to produce a modified Combined Work, in the |
1753 | + manner specified by section 6 of the GNU GPL for conveying |
1754 | + Corresponding Source. |
1755 | + |
1756 | + 1) Use a suitable shared library mechanism for linking with the |
1757 | + Library. A suitable mechanism is one that (a) uses at run time |
1758 | + a copy of the Library already present on the user's computer |
1759 | + system, and (b) will operate properly with a modified version |
1760 | + of the Library that is interface-compatible with the Linked |
1761 | + Version. |
1762 | + |
1763 | + e) Provide Installation Information, but only if you would otherwise |
1764 | + be required to provide such information under section 6 of the |
1765 | + GNU GPL, and only to the extent that such information is |
1766 | + necessary to install and execute a modified version of the |
1767 | + Combined Work produced by recombining or relinking the |
1768 | + Application with a modified version of the Linked Version. (If |
1769 | + you use option 4d0, the Installation Information must accompany |
1770 | + the Minimal Corresponding Source and Corresponding Application |
1771 | + Code. If you use option 4d1, you must provide the Installation |
1772 | + Information in the manner specified by section 6 of the GNU GPL |
1773 | + for conveying Corresponding Source.) |
1774 | + |
1775 | + 5. Combined Libraries. |
1776 | + |
1777 | + You may place library facilities that are a work based on the |
1778 | +Library side by side in a single library together with other library |
1779 | +facilities that are not Applications and are not covered by this |
1780 | +License, and convey such a combined library under terms of your |
1781 | +choice, if you do both of the following: |
1782 | + |
1783 | + a) Accompany the combined library with a copy of the same work based |
1784 | + on the Library, uncombined with any other library facilities, |
1785 | + conveyed under the terms of this License. |
1786 | + |
1787 | + b) Give prominent notice with the combined library that part of it |
1788 | + is a work based on the Library, and explaining where to find the |
1789 | + accompanying uncombined form of the same work. |
1790 | + |
1791 | + 6. Revised Versions of the GNU Lesser General Public License. |
1792 | + |
1793 | + The Free Software Foundation may publish revised and/or new versions |
1794 | +of the GNU Lesser General Public License from time to time. Such new |
1795 | +versions will be similar in spirit to the present version, but may |
1796 | +differ in detail to address new problems or concerns. |
1797 | + |
1798 | + Each version is given a distinguishing version number. If the |
1799 | +Library as you received it specifies that a certain numbered version |
1800 | +of the GNU Lesser General Public License "or any later version" |
1801 | +applies to it, you have the option of following the terms and |
1802 | +conditions either of that published version or of any later version |
1803 | +published by the Free Software Foundation. If the Library as you |
1804 | +received it does not specify a version number of the GNU Lesser |
1805 | +General Public License, you may choose any version of the GNU Lesser |
1806 | +General Public License ever published by the Free Software Foundation. |
1807 | + |
1808 | + If the Library as you received it specifies that a proxy can decide |
1809 | +whether future versions of the GNU Lesser General Public License shall |
1810 | +apply, that proxy's public statement of acceptance of any version is |
1811 | +permanent authorization for you to choose that version for the |
1812 | +Library. |
1813 | + |
1814 | |
1815 | === removed directory 'firefox-libzg' |
1816 | === removed file 'firefox-libzg/Makefile.am' |
1817 | --- firefox-libzg/Makefile.am 2011-05-02 19:02:52 +0000 |
1818 | +++ firefox-libzg/Makefile.am 1970-01-01 00:00:00 +0000 |
1819 | @@ -1,16 +0,0 @@ |
1820 | -SUBDIRS = extension |
1821 | - |
1822 | -# identifier for the FF profile in which 'make install' installs this extension |
1823 | -TARGET_PROFILE = *default* |
1824 | - |
1825 | -local-install: all |
1826 | - $(MAKE) -C extension $@ |
1827 | - unzip -o ZeitgeistDataprovider.xpi -d ~/xpcom_firefox\@zeitgeist-project.com |
1828 | - cd ~/.mozilla/firefox/$(TARGET_PROFILE)/ && mkdir -p extensions |
1829 | - cp -r ~/xpcom_firefox\@zeitgeist-project.com/ ~/.mozilla/firefox/$(TARGET_PROFILE)/extensions/ |
1830 | - |
1831 | -local-uninstall: |
1832 | - $(MAKE) -C extension $@ |
1833 | - -rm -rf ~/.mozilla/firefox/$(TARGET_PROFILE)/extensions/xpcom_firefox\@zeitgeist-project.com |
1834 | - -rm -rf ~/.mozilla/firefox/$(TARGET_PROFILE)/extensions/ZeitgeistDataprovider.xpi |
1835 | - |
1836 | |
1837 | === removed file 'firefox-libzg/README' |
1838 | --- firefox-libzg/README 2010-05-11 15:51:49 +0000 |
1839 | +++ firefox-libzg/README 1970-01-01 00:00:00 +0000 |
1840 | @@ -1,43 +0,0 @@ |
1841 | -Links |
1842 | -===== |
1843 | - |
1844 | -Code is based on: |
1845 | - http://www.ibm.com/developerworks/opensource/library/os-xpcomfirefox/index.html |
1846 | - |
1847 | -Other useful ressources: |
1848 | - https://developer.mozilla.org/en/XPCOM_Glue |
1849 | - http://www.iosart.com/firefox/xpcom/ |
1850 | - http://www.ibm.com/developerworks/webservices/library/co-xpcom5.html (with link to the complete series) |
1851 | - http://blog.lazytech.info/2007/05/26/xpcom-javascript-function-call/ (about implementing JS callbacks) |
1852 | - |
1853 | - |
1854 | -Unknown symbols in ubuntu lucid |
1855 | -=============================== |
1856 | - |
1857 | -On ubuntu lucid `ldd -r *.so` shows libxpcom as unknown symbol, to fix this create |
1858 | - |
1859 | - /etc/ld.so.conf.d/libxpcom.conf |
1860 | - |
1861 | -with this content: |
1862 | - |
1863 | - # for xpcom |
1864 | - /usr/lib/xulrunner-1.9.2.3 |
1865 | - |
1866 | - |
1867 | -And rebuild the cache |
1868 | - $ sudo ldconfig |
1869 | - |
1870 | -You have to do the same for libzeitgeist! |
1871 | - |
1872 | - |
1873 | -Component UUID |
1874 | -============== |
1875 | - |
1876 | -the uuid for the component is |
1877 | - d879c08c-517d-44f0-83e1-3ef75a527ddf |
1878 | - |
1879 | - |
1880 | -TODO |
1881 | -==== |
1882 | - * add JS callback to .insert() so user can be notified of issues while inserting event |
1883 | - * add events for downloads, see https://developer.mozilla.org/en/nsIDownloadProgressListener |
1884 | |
1885 | === removed directory 'firefox-libzg/extension' |
1886 | === removed file 'firefox-libzg/extension/Makefile.am' |
1887 | --- firefox-libzg/extension/Makefile.am 2011-01-25 17:08:17 +0000 |
1888 | +++ firefox-libzg/extension/Makefile.am 1970-01-01 00:00:00 +0000 |
1889 | @@ -1,42 +0,0 @@ |
1890 | -SUBDIRS = components |
1891 | - |
1892 | -extensiondir = $(datadir)/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384} |
1893 | -EXTENSIONS_SYMLINK = $(extensiondir)/xpcom_firefox@zeitgeist-project.com |
1894 | - |
1895 | -xul_extdir = $(datadir)/xul-ext-zeitgeist |
1896 | -dist_xul_ext_DATA = \ |
1897 | - license.txt \ |
1898 | - chrome.manifest \ |
1899 | - install.rdf \ |
1900 | - $(NULL) |
1901 | - |
1902 | -contentdir = $(xul_extdir)/chrome/content |
1903 | -dist_content_DATA = \ |
1904 | - chrome/content/zeitgeist.xul \ |
1905 | - chrome/content/zeitgeist.png \ |
1906 | - $(NULL) |
1907 | - |
1908 | -prefsdir = $(xul_extdir)/defaults/preferences |
1909 | -dist_prefs_DATA = \ |
1910 | - defaults/preferences/zeitgeist.js \ |
1911 | - $(NULL) |
1912 | - |
1913 | -install-exec-hook: |
1914 | - $(MKDIR_P) $(DESTDIR)$(extensiondir) |
1915 | - test -h "$(DESTDIR)$(EXTENSIONS_SYMLINK)" || $(LN_S) -f "$(DESTDIR)$(xul_extdir)" "$(DESTDIR)$(EXTENSIONS_SYMLINK)" |
1916 | - |
1917 | -# we want to allow also local install |
1918 | -EXTENSION_CONTENT = \ |
1919 | - $(dist_xul_ext_DATA) \ |
1920 | - defaults \ |
1921 | - chrome \ |
1922 | - components/libzeitgeist_xpcom.so \ |
1923 | - components/zeitgeist.xpt \ |
1924 | - $(NULL) |
1925 | - |
1926 | -local-install: all |
1927 | - $(MAKE) -C components $@ |
1928 | - zip -r ../ZeitgeistDataprovider.xpi $(EXTENSION_CONTENT) |
1929 | - |
1930 | -local-uninstall: |
1931 | - $(MAKE) -C components $@ |
1932 | |
1933 | === removed directory 'firefox-libzg/extension/chrome' |
1934 | === removed file 'firefox-libzg/extension/chrome.manifest' |
1935 | --- firefox-libzg/extension/chrome.manifest 2011-04-29 20:41:04 +0000 |
1936 | +++ firefox-libzg/extension/chrome.manifest 1970-01-01 00:00:00 +0000 |
1937 | @@ -1,4 +0,0 @@ |
1938 | -binary-component components/libzeitgeist_xpcom.so |
1939 | -interfaces components/zeitgeist.xpt |
1940 | -content zeitgeist chrome/content/ |
1941 | -overlay chrome://browser/content/browser.xul chrome://zeitgeist/content/zeitgeist.xul |
1942 | |
1943 | === removed directory 'firefox-libzg/extension/chrome/content' |
1944 | === removed file 'firefox-libzg/extension/chrome/content/zeitgeist.png' |
1945 | Binary files firefox-libzg/extension/chrome/content/zeitgeist.png 2010-05-16 08:58:25 +0000 and firefox-libzg/extension/chrome/content/zeitgeist.png 1970-01-01 00:00:00 +0000 differ |
1946 | === removed file 'firefox-libzg/extension/chrome/content/zeitgeist.xul' |
1947 | --- firefox-libzg/extension/chrome/content/zeitgeist.xul 2011-01-25 18:26:06 +0000 |
1948 | +++ firefox-libzg/extension/chrome/content/zeitgeist.xul 1970-01-01 00:00:00 +0000 |
1949 | @@ -1,164 +0,0 @@ |
1950 | -<?xml version="1.0"?> |
1951 | -<overlay id="zeitgeist" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> |
1952 | - |
1953 | - <script type="application/x-javascript"><![CDATA[ |
1954 | - var zeitgeistgluexpcominterface = null; |
1955 | - |
1956 | - var enable_googlemail = false; |
1957 | - var googlemail_view_regex = new RegExp("mail\\.google\\.com"); |
1958 | - var pbs = Components.classes["@mozilla.org/privatebrowsing;1"] |
1959 | - .getService(Components.interfaces.nsIPrivateBrowsingService); |
1960 | - |
1961 | - var debug = function (aMessage) { |
1962 | - var consoleService = Components.classes["@mozilla.org/consoleservice;1"] |
1963 | - .getService(Components.interfaces.nsIConsoleService); |
1964 | - consoleService.logStringMessage("Zeitgeist Extension: " + aMessage); |
1965 | - window.dump("Zeitgeist Extension:" + aMessage + "\n"); |
1966 | - } |
1967 | - |
1968 | - var make_pattern = function(pattern) { |
1969 | - for (item in pattern) { |
1970 | - // alert(pattern[item]); |
1971 | - pattern[item] = new RegExp(pattern[item]); |
1972 | - }; |
1973 | - return pattern; |
1974 | - }; |
1975 | - |
1976 | - var ZeitgeistPrefObserver = { |
1977 | - register: function() { |
1978 | - // First we'll need the preference services to look for preferences. |
1979 | - var prefService = Components.classes["@mozilla.org/preferences-service;1"] |
1980 | - .getService(Components.interfaces.nsIPrefService); |
1981 | - |
1982 | - // For this._branch we ask that the preferences for extensions.myextension. and children |
1983 | - this._branch = prefService.getBranch("extensions.zeitgeist."); |
1984 | - |
1985 | - // Now we queue the interface called nsIPrefBranch2. This interface is described as: |
1986 | - // "nsIPrefBranch2 allows clients to observe changes to pref values." |
1987 | - this._branch.QueryInterface(Components.interfaces.nsIPrefBranch2); |
1988 | - |
1989 | - // Finally add the observer. |
1990 | - this._branch.addObserver("", this, false); |
1991 | - }, |
1992 | - |
1993 | - unregister: function() { |
1994 | - if(!this._branch) return; |
1995 | - this._branch.removeObserver("", this); |
1996 | - }, |
1997 | - |
1998 | - observe: function(aSubject, aTopic, aData) { |
1999 | - if(aTopic != "nsPref:changed") return; |
2000 | - // aSubject is the nsIPrefBranch we're observing (after appropriate QI) |
2001 | - // aData is the name of the pref that's been changed (relative to aSubject) |
2002 | - switch (aData) { |
2003 | - case "ignored_uris": |
2004 | - // extensions.zeitgeist.ignored_uris was changed |
2005 | - pattern = this.get_string(aData); |
2006 | - // alert(pattern); |
2007 | - ignored_uris = make_pattern(pattern); |
2008 | - break; |
2009 | - case "enable_googlemail": |
2010 | - enable_googlemail = this.get_bool(aData); |
2011 | - //alert("changed gmail to"+enable_googlemail); |
2012 | - break |
2013 | - } |
2014 | - }, |
2015 | - get_string: function(key) { |
2016 | - try { |
2017 | - return JSON.parse(this._branch.getCharPref(key)); |
2018 | - } catch(err) { |
2019 | - // this means there is no such config value |
2020 | - // ignoring this error |
2021 | - //alert(key + " : " + err); |
2022 | - }; |
2023 | - }, |
2024 | - get_bool: function(key) { |
2025 | - try { |
2026 | - return this._branch.getBoolPref(key); |
2027 | - } catch(err) { |
2028 | - // this means there is no such config value |
2029 | - // ignoring this error |
2030 | - //alert(key + " : " + err); |
2031 | - }; |
2032 | - } |
2033 | - } |
2034 | - ZeitgeistPrefObserver.register(); |
2035 | - ignored_uris = make_pattern(ZeitgeistPrefObserver.get_string("ignored_uris")); |
2036 | - debug("We are ignoring this uris: " + ignored_uris); |
2037 | - var enable_googlemail = ZeitgeistPrefObserver.get_bool("enable_googlemail"); |
2038 | - debug("the googlemail handler extension is activated? ["+enable_googlemail+"]"); |
2039 | - |
2040 | - ignore_uri = function(uri) { |
2041 | - for (pattern in ignored_uris) { |
2042 | - if (ignored_uris[pattern].test(uri)) { |
2043 | - // alert("ignored " + uri); |
2044 | - return true; |
2045 | - }; |
2046 | - }; |
2047 | - return false; |
2048 | - }; |
2049 | - |
2050 | - try { |
2051 | - if(zeitgeistgluexpcominterface == null) { |
2052 | - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); |
2053 | - zeitgeistgluexpcominterface = Components. |
2054 | - classes["@zeitgeist-project.com/DATAPROVIDER/firefox-xpcom;1"]. |
2055 | - createInstance(Components.interfaces.zeitgeist); |
2056 | - } |
2057 | - } catch(err) { |
2058 | - alert(err); |
2059 | - } |
2060 | - |
2061 | - var ZeitgeistProgressListener = { |
2062 | - onStateChange: function(aBrowser, aProgress, aRequest, aStateFlags) { |
2063 | - var inPrivateBrowsingMode = pbs.privateBrowsingEnabled; |
2064 | - if (inPrivateBrowsingMode) return; |
2065 | - if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP) { |
2066 | - var uri = aBrowser.currentURI.spec; |
2067 | - var mimetype = aBrowser.contentDocument.contentType; |
2068 | - if (aRequest.name == uri && !ignore_uri(uri)) { |
2069 | - zeitgeistgluexpcominterface.insert( |
2070 | - uri, |
2071 | - mimetype, |
2072 | - aBrowser.contentTitle |
2073 | - ); |
2074 | - //alert("THATS WHAT WE HAVE "+enable_googlemail+" | "+uri+" | "+(enable_googlemail & googlemail_view_regex.test(uri))); |
2075 | - if (enable_googlemail & googlemail_view_regex.test(uri)) { |
2076 | - debug("let's begin the google fun'"); |
2077 | - var dmt = aBrowser.contentDocument; |
2078 | - var head = dmt.getElementsByTagName("title")[0]; |
2079 | - head.addEventListener("DOMSubtreeModified", function(event){ |
2080 | - if (dmt.title) { |
2081 | - zeitgeistgluexpcominterface.insert( |
2082 | - dmt.location.href, |
2083 | - dmt.contentType, |
2084 | - dmt.title |
2085 | - ); |
2086 | - }; |
2087 | - }, false); |
2088 | - } |
2089 | - } |
2090 | - } |
2091 | - }, |
2092 | - // we don't implement this methods |
2093 | - onStatusChange: function(){}, |
2094 | - onLocationChange: function(){}, |
2095 | - onSecurityChange: function(){}, |
2096 | - onProgressChange: function(){}, |
2097 | - }; |
2098 | - |
2099 | - |
2100 | - var zeitgeist = { |
2101 | - init: function() { |
2102 | - gBrowser.addTabsProgressListener(ZeitgeistProgressListener); |
2103 | - }, |
2104 | - uninit: function() { |
2105 | - gBrowser.removeTabsProgressListener(ZeitgeistProgressListener); |
2106 | - }, |
2107 | - }; |
2108 | - |
2109 | - window.addEventListener("load", function() {zeitgeist.init()}, false); |
2110 | - window.addEventListener("unload", function() {zeitgeist.uninit()}, false); |
2111 | - |
2112 | - ]]></script> |
2113 | -</overlay> |
2114 | |
2115 | === removed directory 'firefox-libzg/extension/components' |
2116 | === removed file 'firefox-libzg/extension/components/Makefile.am' |
2117 | --- firefox-libzg/extension/components/Makefile.am 2011-05-02 18:47:16 +0000 |
2118 | +++ firefox-libzg/extension/components/Makefile.am 1970-01-01 00:00:00 +0000 |
2119 | @@ -1,60 +0,0 @@ |
2120 | -zeitgeistmoduledir = $(libdir)/xul-ext-zeitgeist |
2121 | -zeitgeistmodule_LTLIBRARIES = libzeitgeist_xpcom.la |
2122 | -zeitgeistmodule_DATA = zeitgeist.xpt |
2123 | - |
2124 | -xul_extdir = $(datadir)/xul-ext-zeitgeist |
2125 | - |
2126 | -libzeitgeist_xpcom_la_SOURCES = \ |
2127 | - ZeitgeistComponent.cpp \ |
2128 | - ZeitgeistModule.cpp \ |
2129 | - $(NULL) |
2130 | - |
2131 | -libzeitgeist_xpcom_la_CXXFLAGS = \ |
2132 | - -include "xpcom-config.h" \ |
2133 | - $(ZEITGEIST_CFLAGS) \ |
2134 | - $(LIBXUL_2_0_CFLAGS) \ |
2135 | - $(NULL) |
2136 | - |
2137 | -libzeitgeist_xpcom_la_LIBADD = \ |
2138 | - $(ZEITGEIST_LIBS) \ |
2139 | - $(LIBXUL_2_0_LIBS) \ |
2140 | - $(NULL) |
2141 | - |
2142 | -libzeitgeist_xpcom_la_LDFLAGS = \ |
2143 | - -module -avoid-version \ |
2144 | - $(NULL) |
2145 | - |
2146 | -BUILT_SOURCES = \ |
2147 | - zeitgeist-library.h \ |
2148 | - zeitgeist.h \ |
2149 | - zeitgeist.xpt \ |
2150 | - $(NULL) |
2151 | - |
2152 | -EXTRA_DIST = \ |
2153 | - zeitgeist.idl \ |
2154 | - zeitgeistextend.h \ |
2155 | - $(NULL) |
2156 | - |
2157 | -DISTCLEANFILES = \ |
2158 | - $(BUILT_SOURCES) \ |
2159 | - $(NULL) |
2160 | - |
2161 | - |
2162 | -zeitgeist.h: zeitgeist.idl |
2163 | - $(AM_V_GEN)$(XPIDL_BIN) -m header -I $(XUL_IDLDIR) -o zeitgeist $< |
2164 | - |
2165 | -zeitgeist.xpt: zeitgeist.idl |
2166 | - $(AM_V_GEN)$(XPIDL_BIN) -m typelib -I $(XUL_IDLDIR) -o zeitgeist $< |
2167 | - |
2168 | -zeitgeist-library.h: |
2169 | - $(AM_V_GEN)$(LN_S) "`$(PKG_CONFIG) --variable includedir zeitgeist-1.0`/zeitgeist-1.0/zeitgeist.h" $@ |
2170 | - |
2171 | -install-exec-hook: |
2172 | - test -d $(DESTDIR)$(xul_extdir) || $(MKDIR_P) $(DESTDIR)$(xul_extdir) |
2173 | - test -h $(DESTDIR)$(xul_extdir)/components || $(LN_S) -f $(DESTDIR)$(zeitgeistmoduledir) $(DESTDIR)$(xul_extdir)/components |
2174 | - |
2175 | -# small helper with local install |
2176 | -local-install: all |
2177 | - cp .libs/libzeitgeist_xpcom.so ./ |
2178 | - |
2179 | -local-uninstall: ; |
2180 | |
2181 | === removed file 'firefox-libzg/extension/components/ZeitgeistComponent.cpp' |
2182 | --- firefox-libzg/extension/components/ZeitgeistComponent.cpp 2011-04-29 20:41:04 +0000 |
2183 | +++ firefox-libzg/extension/components/ZeitgeistComponent.cpp 1970-01-01 00:00:00 +0000 |
2184 | @@ -1,50 +0,0 @@ |
2185 | -/* |
2186 | - * ZeitgeistComponent.cpp |
2187 | - * This file is part of zeitgeist dataprovider for firefox |
2188 | - * |
2189 | - * Copyright (C) 2010 - Markus Korn <thekorn@gmx.de> |
2190 | - * |
2191 | - * zeitgeist dataprovider for firefox is free software; you can redistribute it and/or |
2192 | - * modify it under the terms of the GNU Lesser General Public |
2193 | - * License as published by the Free Software Foundation; either |
2194 | - * version 3 of the License, or (at your option) any later version. |
2195 | - * |
2196 | - * zeitgeist dataprovider for firefox is distributed in the hope that it will be useful, |
2197 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2198 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2199 | - * Lesser General Public License for more details. |
2200 | - * |
2201 | - * You should have received a copy of the GNU Lesser General Public |
2202 | - * License along with this library; if not, write to the Free Software |
2203 | - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
2204 | - */ |
2205 | - |
2206 | - |
2207 | -#include "mozilla/ModuleUtils.h" |
2208 | -#include "zeitgeist.h" |
2209 | -#include "zeitgeistextend.h" |
2210 | - |
2211 | -NS_GENERIC_FACTORY_CONSTRUCTOR(zeitgeistextend) |
2212 | - |
2213 | -NS_DEFINE_NAMED_CID(ZEITGEIST_COMPONENT_CID); |
2214 | - |
2215 | -static const mozilla::Module::CIDEntry kZeitgeistCIDs[] = { |
2216 | - { &kZEITGEIST_COMPONENT_CID, false, NULL, zeitgeistextendConstructor }, |
2217 | - { NULL } |
2218 | -}; |
2219 | - |
2220 | -static const mozilla::Module::ContractIDEntry kZeitgeistContracts[] = { |
2221 | - { ZEITGEIST_COMPONENT_CONTRACTID, &kZEITGEIST_COMPONENT_CID }, |
2222 | - { NULL } |
2223 | -}; |
2224 | - |
2225 | -static const mozilla::Module kZeitgeistModule = { |
2226 | - mozilla::Module::kVersion, |
2227 | - kZeitgeistCIDs, |
2228 | - kZeitgeistContracts, |
2229 | - NULL |
2230 | -}; |
2231 | - |
2232 | -NSMODULE_DEFN(ZeitgeistModule) = &kZeitgeistModule; |
2233 | - |
2234 | -NS_IMPL_MOZILLA192_NSGETMODULE(&kZeitgeistModule) |
2235 | |
2236 | === removed file 'firefox-libzg/extension/components/ZeitgeistModule.cpp' |
2237 | --- firefox-libzg/extension/components/ZeitgeistModule.cpp 2010-05-28 17:56:06 +0000 |
2238 | +++ firefox-libzg/extension/components/ZeitgeistModule.cpp 1970-01-01 00:00:00 +0000 |
2239 | @@ -1,86 +0,0 @@ |
2240 | -/* |
2241 | - * ZeitgeistModule.cpp |
2242 | - * This file is part of zeitgeist dataprovider for firefox |
2243 | - * |
2244 | - * Copyright (C) 2010 - Markus Korn <thekorn@gmx.de> |
2245 | - * Copyright (C) 2010 - Michal Hruby <michal.mhr@gmail.com> |
2246 | - * |
2247 | - * zeitgeist dataprovider for firefox is free software; you can redistribute it and/or |
2248 | - * modify it under the terms of the GNU Lesser General Public |
2249 | - * License as published by the Free Software Foundation; either |
2250 | - * version 3 of the License, or (at your option) any later version. |
2251 | - * |
2252 | - * zeitgeist dataprovider for firefox is distributed in the hope that it will be useful, |
2253 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2254 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2255 | - * Lesser General Public License for more details. |
2256 | - * |
2257 | - * You should have received a copy of the GNU Lesser General Public |
2258 | - * License along with this library; if not, write to the Free Software |
2259 | - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
2260 | - */ |
2261 | - |
2262 | - |
2263 | -#include "zeitgeist.h" |
2264 | -#include "zeitgeistextend.h" |
2265 | - |
2266 | -#include <nsStringAPI.h> |
2267 | -#include <glib.h> |
2268 | -#include <glib-object.h> |
2269 | -#include <zeitgeist.h> |
2270 | - |
2271 | - |
2272 | -using namespace std; |
2273 | - |
2274 | -NS_IMPL_ISUPPORTS1(zeitgeistextend, zeitgeist) |
2275 | - |
2276 | -zeitgeistextend::zeitgeistextend() |
2277 | -{ |
2278 | - g_debug("constructor of zeitgeistextend"); |
2279 | - g_type_init (); |
2280 | - |
2281 | - log = (ZeitgeistLog *)g_object_new (ZEITGEIST_TYPE_LOG, NULL); |
2282 | -} |
2283 | - |
2284 | -zeitgeistextend::~zeitgeistextend() |
2285 | -{ |
2286 | - g_debug("destructor of zeitgeistextend"); |
2287 | -} |
2288 | - |
2289 | -NS_IMETHODIMP zeitgeistextend::Insert(const char *url, |
2290 | - const char *mimetype, |
2291 | - const nsACString &title_str) |
2292 | -{ |
2293 | - ZeitgeistEvent *event; |
2294 | - gchar *title = NULL; |
2295 | - |
2296 | - g_debug("zeitgeist start - creating event"); |
2297 | - |
2298 | - if (!title_str.IsEmpty ()) |
2299 | - { |
2300 | - gsize title_len = title_str.EndReading () - title_str.BeginReading (); |
2301 | - title = g_strndup (title_str.BeginReading (), title_len); |
2302 | - } |
2303 | - |
2304 | - event = zeitgeist_event_new_full ( |
2305 | - ZEITGEIST_ZG_ACCESS_EVENT, |
2306 | - ZEITGEIST_ZG_USER_ACTIVITY, |
2307 | - "application://firefox.desktop", |
2308 | - zeitgeist_subject_new_full ( |
2309 | - url, |
2310 | - ZEITGEIST_NFO_WEBSITE, |
2311 | - ZEITGEIST_NFO_REMOTE_DATA_OBJECT, |
2312 | - mimetype, |
2313 | - url, |
2314 | - title, |
2315 | - "net"), |
2316 | - NULL); |
2317 | - |
2318 | - if (title) g_free (title); |
2319 | - g_debug("inserting event"); |
2320 | - zeitgeist_log_insert_events_no_reply(log, event, NULL); |
2321 | - g_debug("zeitgeist end"); |
2322 | - |
2323 | - return NS_OK; |
2324 | -} |
2325 | - |
2326 | |
2327 | === removed file 'firefox-libzg/extension/components/zeitgeist.idl' |
2328 | --- firefox-libzg/extension/components/zeitgeist.idl 2010-05-14 16:34:36 +0000 |
2329 | +++ firefox-libzg/extension/components/zeitgeist.idl 1970-01-01 00:00:00 +0000 |
2330 | @@ -1,30 +0,0 @@ |
2331 | -/* |
2332 | - * zeitgeist.idl |
2333 | - * This file is part of zeitgeist dataprovider for firefox |
2334 | - * |
2335 | - * Copyright (C) 2010 - Markus Korn <thekorn@gmx.de> |
2336 | - * Copyright (C) 2010 - Michal Hruby <michal.mhr@gmail.com> |
2337 | - * |
2338 | - * zeitgeist dataprovider for firefox is free software; you can redistribute it and/or |
2339 | - * modify it under the terms of the GNU Lesser General Public |
2340 | - * License as published by the Free Software Foundation; either |
2341 | - * version 3 of the License, or (at your option) any later version. |
2342 | - * |
2343 | - * zeitgeist dataprovider for firefox is distributed in the hope that it will be useful, |
2344 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2345 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2346 | - * Lesser General Public License for more details. |
2347 | - * |
2348 | - * You should have received a copy of the GNU Lesser General Public |
2349 | - * License along with this library; if not, write to the Free Software |
2350 | - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
2351 | - */ |
2352 | - |
2353 | - |
2354 | -#include "nsISupports.idl" |
2355 | -[scriptable, uuid(d879c08c-517d-44f0-83e1-3ef75a527ddf)] |
2356 | -interface zeitgeist : nsISupports |
2357 | -{ |
2358 | - void insert(in string url, in string mimetype, in AUTF8String title); |
2359 | -}; |
2360 | - |
2361 | |
2362 | === removed file 'firefox-libzg/extension/components/zeitgeistextend.h' |
2363 | --- firefox-libzg/extension/components/zeitgeistextend.h 2010-06-08 00:24:42 +0000 |
2364 | +++ firefox-libzg/extension/components/zeitgeistextend.h 1970-01-01 00:00:00 +0000 |
2365 | @@ -1,45 +0,0 @@ |
2366 | -/* |
2367 | - * zeitgeistextend.h |
2368 | - * This file is part of zeitgeist dataprovider for firefox |
2369 | - * |
2370 | - * Copyright (C) 2010 - Markus Korn <thekorn@gmx.de> |
2371 | - * |
2372 | - * zeitgeist dataprovider for firefox is free software; you can redistribute it and/or |
2373 | - * modify it under the terms of the GNU Lesser General Public |
2374 | - * License as published by the Free Software Foundation; either |
2375 | - * version 3 of the License, or (at your option) any later version. |
2376 | - * |
2377 | - * zeitgeist dataprovider for firefox is distributed in the hope that it will be useful, |
2378 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2379 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2380 | - * Lesser General Public License for more details. |
2381 | - * |
2382 | - * You should have received a copy of the GNU Lesser General Public |
2383 | - * License along with this library; if not, write to the Free Software |
2384 | - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
2385 | - */ |
2386 | - |
2387 | - |
2388 | -#ifndef _ZEITGEISTEXTEND_H_ |
2389 | -#define _ZEITGEISTEXTEND_H_ |
2390 | - |
2391 | -#include "zeitgeist.h" |
2392 | -#include "zeitgeist-library.h" |
2393 | - |
2394 | -#define ZEITGEIST_COMPONENT_CONTRACTID "@zeitgeist-project.com/DATAPROVIDER/firefox-xpcom;1" |
2395 | -#define ZEITGEIST_COMPONENT_CLASSNAME "zeitgeist dataprovider for firefox" |
2396 | -#define ZEITGEIST_COMPONENT_CID { 0xd879c08c, 0x517d, 0x44f0, { 0x83, 0xe1, 0x3e, 0xf7, 0x5a, 0x52, 0x7d, 0xdf } } |
2397 | - |
2398 | -//d879c08c-517d-44f0-83e1-3ef75a527ddf |
2399 | -class zeitgeistextend : public zeitgeist |
2400 | -{ |
2401 | - public: |
2402 | - NS_DECL_ISUPPORTS |
2403 | - NS_DECL_ZEITGEIST |
2404 | - |
2405 | - zeitgeistextend(); |
2406 | - virtual ~zeitgeistextend(); |
2407 | - ZeitgeistLog *log; |
2408 | - |
2409 | -}; |
2410 | -#endif |
2411 | |
2412 | === removed directory 'firefox-libzg/extension/defaults' |
2413 | === removed directory 'firefox-libzg/extension/defaults/preferences' |
2414 | === removed file 'firefox-libzg/extension/defaults/preferences/zeitgeist.js' |
2415 | --- firefox-libzg/extension/defaults/preferences/zeitgeist.js 2010-05-20 18:33:46 +0000 |
2416 | +++ firefox-libzg/extension/defaults/preferences/zeitgeist.js 1970-01-01 00:00:00 +0000 |
2417 | @@ -1,2 +0,0 @@ |
2418 | -pref("extensions.zeitgeist.ignored_uris", "[\"^about:*\"]"); |
2419 | -pref("extensions.zeitgeist.enable_googlemail", false); |
2420 | |
2421 | === removed file 'firefox-libzg/extension/install.rdf' |
2422 | --- firefox-libzg/extension/install.rdf 2011-05-02 20:13:34 +0000 |
2423 | +++ firefox-libzg/extension/install.rdf 1970-01-01 00:00:00 +0000 |
2424 | @@ -1,28 +0,0 @@ |
2425 | -<?xml version="1.0"?> |
2426 | - |
2427 | -<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
2428 | - xmlns:em="http://www.mozilla.org/2004/em-rdf#"> |
2429 | - |
2430 | - <Description about="urn:mozilla:install-manifest"> |
2431 | - <em:id>xpcom_firefox@zeitgeist-project.com</em:id> |
2432 | - <em:version>0.3</em:version> |
2433 | - <em:type>2</em:type> |
2434 | - |
2435 | - <!-- Target Application this extension can install into, |
2436 | - with minimum and maximum supported versions. --> |
2437 | - <em:targetApplication> |
2438 | - <Description> |
2439 | - <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> |
2440 | - <em:minVersion>4.0</em:minVersion> |
2441 | - <em:maxVersion>4.0.*</em:maxVersion> |
2442 | - </Description> |
2443 | - </em:targetApplication> |
2444 | - |
2445 | - <!-- Front End MetaData --> |
2446 | - <em:name>zeitgeist</em:name> |
2447 | - <em:description>dataprovider for the zeitgeist framework, using xpcom and libzeitgeist</em:description> |
2448 | - <em:creator>Markus Korn</em:creator> |
2449 | - <em:homepageURL>http://launchpad.net/zeitgeist</em:homepageURL> |
2450 | - <em:iconURL>chrome://zeitgeist/content/zeitgeist.png</em:iconURL> |
2451 | - </Description> |
2452 | -</RDF> |
2453 | |
2454 | === removed file 'firefox-libzg/extension/license.txt' |
2455 | --- firefox-libzg/extension/license.txt 2010-05-12 06:44:01 +0000 |
2456 | +++ firefox-libzg/extension/license.txt 1970-01-01 00:00:00 +0000 |
2457 | @@ -1,166 +0,0 @@ |
2458 | - GNU LESSER GENERAL PUBLIC LICENSE |
2459 | - Version 3, 29 June 2007 |
2460 | - |
2461 | - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> |
2462 | - Everyone is permitted to copy and distribute verbatim copies |
2463 | - of this license document, but changing it is not allowed. |
2464 | - |
2465 | - |
2466 | - This version of the GNU Lesser General Public License incorporates |
2467 | -the terms and conditions of version 3 of the GNU General Public |
2468 | -License, supplemented by the additional permissions listed below. |
2469 | - |
2470 | - 0. Additional Definitions. |
2471 | - |
2472 | - As used herein, "this License" refers to version 3 of the GNU Lesser |
2473 | -General Public License, and the "GNU GPL" refers to version 3 of the GNU |
2474 | -General Public License. |
2475 | - |
2476 | - "The Library" refers to a covered work governed by this License, |
2477 | -other than an Application or a Combined Work as defined below. |
2478 | - |
2479 | - An "Application" is any work that makes use of an interface provided |
2480 | -by the Library, but which is not otherwise based on the Library. |
2481 | -Defining a subclass of a class defined by the Library is deemed a mode |
2482 | -of using an interface provided by the Library. |
2483 | - |
2484 | - A "Combined Work" is a work produced by combining or linking an |
2485 | -Application with the Library. The particular version of the Library |
2486 | -with which the Combined Work was made is also called the "Linked |
2487 | -Version". |
2488 | - |
2489 | - The "Minimal Corresponding Source" for a Combined Work means the |
2490 | -Corresponding Source for the Combined Work, excluding any source code |
2491 | -for portions of the Combined Work that, considered in isolation, are |
2492 | -based on the Application, and not on the Linked Version. |
2493 | - |
2494 | - The "Corresponding Application Code" for a Combined Work means the |
2495 | -object code and/or source code for the Application, including any data |
2496 | -and utility programs needed for reproducing the Combined Work from the |
2497 | -Application, but excluding the System Libraries of the Combined Work. |
2498 | - |
2499 | - 1. Exception to Section 3 of the GNU GPL. |
2500 | - |
2501 | - You may convey a covered work under sections 3 and 4 of this License |
2502 | -without being bound by section 3 of the GNU GPL. |
2503 | - |
2504 | - 2. Conveying Modified Versions. |
2505 | - |
2506 | - If you modify a copy of the Library, and, in your modifications, a |
2507 | -facility refers to a function or data to be supplied by an Application |
2508 | -that uses the facility (other than as an argument passed when the |
2509 | -facility is invoked), then you may convey a copy of the modified |
2510 | -version: |
2511 | - |
2512 | - a) under this License, provided that you make a good faith effort to |
2513 | - ensure that, in the event an Application does not supply the |
2514 | - function or data, the facility still operates, and performs |
2515 | - whatever part of its purpose remains meaningful, or |
2516 | - |
2517 | - b) under the GNU GPL, with none of the additional permissions of |
2518 | - this License applicable to that copy. |
2519 | - |
2520 | - 3. Object Code Incorporating Material from Library Header Files. |
2521 | - |
2522 | - The object code form of an Application may incorporate material from |
2523 | -a header file that is part of the Library. You may convey such object |
2524 | -code under terms of your choice, provided that, if the incorporated |
2525 | -material is not limited to numerical parameters, data structure |
2526 | -layouts and accessors, or small macros, inline functions and templates |
2527 | -(ten or fewer lines in length), you do both of the following: |
2528 | - |
2529 | - a) Give prominent notice with each copy of the object code that the |
2530 | - Library is used in it and that the Library and its use are |
2531 | - covered by this License. |
2532 | - |
2533 | - b) Accompany the object code with a copy of the GNU GPL and this license |
2534 | - document. |
2535 | - |
2536 | - 4. Combined Works. |
2537 | - |
2538 | - You may convey a Combined Work under terms of your choice that, |
2539 | -taken together, effectively do not restrict modification of the |
2540 | -portions of the Library contained in the Combined Work and reverse |
2541 | -engineering for debugging such modifications, if you also do each of |
2542 | -the following: |
2543 | - |
2544 | - a) Give prominent notice with each copy of the Combined Work that |
2545 | - the Library is used in it and that the Library and its use are |
2546 | - covered by this License. |
2547 | - |
2548 | - b) Accompany the Combined Work with a copy of the GNU GPL and this license |
2549 | - document. |
2550 | - |
2551 | - c) For a Combined Work that displays copyright notices during |
2552 | - execution, include the copyright notice for the Library among |
2553 | - these notices, as well as a reference directing the user to the |
2554 | - copies of the GNU GPL and this license document. |
2555 | - |
2556 | - d) Do one of the following: |
2557 | - |
2558 | - 0) Convey the Minimal Corresponding Source under the terms of this |
2559 | - License, and the Corresponding Application Code in a form |
2560 | - suitable for, and under terms that permit, the user to |
2561 | - recombine or relink the Application with a modified version of |
2562 | - the Linked Version to produce a modified Combined Work, in the |
2563 | - manner specified by section 6 of the GNU GPL for conveying |
2564 | - Corresponding Source. |
2565 | - |
2566 | - 1) Use a suitable shared library mechanism for linking with the |
2567 | - Library. A suitable mechanism is one that (a) uses at run time |
2568 | - a copy of the Library already present on the user's computer |
2569 | - system, and (b) will operate properly with a modified version |
2570 | - of the Library that is interface-compatible with the Linked |
2571 | - Version. |
2572 | - |
2573 | - e) Provide Installation Information, but only if you would otherwise |
2574 | - be required to provide such information under section 6 of the |
2575 | - GNU GPL, and only to the extent that such information is |
2576 | - necessary to install and execute a modified version of the |
2577 | - Combined Work produced by recombining or relinking the |
2578 | - Application with a modified version of the Linked Version. (If |
2579 | - you use option 4d0, the Installation Information must accompany |
2580 | - the Minimal Corresponding Source and Corresponding Application |
2581 | - Code. If you use option 4d1, you must provide the Installation |
2582 | - Information in the manner specified by section 6 of the GNU GPL |
2583 | - for conveying Corresponding Source.) |
2584 | - |
2585 | - 5. Combined Libraries. |
2586 | - |
2587 | - You may place library facilities that are a work based on the |
2588 | -Library side by side in a single library together with other library |
2589 | -facilities that are not Applications and are not covered by this |
2590 | -License, and convey such a combined library under terms of your |
2591 | -choice, if you do both of the following: |
2592 | - |
2593 | - a) Accompany the combined library with a copy of the same work based |
2594 | - on the Library, uncombined with any other library facilities, |
2595 | - conveyed under the terms of this License. |
2596 | - |
2597 | - b) Give prominent notice with the combined library that part of it |
2598 | - is a work based on the Library, and explaining where to find the |
2599 | - accompanying uncombined form of the same work. |
2600 | - |
2601 | - 6. Revised Versions of the GNU Lesser General Public License. |
2602 | - |
2603 | - The Free Software Foundation may publish revised and/or new versions |
2604 | -of the GNU Lesser General Public License from time to time. Such new |
2605 | -versions will be similar in spirit to the present version, but may |
2606 | -differ in detail to address new problems or concerns. |
2607 | - |
2608 | - Each version is given a distinguishing version number. If the |
2609 | -Library as you received it specifies that a certain numbered version |
2610 | -of the GNU Lesser General Public License "or any later version" |
2611 | -applies to it, you have the option of following the terms and |
2612 | -conditions either of that published version or of any later version |
2613 | -published by the Free Software Foundation. If the Library as you |
2614 | -received it does not specify a version number of the GNU Lesser |
2615 | -General Public License, you may choose any version of the GNU Lesser |
2616 | -General Public License ever published by the Free Software Foundation. |
2617 | - |
2618 | - If the Library as you received it specifies that a proxy can decide |
2619 | -whether future versions of the GNU Lesser General Public License shall |
2620 | -apply, that proxy's public statement of acceptance of any version is |
2621 | -permanent authorization for you to choose that version for the |
2622 | -Library. |
2623 | - |
Hi Manish
Please fix configure.ac. Currently it asks for "libxul >= 1.92" where libxul is 1.9.2.* now.
Thanks