BTH_DEVICE_INFO.cs :  » Business-Application » 32feet.NET » InTheHand » Net » Bluetooth » C# / CSharp Open Source

Home
C# / CSharp Open Source
1.2.6.4 mono .net core
2.2.6.4 mono core
3.Aspect Oriented Frameworks
4.Bloggers
5.Build Systems
6.Business Application
7.Charting Reporting Tools
8.Chat Servers
9.Code Coverage Tools
10.Content Management Systems CMS
11.CRM ERP
12.Database
13.Development
14.Email
15.Forum
16.Game
17.GIS
18.GUI
19.IDEs
20.Installers Generators
21.Inversion of Control Dependency Injection
22.Issue Tracking
23.Logging Tools
24.Message
25.Mobile
26.Network Clients
27.Network Servers
28.Office
29.PDF
30.Persistence Frameworks
31.Portals
32.Profilers
33.Project Management
34.RSS RDF
35.Rule Engines
36.Script
37.Search Engines
38.Sound Audio
39.Source Control
40.SQL Clients
41.Template Engines
42.Testing
43.UML
44.Web Frameworks
45.Web Service
46.Web Testing
47.Wiki Engines
48.Windows Presentation Foundation
49.Workflows
50.XML Parsers
C# / C Sharp
C# / C Sharp by API
C# / CSharp Tutorial
C# / CSharp Open Source » Business Application » 32feet.NET 
32feet.NET » InTheHand » Net » Bluetooth » BTH_DEVICE_INFO.cs
// 32feet.NET - Personal Area Networking for .NET
//
// InTheHand.Net.Bluetooth.BTH_DEVICE_INFO
// 
// Copyright (c) 2003-2010 In The Hand Ltd, All rights reserved.
// This source code is licensed under the In The Hand Community License - see License.txt

using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace InTheHand.Net.Bluetooth{
    //
    // The BTH_DEVICE_INFO structure stores information about a Bluetooth device.
    //
    [StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential)]
    internal struct BTH_DEVICE_INFO
    {
        //
        // Combination BDIF_Xxx flags
        //
        internal BDIF flags;
        //
        // Address of remote device.
        //
        internal long address;
        //
        // Class Of Device.
        //
        internal uint classOfDevice;
        //
        // name of the device (As UTF8 String)
        //
        [MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst = NativeMethods.BTH_MAX_NAME_SIZE)]
        internal byte[] name;
    }


    [Flags]
    internal enum BDIF : int
    {
        // The address member contains valid data.
        ADDRESS = 0x00000001,
        // The classOfDevice member contains valid data.
        COD = 0x00000002,
        // The name member contains valid data.
        NAME = 0x00000004,
        // The device is a remembered and authenticated device.
        // The BDIF_PERSONAL flag is always set when this flag is set. 
        PAIRED = 0x00000008,
        // The device is a remembered device. 
        // If this flag is set and the BDIF_PAIRED flag is not set, the device is not authenticated.
        PERSONAL = 0x00000010,
        // The remote Bluetooth device is currently connected to the local radio.
        CONNECTED = 0x00000020,

        //
        // support added in kb942567
        //
        SHORT_NAME = 0x00000040,
        VISIBLE = 0x00000080,
        SSP_SUPPORTED = 0x00000100,
        SSP_PAIRED = 0x00000200,
        SSP_MITM_PROTECTED = 0x00000400,
        RSSI = 0x00001000,
        EIR = 0x00002000,
    }

    static class BDIFMasks
    {
        public const BDIF AllOrig = BDIF.ADDRESS | BDIF.COD | BDIF.NAME
            | BDIF.PAIRED | BDIF.PERSONAL | BDIF.CONNECTED;
        public const BDIF AllKb942567 = AllOrig
            | BDIF.SHORT_NAME | BDIF.VISIBLE
            | BDIF.SSP_SUPPORTED | BDIF.SSP_PAIRED | BDIF.SSP_MITM_PROTECTED
            | BDIF.RSSI | BDIF.EIR;
    }

}
www.java2v.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.