Exemple #1
0
 //---------------------------------------------------
 // BtStack.SetGeneralSecurityOptions
 //---------------------------------------------------
 public eBTRC SetGeneralSecurityOptions(GenSecOptions Opts)
 {
     eBTRC rc = BT_SetGeneralSecurityOptions(Opts.LocalDeviceName,
         Opts.FTPRootDir,
         Opts.IsDiscoverable ? 1 : 0,
         Opts.IsConnectable  ? 1 : 0);
     return rc;
 }
Exemple #2
0
        //---------------------------------------------------
        // BtStack.GetGeneralSecurityOptions
        //---------------------------------------------------
        public GenSecOptions GetGeneralSecurityOptions()
        {
            GenSecOptions Opts = new GenSecOptions();

            StringBuilder sName = new StringBuilder(120);
            StringBuilder sFTP  = new StringBuilder(256);
            Int32 iDisc;
            Int32 iConn;
            BT_GetGeneralSecurityOptions(sName, sFTP, out iDisc, out iConn);

            Opts.LocalDeviceName = sName.ToString();
            Opts.FTPRootDir      = sFTP.ToString();
            Opts.IsDiscoverable  = iDisc==0 ? false : true;
            Opts.IsConnectable   = iConn==0 ? false : true;

            return Opts;
        }