亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? wcegprs.cpp

?? Open DMT Client C Source code
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
// ----------------------------------------------------------------------------// Copyright 2006-2007, Martin D. Flynn// All rights reserved// ----------------------------------------------------------------------------//// Licensed under the Apache License, Version 2.0 (the "License");// you may not use this file except in compliance with the License.// You may obtain a copy of the License at// // http://www.apache.org/licenses/LICENSE-2.0// // Unless required by applicable law or agreed to in writing, software// distributed under the License is distributed on an "AS IS" BASIS,// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.// See the License for the specific language governing permissions and// limitations under the License.//// ----------------------------------------------------------------------------// Description://  WindowsCE specific controls for GPRS connectivity// Notes://  - This section is for the WindowsCE/Mobile implementation.//  - I'm still experimenting with the method used to invoke the GPRS connection//  facility of the WindowsCE platform.  If you see something that should be//  changed here, please let me know.//  - Note: even though the following appears to be gprs-centric, there is //  nothing here that mandates that the connection necessarily be GPRS.  [It//  could be any other 'connection' name defined by PROP_COMM_CONNECTION].//  - Modem may need initialization string://    IE. AT+CGDCONT=1,"IP","isp.cingular"//        AT&W// ---// Change History://  2007/01/28  Martin D. Flynn//     -Initial release//  2007/03/11  Martin D. Flynn//     -Increased MODEM_SHORT_RESET_TIMEOUT to 6 hours //     -Increased MODEM_LONG_RESET_TIMEOUT to 36 hours // ----------------------------------------------------------------------------#include "stdafx.h" // TARGET_WINCE#include "custom/defaults.h"#if defined(TARGET_WINCE)// ----------------------------------------------------------------------------#include <stdlib.h>#include <string.h>#include <ctype.h>#include <winsock2.h>#include <ras.h>#include <raserror.h>#include <pm.h>#include "custom/log.h"#include "custom/startup.h"#include "custom/wince/wceos.h"#include "custom/wince/wcegprs.h"#include "tools/stdtypes.h"#include "tools/strtools.h"#include "tools/bintools.h"#include "tools/utctools.h"#include "tools/threads.h"  // for 'threadSleepMS'#include "tools/comport.h"#include "tools/sockets.h"#include "base/props.h"#include "base/propman.h"#include "base/packet.h"// ----------------------------------------------------------------------------#if !defined(MODEM_SHORT_RESET_TIMEOUT)#  define MODEM_SHORT_RESET_TIMEOUT     HOUR_SECONDS(6)     // ERROR_PORT_NOT_AVAILABLE errors#endif#if !defined(MODEM_LONG_RESET_TIMEOUT)#  define MODEM_LONG_RESET_TIMEOUT      HOUR_SECONDS(36)    // any non-connectivity reason#endif#if !defined(MODEM_CONTINUE_TIMEOUT)#  define MODEM_CONTINUE_TIMEOUT        MINUTE_SECONDS(15)#endif#define DEFAULT_ENTRY_NAME              "GPRS"// ----------------------------------------------------------------------------static TimerSec_t           _wceResetTimerLong      = 0L;static TimerSec_t           _wceResetTimerShort     = 0L;// ----------------------------------------------------------------------------/* WinCE initialization */static utBool _didInit = utFalse;void wceGprsInitialize(){        /* already initialized */    if (_didInit) {        return;    }    _didInit = utTrue;    /* clear errors */    _wceResetTimerLong  = 0L;    _wceResetTimerShort = 0L;}// ----------------------------------------------------------------------------/* hard reset the modem */utBool wceGprsResetModem(){    logWARNING(LOGSRC,"TODO: Reset GPRS modem ...");    // TODO: Change this to only reset the modem/phone    return utFalse; // false, until this is properly implemented}// ----------------------------------------------------------------------------/* get connection matching PROP_COMM_CONNECTION */HRASCONN wceGprsGetConnection(const char *entryName){        /* default entry name */    if (!entryName || !*entryName) {        entryName = propGetString(PROP_COMM_CONNECTION, DEFAULT_ENTRY_NAME);    }        /* wide-char entryName */    TCHAR wEntryName[RAS_MaxEntryName + 1];    strWideCopy(wEntryName, RAS_MaxEntryName, entryName, -1);        /* enumerate connections */    RASCONN rasConn[10]; // should be more than enough    memset(rasConn, 0, sizeof(rasConn));    rasConn[0].dwSize = sizeof(rasConn[0]);    DWORD rasSize = sizeof(rasConn), rasCnt = 0L;    DWORD err = RasEnumConnections(rasConn, &rasSize, &rasCnt);    if (!err) {        DWORD i;        for (i = 0L; i < rasCnt; i++) {            if (_wcsicmp(wEntryName, rasConn[i].szEntryName) == 0) {                // Just because we've found a connection, doesn't means we're actually still                // connected.  The phone can be 'off' (on PDA phones where the 'phone' can be                // powered separately) and we can still find an existing connection.                return rasConn[i].hrasconn;            }        }    }        /* not found */    //logINFO(LOGSRC,"No existing connection: %ls", wEntryName);    return NULL;    }/* list existing entry names */static void wceGprsListEntryNames(){    RASENTRYNAME rasEntryName[10]; // <-- should be more than enough    memset(&rasEntryName, 0, sizeof(rasEntryName));    rasEntryName[0].dwSize = sizeof(rasEntryName[0]);    DWORD rasEntryNameSize = sizeof(rasEntryName);    DWORD rasEntryCount = 0;    WSASetLastError(0);    DWORD entErr = RasEnumEntries(NULL, NULL, rasEntryName, &rasEntryNameSize, &rasEntryCount);    if (entErr == ERROR_SUCCESS) {        int i;        logINFO(LOGSRC,"Entry names:");        for (i = 0; i < (int)rasEntryCount; i++) {            logINFO(LOGSRC,"  %d) %ls", (i+1), rasEntryName[i].szEntryName);        }    } else {        logINFO(LOGSRC,"Unable to enumerate entry names [%d]", WSAGetLastError());    }}// ----------------------------------------------------------------------------/* check to see if we have a connection that matches PROP_COMM_CONNECTION */utBool wceGprsIsConnected(HRASCONN rasConn){    /* check for open connection */    if (rasConn != NULL) {        RASCONNSTATUS rasConnStat;        memset(&rasConnStat, 0, sizeof(rasConnStat));        rasConnStat.dwSize = sizeof(rasConnStat);        DWORD err = RasGetConnectStatus(rasConn, &rasConnStat);        if (err) {            // Errors encountered (see 'raserror.h'/'winerror.h' for a complete list)            //   6  ERROR_INVALID_HANDLE            if (err != ERROR_INVALID_HANDLE) {                logWARNING(LOGSRC,"Error retrieving connect status [%ld]", (Int32)err);            }            return utFalse;        } else        if (rasConnStat.rasconnstate == RASCS_Connected) {            return utTrue;        } else {            return utFalse;        }    }        /* no existing connection */    return utFalse;}// ----------------------------------------------------------------------------/* disconnect the connection that we created */static int _wceIsDisconnecting = 0;utBool wceGprsDisconnect(HRASCONN rasConn){    utBool rtn = utTrue;    if (rasConn != NULL) {        if (_wceIsDisconnecting > 0) {            // already disconnecting?            logWARNING(LOGSRC,"******* Disconnect already in-process !!!");            rtn = utFalse;        } else {            // We've seen this section lock up!            _wceIsDisconnecting++;            DWORD err = RasHangUp(rasConn);            threadSleepMS(4000L); // make sure that the port has time to close            if (err != SUCCESS) {                logWARNING(LOGSRC,"******* Disconnect Failed !!!");                rtn = utFalse;            } else {                // wait here until we get disconnect confirmation, or timeout                RASCONNSTATUS rsc;                memset(&rsc, 0, sizeof(rsc));                rsc.dwSize = sizeof(rsc);                long timeout  = 6000L;  // maximum wait time                long interval = 2000L;  // sleep interval                for (;timeout > 0L; timeout -= interval) {                    if (RasGetConnectStatus(rasConn,&rsc) == ERROR_INVALID_HANDLE) {                        logINFO(LOGSRC,"Disconnected");                        break;                    }                    threadSleepMS(interval);                 }                if (timeout <= 0L) {                    logWARNING(LOGSRC,"******* Disconnect Timeout !!!");                    rtn = utFalse;                } else {                    rtn = utTrue;                }            }            _wceIsDisconnecting--;        }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕中文在线不卡住| 国产一区二区精品在线观看| 久久精品国产久精国产| 成人动漫一区二区在线| 欧美一区二区三区在线看 | 国产91在线观看丝袜| 欧美性感一区二区三区| 国产精品久久久久久久蜜臀| 男人的天堂亚洲一区| 一本久道久久综合中文字幕| 欧美激情资源网| 国产一区视频网站| 精品国产乱码久久久久久老虎| 一区二区欧美精品| 91麻豆.com| 成人免费在线播放视频| 成人av在线电影| 久久女同精品一区二区| 麻豆精品一区二区综合av| 欧美色成人综合| 亚洲大片精品永久免费| 欧美综合一区二区| 亚洲欧美日韩国产手机在线| 不卡av电影在线播放| 国产女同互慰高潮91漫画| 老鸭窝一区二区久久精品| 91精品在线免费观看| 日韩不卡在线观看日韩不卡视频| 欧美性大战xxxxx久久久| 一区二区三区自拍| 欧美在线你懂得| 亚洲成av人片在线观看无码| 欧美日韩亚洲综合在线| 性做久久久久久久免费看| 欧美日韩一二三| 蜜桃视频在线观看一区| 精品欧美久久久| 国产激情偷乱视频一区二区三区| 2021国产精品久久精品| 国产黄色精品视频| 中文字幕一区二区三区蜜月| 94-欧美-setu| 午夜精品国产更新| 日韩一区二区三区观看| 国产乱码一区二区三区| 国产精品毛片久久久久久| 波多野结衣亚洲一区| 亚洲在线观看免费| 日韩欧美国产三级| 国产很黄免费观看久久| 亚洲天堂成人网| 欧美一区二区日韩| 国产成都精品91一区二区三| 亚洲人123区| 欧美一区二区在线免费播放 | 国产成人在线看| **网站欧美大片在线观看| 欧美嫩在线观看| 激情综合五月天| 亚洲美女屁股眼交3| 欧美二区在线观看| 成人免费av网站| 午夜视频在线观看一区| 久久久久久久久久久电影| 色偷偷88欧美精品久久久| 蜜桃视频免费观看一区| 国产精品拍天天在线| 欧美另类高清zo欧美| 国产一区二区看久久| 一区二区三区精密机械公司| 日韩欧美电影在线| 色成人在线视频| 国产一区二区三区香蕉| 一区二区三区精品在线| 久久久久久久av麻豆果冻| 欧洲一区二区三区免费视频| 国产一区欧美日韩| 亚洲国产欧美另类丝袜| 国产欧美日韩中文久久| 欧美丝袜丝nylons| 成人av资源在线| 欧美日本韩国一区| 粉嫩av一区二区三区粉嫩 | 日韩av不卡一区二区| 国产精品毛片久久久久久久| 日韩欧美综合一区| 欧美亚洲综合色| 成人精品电影在线观看| 精品制服美女丁香| 亚洲精品免费在线| 欧美成人三级在线| 欧美丰满少妇xxxbbb| 色诱视频网站一区| av电影在线不卡| 国产在线播放一区三区四| 日产国产欧美视频一区精品| 亚洲欧美日韩人成在线播放| 欧美激情综合网| 久久久亚洲精品一区二区三区 | 香蕉久久夜色精品国产使用方法| 中国av一区二区三区| 精品国产一区二区精华| 欧美剧在线免费观看网站| 91高清在线观看| 色综合天天狠狠| 91在线国产福利| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 久久精品男人的天堂| 欧美成人a∨高清免费观看| 欧美卡1卡2卡| 欧美一区二区三区免费| 欧美一区二区视频在线观看| 欧美丰满少妇xxxxx高潮对白| 欧美视频在线播放| 欧美日本国产视频| 欧美一级日韩不卡播放免费| 9191精品国产综合久久久久久| 欧美精品xxxxbbbb| 欧美一级日韩不卡播放免费| 日韩美女视频在线| 久久久91精品国产一区二区三区| 国产日韩欧美高清| 最新国产精品久久精品| 亚洲乱码中文字幕综合| 亚洲一区二区三区三| 视频一区免费在线观看| 日韩主播视频在线| 国产精品一品视频| 99视频一区二区三区| 在线中文字幕一区二区| 欧美一区二区在线观看| 久久亚洲综合色一区二区三区| 久久久久久久网| 亚洲人成人一区二区在线观看| 亚洲一区二区av电影| 久久99久久精品欧美| 国产成人在线看| 色成年激情久久综合| 日韩一区二区在线观看视频| 国产日产亚洲精品系列| 亚洲激情五月婷婷| 奇米影视一区二区三区| 国产精品538一区二区在线| 91免费视频网址| 91精品福利在线一区二区三区| 国产丝袜美腿一区二区三区| 亚洲欧美综合在线精品| 日本在线不卡视频| 不卡区在线中文字幕| 777奇米成人网| 国产欧美一区二区精品性| 亚洲男同性视频| 国产在线精品一区二区夜色| 91欧美激情一区二区三区成人| 6080亚洲精品一区二区| 欧美高清在线精品一区| 天天综合日日夜夜精品| jlzzjlzz欧美大全| 日韩一级片在线播放| 日韩码欧中文字| 国内精品免费**视频| 91久久精品一区二区| 久久久噜噜噜久久中文字幕色伊伊 | 亚洲不卡av一区二区三区| 国产91精品精华液一区二区三区 | 亚洲综合色噜噜狠狠| 国产麻豆9l精品三级站| 精品视频1区2区| 国产精品国产成人国产三级| 日韩精品一二三四| 一本大道久久精品懂色aⅴ| 久久久久久久精| 日韩电影免费一区| 欧美亚洲日本国产| 亚洲视频你懂的| 成人午夜精品在线| 精品粉嫩超白一线天av| 天堂成人国产精品一区| 色999日韩国产欧美一区二区| 国产欧美日韩三区| 精品一区二区三区免费播放| 欧美日韩一二三| 一级中文字幕一区二区| 97久久超碰国产精品| 日本一区二区三区国色天香| 国内精品伊人久久久久av影院| 欧美一区二区免费观在线| 五月激情综合婷婷| 色偷偷88欧美精品久久久| 中文字幕中文字幕一区二区| 成人听书哪个软件好| 久久精品一区二区三区不卡牛牛| 久久国产精品露脸对白| 欧美成人一级视频| 国产在线看一区| 国产清纯白嫩初高生在线观看91| 国产乱码精品一区二区三区五月婷| 欧美sm极限捆绑bd| 国产综合色视频| 国产亚洲欧美日韩日本|