mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 786419 - Part 12: Add getAppOfflineState to nsIIOService r=jduell
This commit is contained in:
parent
ba5dac5ccb
commit
cbaaddfa84
@ -106,6 +106,11 @@ interface nsIIOService : nsISupports
|
||||
*/
|
||||
boolean isAppOffline(in uint32_t appId);
|
||||
|
||||
/**
|
||||
* Returns the state of the app with the given appId.
|
||||
* returns nsIAppOfflineInfo::{ONLINE,OFFLINE,WIFI_ONLY}
|
||||
*/
|
||||
long getAppOfflineState(in uint32_t appId);
|
||||
|
||||
/**
|
||||
* Checks if a port number is banned. This involves consulting a list of
|
||||
|
@ -1505,6 +1505,22 @@ nsIOService::SetAppOfflineInternal(uint32_t aAppId, int32_t aState)
|
||||
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsIOService::GetAppOfflineState(uint32_t aAppId, int32_t *aResult)
|
||||
{
|
||||
NS_ENSURE_ARG(aResult);
|
||||
|
||||
if (aAppId == NECKO_NO_APP_ID ||
|
||||
aAppId == NECKO_UNKNOWN_APP_ID) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
*aResult = nsIAppOfflineInfo::ONLINE;
|
||||
mAppsOfflineStatus.Get(aAppId, aResult);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsIOService::IsAppOffline(uint32_t aAppId, bool* aResult)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user