//--------------------------------------------------- // BtStack.SetSvcSecurityOptions //--------------------------------------------------- public eBTRC SetSvcSecurityOptions(eBTSVC eSvc, SvcSecOptions Opts) { eBTRC rc = BT_SetSvcSecurityOptions(eSvc, Opts.IsEnabled ? 1 : 0, Opts.IsAuthRequired ? 1 : 0, Opts.IsPINRequired ? 1 : 0, Opts.IsEncryptRequired ? 1 : 0); return rc; }
//--------------------------------------------------- // BtStack.GetSvcSecurityOptions //--------------------------------------------------- public SvcSecOptions GetSvcSecurityOptions(eBTSVC eSvc) { SvcSecOptions Opts = new SvcSecOptions(); Int32 ia, ib, ic, id; BT_GetSvcSecurityOptions(eSvc, out ia, out ib, out ic, out id); Opts.IsEnabled = ia==0 ? false : true; Opts.IsAuthRequired = ib==0 ? false : true; Opts.IsPINRequired = ic==0 ? false : true; Opts.IsEncryptRequired = id==0 ? false : true; return Opts; }