Closed Bug 446089 Opened 12 years ago Closed 12 years ago

expose some osso context functionality


(Toolkit :: Startup and Profile System, defect)

Not set





(Reporter: dougt, Assigned: dougt)




(1 file, 3 obsolete files)

we need to expose the osso_context returned after a successful call to osso_initialize() so that other parts of mozilla can make use of other libosso functions.

the initial customer of this will be the idle service which, on desktop linux, uses the x screen saver (xss).  The xss doesn't ship with osso devices, so we can't depend on it for figuring out idle time.  libosso does provide a hook to discover idle time however, needs the osso_context.  There is no global osso_context or function that gives you the right context. Hence, we need to expose it somehow.  (see bug 445267 for the idle service details.).
hmm.  i am thinking we shouldn't expose the context unless we have to.  For now, lets just catch and broadcast the events that are related to the osso_context (OOM, idle, and shutdown)
Summary: expose osso context → expose some osso context functionality
Attached patch patch v.1 (obsolete) — Splinter Review
Attachment #330954 - Flags: review?
Attachment #330954 - Flags: review? → review?(benjamin)
Comment on attachment 330954 [details] [diff] [review]
patch v.1

stuart mentioned i should change ns_literal_string for L""
Attached file patch v.2 (obsolete) —
detects hw changes and forward the appropriate notification.
Attachment #330954 - Attachment is obsolete: true
Attachment #330954 - Flags: review?(benjamin)
Comment on attachment 331241 [details]
patch v.2

wrong patch.
Attachment #331241 - Attachment is obsolete: true
Attachment #331241 - Attachment is patch: false
Attached patch patch v.2 (obsolete) — Splinter Review
Attachment #331242 - Flags: review?
Comment on attachment 331242 [details] [diff] [review]
patch v.2


should be L"low-memory"

why must state and ourState both be memory_low_ind in order to fire the memory pressure notification?  add some comments
using L"" results in:

/home/dougt/builds/mozilla/src/toolkit/xre/nsNativeAppSupportUnix.cpp:234: error: no matching function for call to 'nsDerivedSafe<nsIObserverService>::NotifyObservers(int, const char [16], const wchar_t [11])'

I could cast it away, but not sure of the harm of using the literal string class.
Attachment #331242 - Attachment is obsolete: true
Attachment #331242 - Flags: review?
Attachment #331258 - Attachment is patch: true
Attachment #331258 - Attachment mime type: application/octet-stream → text/plain
Attachment #331258 - Flags: review+

Closed: 12 years ago
Resolution: --- → FIXED
Component: XRE Startup → Startup and Profile System
QA Contact: xre.startup → startup
Duplicate of this bug: 427994
You need to log in before you can comment on or make changes to this bug.