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(); }
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)); }
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); }
BluetopiaError IBluetopiaApi.GAP_Set_Connectability_Mode(uint BluetoothStackID, StackConsts.GAP_Connectability_Mode GAP_Connectability_Mode) { return(BluetopiaError.OK); }
internal static extern BluetopiaError GAP_Query_Connectability_Mode(uint BluetoothStackID, out StackConsts.GAP_Connectability_Mode GAP_Connectability_Mode);