예제 #1
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();
        }
예제 #2
0
 BluetopiaError IBluetopiaApi.GAP_Set_Connectability_Mode(uint BluetoothStackID, StackConsts.GAP_Connectability_Mode GAP_Connectability_Mode)
 {
     return(NativeMethods.GAP_Set_Connectability_Mode(BluetoothStackID, GAP_Connectability_Mode));
 }
예제 #3
0
 BluetopiaError IBluetopiaApi.GAP_Query_Connectability_Mode(uint BluetoothStackID, out StackConsts.GAP_Connectability_Mode GAP_Connectability_Mode)
 {
     GAP_Connectability_Mode = StackConsts.GAP_Connectability_Mode.ConnectableMode;
     return(BluetopiaError.OK);
 }
예제 #4
0
 BluetopiaError IBluetopiaApi.GAP_Set_Connectability_Mode(uint BluetoothStackID, StackConsts.GAP_Connectability_Mode GAP_Connectability_Mode)
 {
     return(BluetopiaError.OK);
 }
예제 #5
0
 internal static extern BluetopiaError GAP_Query_Connectability_Mode(uint BluetoothStackID,
                                                                     out StackConsts.GAP_Connectability_Mode GAP_Connectability_Mode);