コード例 #1
0
ファイル: BluetopiaRealApi.cs プロジェクト: zhubin-12/32feet
 BluetopiaError IBluetopiaApi.GAP_Query_Discoverability_Mode(uint BluetoothStackID,
                                                             out StackConsts.GAP_Discoverability_Mode GAP_Discoverability_Mode,
                                                             out uint Max_Discoverable_Time)
 {
     return(NativeMethods.GAP_Query_Discoverability_Mode(BluetoothStackID,
                                                         out GAP_Discoverability_Mode, out Max_Discoverable_Time));
 }
コード例 #2
0
        static void A_GetMode_(StackConsts.GAP_Connectability_Mode conno,
                               StackConsts.GAP_Discoverability_Mode disco,
                               RadioMode expectedMode)
        {
            var stuff = Create_Radio_A(new Params {
            });

            //
            Expect.Once.On(stuff.MockedApi).Method("GAP_Query_Connectability_Mode")
            .With(stuff.StackId, Is.Out)
            .Will(
                new SetIndexedParameterAction(1, conno),
                Return.Value(BluetopiaError.OK));
            if (conno == StackConsts.GAP_Connectability_Mode.ConnectableMode)
            {
                // (We don't call GAP_Query_Discoverability_Mode when not conno).
                Expect.Once.On(stuff.MockedApi).Method("GAP_Query_Discoverability_Mode")
                .With(stuff.StackId, Is.Out, Is.Out)
                .Will(
                    new SetIndexedParameterAction(1, disco),
                    new SetIndexedParameterAction(2, (uint)0),
                    Return.Value(BluetopiaError.OK));
            }
            //
            Assert.AreEqual(expectedMode, stuff.Radio.Mode, "Mode");
            //
            stuff.Mockery_VerifyAllExpectationsHaveBeenMet();
        }
コード例 #3
0
ファイル: BluetopiaRealApi.cs プロジェクト: zhubin-12/32feet
 BluetopiaError IBluetopiaApi.GAP_Set_Discoverability_Mode(uint BluetoothStackID, StackConsts.GAP_Discoverability_Mode GAP_Discoverability_Mode,
                                                           uint Max_Discoverable_Time)
 {
     return(NativeMethods.GAP_Set_Discoverability_Mode(BluetoothStackID, GAP_Discoverability_Mode, Max_Discoverable_Time));
 }
コード例 #4
0
ファイル: BluetopiaFakeApi.cs プロジェクト: jehy/32feet.NET
 BluetopiaError IBluetopiaApi.GAP_Query_Discoverability_Mode(uint BluetoothStackID, out StackConsts.GAP_Discoverability_Mode GAP_Discoverability_Mode, out uint Max_Discoverable_Time)
 {
     GAP_Discoverability_Mode = StackConsts.GAP_Discoverability_Mode.NonDiscoverableMode;
     Max_Discoverable_Time    = 0;
     return(BluetopiaError.OK);
 }
コード例 #5
0
ファイル: BluetopiaFakeApi.cs プロジェクト: jehy/32feet.NET
 BluetopiaError IBluetopiaApi.GAP_Set_Discoverability_Mode(uint BluetoothStackID, StackConsts.GAP_Discoverability_Mode GAP_Discoverability_Mode,
                                                           uint Max_Discoverable_Time)
 {
     return(BluetopiaError.OK);
 }
コード例 #6
0
 internal static extern BluetopiaError GAP_Query_Discoverability_Mode(uint BluetoothStackID,
                                                                      out StackConsts.GAP_Discoverability_Mode GAP_Discoverability_Mode,
                                                                      out uint Max_Discoverable_Time);