Exemplo n.º 1
0
        private void stopChord(int ifc)
        {
            /// <summary>
            /// 7. Stop Chord. You can call leaveChannel explicitly.
            /// mSchordManager_1.leaveChannel(CHORD_HELLO_TEST_CHANNEL);
            /// </summary>
            SchordManager currentManager = null;

            currentManager = getSchordManager(ifc);

            if (currentManager == null)
            {
                return;
            }

            currentManager.stop();

            switch (ifc)
            {
            case SchordManager.INTERFACE_TYPE_WIFI:
                mWifi_startStop_btn.Enabled = false;
                break;

            case SchordManager.INTERFACE_TYPE_WIFI_P2P:
                mWifiDirect_startStop_btn.Enabled = false;
                break;

            case SchordManager.INTERFACE_TYPE_WIFI_AP:
                mMobileAP_startStop_btn.Enabled = false;
                break;
            }
            addLogView(ifc, "    stop(" + getInterfaceName(ifc) + ")");
        }