• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ doBooleanCommand函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中doBooleanCommand函数的典型用法代码示例。如果您正苦于以下问题:C++ doBooleanCommand函数的具体用法?C++ doBooleanCommand怎么用?C++ doBooleanCommand使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了doBooleanCommand函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: android_net_wifi_startPacketFiltering

static jboolean android_net_wifi_startPacketFiltering(JNIEnv* env, jobject clazz)
{
    return doBooleanCommand("DRIVER RXFILTER-ADD 0", "OK")
	&& doBooleanCommand("DRIVER RXFILTER-ADD 1", "OK")
	&& doBooleanCommand("DRIVER RXFILTER-ADD 3", "OK")
	&& doBooleanCommand("DRIVER RXFILTER-START", "OK");
}
开发者ID:Abhishekh-TEL,项目名称:pdroid,代码行数:7,代码来源:android_net_wifi_Wifi.cpp


示例2: android_net_wifi_enableBackgroundScanCommand

static void android_net_wifi_enableBackgroundScanCommand(JNIEnv* env, jobject, jboolean enable)
{
    //Note: BGSCAN-START and BGSCAN-STOP are documented in core/res/res/values/config.xml
    //and will need an update if the names are changed
    if (enable) {
        doBooleanCommand("OK", "DRIVER BGSCAN-START");
    } else {
        doBooleanCommand("OK", "DRIVER BGSCAN-STOP");
    }
}
开发者ID:0xr0ot,项目名称:frameworks_base,代码行数:10,代码来源:android_net_wifi_Wifi.cpp


示例3: android_net_wifi_stopPacketFiltering

static jboolean android_net_wifi_stopPacketFiltering(JNIEnv* env, jobject clazz)
{
    jboolean result = doBooleanCommand("DRIVER RXFILTER-STOP", "OK");
    if (result) {
	(void)doBooleanCommand("DRIVER RXFILTER-REMOVE 3", "OK");
	(void)doBooleanCommand("DRIVER RXFILTER-REMOVE 1", "OK");
	(void)doBooleanCommand("DRIVER RXFILTER-REMOVE 0", "OK");
    }

    return result;
}
开发者ID:Abhishekh-TEL,项目名称:pdroid,代码行数:11,代码来源:android_net_wifi_Wifi.cpp


示例4: android_net_wifi_enableNetworkCommand

static jboolean android_net_wifi_enableNetworkCommand(JNIEnv* env,
                                                  jobject,
                                                  jint netId,
                                                  jboolean disableOthers)
{
    return doBooleanCommand("OK", "%s_NETWORK %d", disableOthers ? "SELECT" : "ENABLE", netId);
}
开发者ID:0xr0ot,项目名称:frameworks_base,代码行数:7,代码来源:android_net_wifi_Wifi.cpp


示例5: android_net_wifi_setSuspendOptimizationsCommand

static jboolean android_net_wifi_setSuspendOptimizationsCommand(JNIEnv* env, jobject clazz, jboolean enabled)
{
    char cmdstr[25];

    snprintf(cmdstr, sizeof(cmdstr), "DRIVER SETSUSPENDOPT %d", enabled ? 0 : 1);
    return doBooleanCommand(cmdstr, "OK");
}
开发者ID:Abhishekh-TEL,项目名称:pdroid,代码行数:7,代码来源:android_net_wifi_Wifi.cpp


示例6: android_net_wifi_doBooleanCommand

static jboolean android_net_wifi_doBooleanCommand(JNIEnv* env, jobject, jstring javaCommand)
{
    ScopedUtfChars command(env, javaCommand);
    if (command.c_str() == NULL) {
        return JNI_FALSE;
    }
    return doBooleanCommand("OK", "%s", command.c_str());
}
开发者ID:0xr0ot,项目名称:frameworks_base,代码行数:8,代码来源:android_net_wifi_Wifi.cpp


示例7: android_net_wifi_addToBlacklistCommand

static jboolean android_net_wifi_addToBlacklistCommand(JNIEnv* env, jobject, jstring javaBssid)
{
    ScopedUtfChars bssid(env, javaBssid);
    if (bssid.c_str() == NULL) {
        return JNI_FALSE;
    }
    return doBooleanCommand("OK", "BLACKLIST %s", bssid.c_str());
}
开发者ID:0xr0ot,项目名称:frameworks_base,代码行数:8,代码来源:android_net_wifi_Wifi.cpp


示例8: android_net_wifi_setCountryCodeCommand

static jboolean android_net_wifi_setCountryCodeCommand(JNIEnv* env, jobject, jstring javaCountry)
{
    ScopedUtfChars country(env, javaCountry);
    if (country.c_str() == NULL) {
        return JNI_FALSE;
    }
    return doBooleanCommand("OK", "DRIVER COUNTRY %s", country.c_str());
}
开发者ID:0xr0ot,项目名称:frameworks_base,代码行数:8,代码来源:android_net_wifi_Wifi.cpp


示例9: android_net_wifi_wpsPbcCommand

static jboolean android_net_wifi_wpsPbcCommand(JNIEnv* env, jobject, jstring javaBssid)
{
    ScopedUtfChars bssid(env, javaBssid);
    if (bssid.c_str() == NULL) {
        return JNI_FALSE;
    }
    return doBooleanCommand("OK", "WPS_PBC %s", bssid.c_str());
}
开发者ID:0xr0ot,项目名称:frameworks_base,代码行数:8,代码来源:android_net_wifi_Wifi.cpp


示例10: android_net_wifi_setBluetoothCoexistenceModeCommand

static jboolean android_net_wifi_setBluetoothCoexistenceModeCommand(JNIEnv* env, jobject clazz, jint mode)
{
    char cmdstr[256];

    int numWritten = snprintf(cmdstr, sizeof(cmdstr), "DRIVER BTCOEXMODE %d", mode);
    int cmdTooLong = numWritten >= (int)sizeof(cmdstr);

    return (jboolean)!cmdTooLong && doBooleanCommand(cmdstr, "OK");
}
开发者ID:Abhishekh-TEL,项目名称:pdroid,代码行数:9,代码来源:android_net_wifi_Wifi.cpp


示例11: android_net_wifi_setBluetoothCoexistenceScanModeCommand

static jboolean android_net_wifi_setBluetoothCoexistenceScanModeCommand(JNIEnv* env, jobject clazz, jboolean setCoexScanMode)
{
    char cmdstr[256];

    int numWritten = snprintf(cmdstr, sizeof(cmdstr), "DRIVER BTCOEXSCAN-%s", setCoexScanMode ? "START" : "STOP");
    int cmdTooLong = numWritten >= (int)sizeof(cmdstr);

    return (jboolean)!cmdTooLong && doBooleanCommand(cmdstr, "OK");
}
开发者ID:Abhishekh-TEL,项目名称:pdroid,代码行数:9,代码来源:android_net_wifi_Wifi.cpp


示例12: android_net_wifi_setScanResultHandlingCommand

static jboolean android_net_wifi_setScanResultHandlingCommand(JNIEnv* env, jobject clazz, jint mode)
{
    char cmdstr[256];

    int numWritten = snprintf(cmdstr, sizeof(cmdstr), "AP_SCAN %d", mode);
    int cmdTooLong = numWritten >= (int)sizeof(cmdstr);

    return (jboolean)!cmdTooLong && doBooleanCommand(cmdstr, "OK");
}
开发者ID:Abhishekh-TEL,项目名称:pdroid,代码行数:9,代码来源:android_net_wifi_Wifi.cpp


示例13: android_net_wifi_disableNetworkCommand

static jboolean android_net_wifi_disableNetworkCommand(JNIEnv* env, jobject clazz, jint netId)
{
    char cmdstr[256];

    int numWritten = snprintf(cmdstr, sizeof(cmdstr), "DISABLE_NETWORK %d", netId);
    int cmdTooLong = numWritten >= (int)sizeof(cmdstr);

    return (jboolean)!cmdTooLong && doBooleanCommand(cmdstr, "OK");
}
开发者ID:Abhishekh-TEL,项目名称:pdroid,代码行数:9,代码来源:android_net_wifi_Wifi.cpp


示例14: android_net_wifi_setNumAllowedChannelsCommand

static jboolean android_net_wifi_setNumAllowedChannelsCommand(JNIEnv* env, jobject clazz, jint numChannels)
{
    char cmdstr[256];

    int numWritten = snprintf(cmdstr, sizeof(cmdstr), "DRIVER SCAN-CHANNELS %u", numChannels);
    int cmdTooLong = numWritten >= (int)sizeof(cmdstr);

    return (jboolean)!cmdTooLong && doBooleanCommand(cmdstr, "OK");
}
开发者ID:Abhishekh-TEL,项目名称:pdroid,代码行数:9,代码来源:android_net_wifi_Wifi.cpp


示例15: android_net_wifi_doBooleanCommand

static jboolean android_net_wifi_doBooleanCommand(JNIEnv* env, jobject, jstring jIface,
        jstring jCommand)
{
    ScopedUtfChars ifname(env, jIface);
    ScopedUtfChars command(env, jCommand);

    if (command.c_str() == NULL) {
        return JNI_FALSE;
    }
    if (DBG) ALOGD("doBoolean: %s", command.c_str());
    return doBooleanCommand(ifname.c_str(), "OK", "%s", command.c_str());
}
开发者ID:AOSPE-Dev,项目名称:android_frameworks_base,代码行数:12,代码来源:android_net_wifi_Wifi.cpp


示例16: android_net_wifi_scanCommand

static jboolean android_net_wifi_scanCommand(JNIEnv* env, jobject clazz, jboolean forceActive)
{
    jboolean result;

    // Ignore any error from setting the scan mode.
    // The scan will still work.
    if (forceActive && !sScanModeActive)
        doSetScanMode(true);
    result = doBooleanCommand("SCAN", "OK");
    if (forceActive && !sScanModeActive)
        doSetScanMode(sScanModeActive);
    return result;
}
开发者ID:Abhishekh-TEL,项目名称:pdroid,代码行数:13,代码来源:android_net_wifi_Wifi.cpp


示例17: android_net_wifi_wpsPinFromAccessPointCommand

static jboolean android_net_wifi_wpsPinFromAccessPointCommand(JNIEnv* env, jobject,
        jstring javaBssid, jstring javaApPin)
{
    ScopedUtfChars bssid(env, javaBssid);
    if (bssid.c_str() == NULL) {
        return JNI_FALSE;
    }
    ScopedUtfChars apPin(env, javaApPin);
    if (apPin.c_str() == NULL) {
        return JNI_FALSE;
    }
    return doBooleanCommand("OK", "WPS_REG %s %s", bssid.c_str(), apPin.c_str());
}
开发者ID:0xr0ot,项目名称:frameworks_base,代码行数:13,代码来源:android_net_wifi_Wifi.cpp


示例18: android_net_wifi_enableNetworkCommand

static jboolean android_net_wifi_enableNetworkCommand(JNIEnv* env,
                                                  jobject clazz,
                                                  jint netId,
                                                  jboolean disableOthers)
{
    char cmdstr[256];
    const char *cmd = disableOthers ? "SELECT_NETWORK" : "ENABLE_NETWORK";

    int numWritten = snprintf(cmdstr, sizeof(cmdstr), "%s %d", cmd, netId);
    int cmdTooLong = numWritten >= (int)sizeof(cmdstr);

    return (jboolean)!cmdTooLong && doBooleanCommand(cmdstr, "OK");
}
开发者ID:Abhishekh-TEL,项目名称:pdroid,代码行数:13,代码来源:android_net_wifi_Wifi.cpp


示例19: android_net_wifi_addToBlacklistCommand

static jboolean android_net_wifi_addToBlacklistCommand(JNIEnv* env, jobject clazz, jstring bssid)
{
    char cmdstr[256];
    jboolean isCopy;

    const char *bssidStr = env->GetStringUTFChars(bssid, &isCopy);

    int cmdTooLong = snprintf(cmdstr, sizeof(cmdstr), "BLACKLIST %s", bssidStr) >= (int)sizeof(cmdstr);

    env->ReleaseStringUTFChars(bssid, bssidStr);

    return (jboolean)!cmdTooLong && doBooleanCommand(cmdstr, "OK");
}
开发者ID:Abhishekh-TEL,项目名称:pdroid,代码行数:13,代码来源:android_net_wifi_Wifi.cpp


示例20: android_net_wifi_setNetworkVariableCommand

static jboolean android_net_wifi_setNetworkVariableCommand(JNIEnv* env,
                                                           jobject,
                                                           jint netId,
                                                           jstring javaName,
                                                           jstring javaValue)
{
    ScopedUtfChars name(env, javaName);
    if (name.c_str() == NULL) {
        return JNI_FALSE;
    }
    ScopedUtfChars value(env, javaValue);
    if (value.c_str() == NULL) {
        return JNI_FALSE;
    }
    return doBooleanCommand("OK", "SET_NETWORK %d %s %s", netId, name.c_str(), value.c_str());
}
开发者ID:0xr0ot,项目名称:frameworks_base,代码行数:16,代码来源:android_net_wifi_Wifi.cpp



注:本文中的doBooleanCommand函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ doCast函数代码示例发布时间:2022-05-30
下一篇:
C++ doAction函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap