mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
WinCE bustage fix.
This commit is contained in:
parent
0eb394261e
commit
e9c0057a90
@ -81,7 +81,7 @@ CPPSRCS += MaemoLocationProvider.cpp
|
|||||||
LOCAL_INCLUDES += $(MOZ_LOCATION_CFLAGS)
|
LOCAL_INCLUDES += $(MOZ_LOCATION_CFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef WINCE
|
ifdef WINCE_WINDOWS_MOBILE
|
||||||
CPPSRCS += WinMobileLocationProvider.cpp
|
CPPSRCS += WinMobileLocationProvider.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
#include "MaemoLocationProvider.h"
|
#include "MaemoLocationProvider.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WINCE
|
#ifdef WINCE_WINDOWS_MOBILE
|
||||||
#include "WinMobileLocationProvider.h"
|
#include "WinMobileLocationProvider.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -370,7 +370,7 @@ nsGeolocationService::nsGeolocationService()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// if WINCE, see if we should try the WINCE location provider
|
// if WINCE, see if we should try the WINCE location provider
|
||||||
#ifdef WINCE
|
#ifdef WINCE_WINDOWS_MOBILE
|
||||||
if (!mProvider){
|
if (!mProvider){
|
||||||
mProvider = new WinMobileLocationProvider();
|
mProvider = new WinMobileLocationProvider();
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,10 @@
|
|||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
#include <objbase.h>
|
#include <objbase.h>
|
||||||
|
|
||||||
|
#ifdef WINCE_WINDOWS_MOBILE
|
||||||
#include <connmgr.h>
|
#include <connmgr.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "nsAutodialWinCE.h"
|
#include "nsAutodialWinCE.h"
|
||||||
|
|
||||||
@ -66,6 +69,7 @@ nsRASAutodial::Init()
|
|||||||
|
|
||||||
nsresult nsRASAutodial::DialDefault(const PRUnichar* /* hostName */)
|
nsresult nsRASAutodial::DialDefault(const PRUnichar* /* hostName */)
|
||||||
{
|
{
|
||||||
|
#ifdef WINCE_WINDOWS_MOBILE
|
||||||
HANDLE connectionHandle;
|
HANDLE connectionHandle;
|
||||||
|
|
||||||
// Make the connection to the new network
|
// Make the connection to the new network
|
||||||
@ -101,10 +105,17 @@ nsresult nsRASAutodial::DialDefault(const PRUnichar* /* hostName */)
|
|||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
#else
|
||||||
|
return NS_ERROR_FAILURE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
PRBool
|
PRBool
|
||||||
nsRASAutodial::ShouldDialOnNetworkError()
|
nsRASAutodial::ShouldDialOnNetworkError()
|
||||||
{
|
{
|
||||||
|
#ifdef WINCE_WINDOWS_MOBILE
|
||||||
return PR_TRUE;
|
return PR_TRUE;
|
||||||
|
#else
|
||||||
|
return PR_FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,9 @@
|
|||||||
#include "nsIObserverService.h"
|
#include "nsIObserverService.h"
|
||||||
|
|
||||||
#include <objbase.h>
|
#include <objbase.h>
|
||||||
|
#ifdef WINCE_WINDOWS_MOBILE
|
||||||
#include <connmgr.h>
|
#include <connmgr.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
// pulled from the header so that we do not get multiple define errors during link
|
// pulled from the header so that we do not get multiple define errors during link
|
||||||
static const GUID nal_DestNetInternet =
|
static const GUID nal_DestNetInternet =
|
||||||
@ -16,24 +18,32 @@ NS_IMPL_THREADSAFE_ISUPPORTS2(nsNotifyAddrListener,
|
|||||||
nsITimerCallback)
|
nsITimerCallback)
|
||||||
|
|
||||||
nsNotifyAddrListener::nsNotifyAddrListener()
|
nsNotifyAddrListener::nsNotifyAddrListener()
|
||||||
|
#ifdef wINCE_WINDOWS_MOBILE
|
||||||
: mLinkUp(PR_FALSE) // assume false by default
|
: mLinkUp(PR_FALSE) // assume false by default
|
||||||
, mStatusKnown(PR_FALSE)
|
, mStatusKnown(PR_FALSE)
|
||||||
|
#else
|
||||||
|
: mLinkUp(PR_TRUE) // assume true by default on non-WinMo
|
||||||
|
, mStatusKnown(PR_TRUE)
|
||||||
|
#endif
|
||||||
, mConnectionHandle(NULL)
|
, mConnectionHandle(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
nsNotifyAddrListener::~nsNotifyAddrListener()
|
nsNotifyAddrListener::~nsNotifyAddrListener()
|
||||||
{
|
{
|
||||||
|
#ifdef WINCE_WINDOWS_MOBILE
|
||||||
if (mConnectionHandle)
|
if (mConnectionHandle)
|
||||||
ConnMgrReleaseConnection(mConnectionHandle, 0);
|
ConnMgrReleaseConnection(mConnectionHandle, 0);
|
||||||
|
|
||||||
if (mTimer)
|
if (mTimer)
|
||||||
mTimer->Cancel();
|
mTimer->Cancel();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsNotifyAddrListener::Init(void)
|
nsNotifyAddrListener::Init(void)
|
||||||
{
|
{
|
||||||
|
#ifdef WINCE_WINDOWS_MOBILE
|
||||||
CONNMGR_CONNECTIONINFO conn_info;
|
CONNMGR_CONNECTIONINFO conn_info;
|
||||||
memset(&conn_info, 0, sizeof(conn_info));
|
memset(&conn_info, 0, sizeof(conn_info));
|
||||||
|
|
||||||
@ -52,6 +62,7 @@ nsNotifyAddrListener::Init(void)
|
|||||||
mTimer->InitWithCallback(this,
|
mTimer->InitWithCallback(this,
|
||||||
15*1000, // every 15 seconds
|
15*1000, // every 15 seconds
|
||||||
nsITimer::TYPE_REPEATING_SLACK);
|
nsITimer::TYPE_REPEATING_SLACK);
|
||||||
|
#endif
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,6 +83,7 @@ nsNotifyAddrListener::GetLinkStatusKnown(PRBool *aIsUp)
|
|||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsNotifyAddrListener::Notify(nsITimer* aTimer)
|
nsNotifyAddrListener::Notify(nsITimer* aTimer)
|
||||||
{
|
{
|
||||||
|
#ifdef WINCE_WINDOWS_MOBILE
|
||||||
DWORD status;
|
DWORD status;
|
||||||
HRESULT result = ConnMgrConnectionStatus(mConnectionHandle, &status);
|
HRESULT result = ConnMgrConnectionStatus(mConnectionHandle, &status);
|
||||||
|
|
||||||
@ -101,5 +113,6 @@ nsNotifyAddrListener::Notify(nsITimer* aTimer)
|
|||||||
observerService->NotifyObservers(static_cast<nsINetworkLinkService*>(this),
|
observerService->NotifyObservers(static_cast<nsINetworkLinkService*>(this),
|
||||||
NS_NETWORK_LINK_TOPIC,
|
NS_NETWORK_LINK_TOPIC,
|
||||||
NS_ConvertASCIItoUTF16(event).get());
|
NS_ConvertASCIItoUTF16(event).get());
|
||||||
|
#endif
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user