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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? utils.h

?? funambol windows mobile plugin source code, the source code is taken from the funambol site
?? H
字號(hào):
/*
 * Copyright (C) 2003-2007 Funambol, Inc
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY, TITLE, NONINFRINGEMENT or FITNESS FOR A PARTICULAR
 * PURPOSE.  See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 * 02111-1307  USA
 */

#ifndef INCL_BASE_UTILS
#define INCL_BASE_UTILS
/** @cond DEV */

#include "base/fscapi.h"
#include "base/util/ArrayList.h"
#include "base/md5.h"
#include "base/base64.h"

#include <stdio.h>

// Default len for stringdup (means: use source string len)
#define STRINGDUP_NOLEN 0xFFFFFFFF

#define B64_ENCODING        "b64"
#define TEXT_PLAIN_ENCODING "text/plain"

/*
 * Deletes the given char* [] buffer if it is not NULL
 * and sets the pointer to NULL
 *
 */
void safeDelete(char*  p[]);

void safeDel(char** p);

/**
 * Convert an unsigned long to an anchor.
 *
 * @param timestamp the timestamp to convert into an anchor
 * @param anchor where the anchor will be written (has to be at least 21 characters long)
 */
void timestampToAnchor(unsigned long timestamp, char anchor[21]);

/**
 * inverse operation for timestampToAnchor(), returns 0 if not a valid anchor
 */
unsigned long anchorToTimestamp(const char* anchor);

char* stringdup(const char* s, size_t len = STRINGDUP_NOLEN) ;
WCHAR* wstrdup(const WCHAR* s, size_t len = STRINGDUP_NOLEN);

char*  strtolower(const char *s);

char*  wcstoupper(const char *s);

/**
 * find a substring from the end, with optional string lenght
 */
const char *brfind(const char *s1, const char *s2, size_t len=STRINGDUP_NOLEN) ;

/**
 * Returns TRUE is the given string is NULL or zero-length
 */
inline BOOL isEmpty(const char*  s) {
    return ((s == NULL) || (strlen(s) == 0));
}

/**
 * Returns TRUE is the given string is NULL or zero-length
 */
inline BOOL isNotEmpty(const char*  s) {
    return (s && (strlen(s) > 0));
}


/*
* compare two char array ignoring the case of the char
*/
bool wcscmpIgnoreCase(const char*  p, const char*  q);

/*
* Converts a integer into a char*
*/
char*  itow(int i);

/*
* Converts a integer into a char*
*/
char*  ltow(long i);

/**
 * Returns a rounded integer value from double.
 */
int round(double val);

/*
* Method to create the cred data given the username, password and nonce
* It uses the calculateMD5 to calculate the MD5 using the alghoritm.
*/
char*  MD5CredentialData(const char* userName, const char* password, const char* nonce);

/*
* Calculates the digest given the token and its lenght
*/
char* calculateMD5(const void* token, int len, char* wdigest);

/*
 * Return a filename composed by the system temp dir and the name given
 * in input. If the file exists, try to add a digit 0-9.
 * If this fails too, return NULL (there's must be something wrong in
 * the calling program)
 *
 * @param name - a file name, without path
 * @return - a full pathname, allocated with new[], or NULL on error
 */
char *mkTempFileName(const char *name);

/*
 * Write len bytes from buffer to the file 'filename'.
 *
 * @param name - the file name
 * @param buffer - pointer to the buffer to write
 * @param len - the number of bytes to write
 * @param binary - if true the file will be opened in binary mode
 *
 * @return - true if file is successfully saved
 */
bool saveFile(const char *filename, const char *buffer, size_t len,
              bool binary = false );

/*
 * Get the size of the file, in bytes
 *
 * @param f - the file to evaluate
 * @return - the length of the file
 */
size_t fgetsize(FILE *f);

/*
 * Read the content
 *
 * @param name - the file name
 * @param message (out) - new allocated buffer with the file content
 * @param len - length of the read content
 * @param binary - if true the file has to be opened in binary mode
 *
 * @return - true if file is succesfully read
 */
bool readFile(const char* name, char **message, size_t *len, bool binary = false );

/*
 * Read the content of a directory
 *
 * @param name - the dir name
 * @param count (out) - number of files in dir
 * @param onlyCount - optional, if true only set the nuber of files (count)
 *
 * @return - new allocated array of fileNames (NULL if errors)
 */
char** readDir(char* name, int *count, bool onlyCount = false);

/**
 * Returns the most recent time stamp of file content or attribute
 * modifications, 0 in case of error. The time stamp must use the same
 * time base as time().
 */
unsigned long getFileModTime(const char* name);


long int getLenEncoding(const char*  s, const char* encoding);
char *toMultibyte(const WCHAR *wc, const char *encoding = 0 );
WCHAR *toWideChar(const char *mb, const char *encoding = 0 );


// Wide Char Convert: inline function used to convert a wchar
// in char, using a static buffer to store the converted string.
//
// BEWARE: the string is deleted and re-used at each call.
inline const char *_wcc(const WCHAR *wc, const char *enc=0) {
    static char* encodeBuf = 0;

    if (encodeBuf){
        delete [] encodeBuf;
        encodeBuf = 0;
    }
    if (wc) {
        encodeBuf = toMultibyte(wc, enc);
    }
    return encodeBuf;
}


/** @endcond */
#endif

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色综合久久久久久久| 韩国三级电影一区二区| 91久久人澡人人添人人爽欧美| 欧美国产日韩亚洲一区| 波多野结衣一区二区三区| 成人免费在线视频观看| 欧美在线你懂得| 日日夜夜一区二区| 久久人人超碰精品| 波多野结衣亚洲一区| 一区二区高清免费观看影视大全| 欧美日韩一区二区三区视频| 美女精品一区二区| 国产精品系列在线| 欧美区视频在线观看| 美女性感视频久久| 欧美激情在线一区二区| 在线中文字幕不卡| 蜜臀av一级做a爰片久久| 久久综合九色综合欧美98| 成人免费av网站| 午夜婷婷国产麻豆精品| 国产色婷婷亚洲99精品小说| 色婷婷精品大视频在线蜜桃视频| 天天操天天色综合| 国产精品久久久久久户外露出| 色婷婷亚洲综合| 精品综合免费视频观看| 亚洲精品一二三区| 久久久久综合网| 欧美最新大片在线看| 精品制服美女丁香| 国产一区二区日韩精品| 一区二区免费看| 久久久久久电影| 欧美乱妇23p| 成人av片在线观看| 美国av一区二区| 亚洲一区在线视频观看| 国产欧美精品一区二区色综合 | 成av人片一区二区| 天天色综合天天| 亚洲色图欧美激情| 久久麻豆一区二区| 宅男在线国产精品| 91久久香蕉国产日韩欧美9色| 国产一区中文字幕| 免费人成网站在线观看欧美高清| 亚洲黄一区二区三区| 国产精品色在线观看| 欧美电视剧在线看免费| 欧美三级乱人伦电影| 99综合影院在线| 国产精品一级黄| 另类小说视频一区二区| 天天综合色天天综合| 一区二区日韩av| 亚洲精品国产品国语在线app| 久久一区二区三区四区| 欧美一级日韩免费不卡| 欧美精品一级二级三级| 色88888久久久久久影院野外| a在线欧美一区| 风流少妇一区二区| 国产老肥熟一区二区三区| 老司机精品视频一区二区三区| 视频在线观看一区| 亚洲第一主播视频| 性久久久久久久| 亚洲自拍另类综合| 一区二区久久久久久| 亚洲在线免费播放| 亚洲一区国产视频| 一区二区三区电影在线播| 亚洲精品国产精品乱码不99 | www.激情成人| 成人激情开心网| 成人白浆超碰人人人人| 成人黄动漫网站免费app| 国产成人一区在线| aa级大片欧美| 在线欧美日韩精品| 欧美日韩国产电影| 欧美一区三区二区| 精品久久久久久久久久久院品网 | 欧美一级黄色片| 欧美一三区三区四区免费在线看| 日韩一区二区三| 精品国产123| 国产区在线观看成人精品 | 精品国产91乱码一区二区三区| 日韩精品一区二区三区在线| 无码av中文一区二区三区桃花岛| 亚洲第一主播视频| 久久av老司机精品网站导航| 国产成人av在线影院| 成人短视频下载| 在线视频亚洲一区| 日韩欧美成人一区| 国产蜜臀av在线一区二区三区| 成人欧美一区二区三区黑人麻豆| 亚洲第四色夜色| 另类的小说在线视频另类成人小视频在线 | 日韩免费高清视频| 国产日韩av一区| 亚洲一区在线视频| 麻豆国产精品官网| www.亚洲国产| 欧美高清视频一二三区| 国产欧美日韩亚州综合| 亚洲精品免费在线观看| 日本美女视频一区二区| 成人性生交大片免费看中文网站 | 欧美剧在线免费观看网站| 精品福利一二区| 夜夜精品浪潮av一区二区三区| 日本欧美一区二区三区乱码| zzijzzij亚洲日本少妇熟睡| 欧美一区二视频| 最新日韩在线视频| 精品中文av资源站在线观看| 日本韩国一区二区三区| 精品少妇一区二区三区免费观看| 亚洲欧洲精品一区二区精品久久久 | 欧美性色欧美a在线播放| 久久久99免费| 婷婷夜色潮精品综合在线| 国产成人av一区二区| 4438x成人网最大色成网站| 国产精品国产精品国产专区不片| 天天亚洲美女在线视频| 91在线观看视频| 久久精品亚洲麻豆av一区二区 | 国产精品萝li| 蜜桃视频在线一区| 欧洲av在线精品| 亚洲天堂成人网| 国产高清视频一区| 日韩视频免费观看高清完整版| 亚洲女同女同女同女同女同69| 国产一区二区三区免费观看| 91精品国产麻豆国产自产在线 | 日本道免费精品一区二区三区| 久久精品一级爱片| 精久久久久久久久久久| 欧美精品久久久久久久久老牛影院| 亚洲日本电影在线| 成人综合在线网站| www国产精品av| 免费看欧美女人艹b| 欧美日韩精品三区| 亚洲一区二区三区影院| 91久久免费观看| 亚洲精品大片www| 久久久国产一区二区三区四区小说| 日韩精品一二三区| 欧美欧美午夜aⅴ在线观看| 亚洲激情中文1区| 91丨九色丨黑人外教| 18涩涩午夜精品.www| 播五月开心婷婷综合| 中文字幕乱码久久午夜不卡| 国产不卡视频一区| 亚洲国产精华液网站w| 国产成人啪免费观看软件| 精品国产乱码91久久久久久网站| 久久精品国产色蜜蜜麻豆| 日韩一区二区在线观看视频| 老色鬼精品视频在线观看播放| 日韩欧美久久久| 狠狠色丁香九九婷婷综合五月| 欧美精品一区二区高清在线观看| 精品一区在线看| 久久久国产午夜精品| 成人黄色a**站在线观看| 亚洲欧美综合色| 在线观看亚洲一区| 婷婷丁香久久五月婷婷| 日韩欧美一二三区| 国产精品亚洲视频| 亚洲视频在线一区| 欧美亚洲禁片免费| 日韩和欧美的一区| 久久综合色8888| 99国产精品久| 亚洲自拍偷拍麻豆| 日韩亚洲欧美成人一区| 国产精品亚洲一区二区三区妖精| 国产精品久久久久四虎| 在线观看免费一区| 天堂一区二区在线| 26uuu久久综合| 色综合久久六月婷婷中文字幕| 亚洲成av人片一区二区三区| 欧美大胆一级视频| www.av精品| 免费看日韩精品| 国产精品不卡在线| 欧美一级夜夜爽| 99热在这里有精品免费|