Closed Bug 446089 Opened 11 years ago Closed 11 years ago
expose some osso context functionality
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
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""
detects hw changes and forward the appropriate notification.
Comment on attachment 331241 [details] patch v.2 wrong patch.
Comment on attachment 331242 [details] [diff] [review] patch v.2 NS_LITERAL_STRING("low-memory").get() 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 , const wchar_t )' I could cast it away, but not sure of the harm of using the literal string class.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Component: XRE Startup → Startup and Profile System
QA Contact: xre.startup → startup
You need to log in before you can comment on or make changes to this bug.