home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / AutoPC / apcsdk10.exe / data1.cab / Emulation_Include_Files / af_irda.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-05-13  |  3.0 KB  |  124 lines

  1. /*++
  2. THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  3. ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  4. THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  5. PARTICULAR PURPOSE.
  6. Copyright (c) 1995, 1996, 1997  Microsoft Corporation
  7.  
  8. Module Name:  
  9.  
  10. af_irda.h
  11.  
  12. Abstract:
  13.  
  14. Support for the address family AF_IRDA for use with winsock.
  15.  
  16. Notes: 
  17.  
  18.  
  19. --*/
  20.  
  21. // @CESYSGEN IF CE_MODULES_WINSOCK
  22.  
  23. #ifndef __AFIRDA__
  24. #define __AFIRDA__
  25.  
  26. #include <winsock.h>
  27.  
  28. #define AF_IRDA    22              // see winsock.h
  29. #define PF_IRDA AF_IRDA
  30.  
  31. #define SOL_IRLMP                0x00FF
  32.  
  33. #define IRLMP_ENUMDEVICES       0x00000010
  34. #define IRLMP_IAS_SET           0x00000011
  35. #define IRLMP_IAS_QUERY         0x00000012
  36. #define IRLMP_SEND_PDU_LEN      0x00000013
  37. #define IRLMP_EXCLUSIVE_MODE    0x00000014
  38. #define IRLMP_IRLPT_MODE        0x00000015
  39. #define IRLMP_9WIRE_MODE        0x00000016
  40. // Some Sharp Zaurus's will do a LAP disconnect without doing
  41. // a LMP disconnect. This forces the IrDA stack to treat this
  42. // as a graceful close.
  43. #define IRLMP_SHARP_MODE        0x00000020
  44.  
  45.  
  46. #define IAS_ATTRIB_NO_CLASS     0x00000010
  47. #define IAS_ATTRIB_NO_ATTRIB    0x00000000
  48. #define IAS_ATTRIB_INT          0x00000001
  49. #define IAS_ATTRIB_OCTETSEQ     0x00000002
  50. #define IAS_ATTRIB_STR          0x00000003
  51.  
  52. typedef struct _SOCKADDR_IRDA
  53. {
  54.     u_short    irdaAddressFamily;
  55.     u_char  irdaDeviceID[4];
  56.     char    irdaServiceName[25];
  57. } SOCKADDR_IRDA, *PSOCKADDR_IRDA;
  58.  
  59. typedef struct _IRDA_DEVICE_INFO
  60. {
  61.     u_char  irdaDeviceID[4];
  62.     char    irdaDeviceName[22];
  63.     u_char  Reserved[2];
  64. } IRDA_DEVICE_INFO, *PIRDA_DEVICE_INFO, FAR *LPIRDA_DEVICE_INFO;
  65.  
  66. typedef struct _DEVICELIST
  67. {
  68.     ULONG               numDevice;
  69.     IRDA_DEVICE_INFO    Device[1];
  70. } DEVICELIST, *PDEVICELIST, FAR *LPDEVICELIST;
  71.  
  72. typedef struct _IAS_SET
  73. {
  74.     char    irdaClassName[61];
  75.     char    irdaAttribName[61];
  76.     u_short irdaAttribType;
  77.     union
  78.     {
  79.         int irdaAttribInt;
  80.         struct
  81.         {
  82.             int     Len;
  83.             u_char  OctetSeq[1];
  84.             u_char  Reserved[3];
  85.         } irdaAttribOctetSeq;
  86.         struct
  87.         {
  88.             int     Len;
  89.             u_char  CharSet;
  90.             u_char  UsrStr[1];
  91.             u_char  Reserved[2];
  92.         } irdaAttribUsrStr;
  93.     } irdaAttribute;
  94. } IAS_SET, *PIAS_SET, FAR *LPIAS_SET;
  95.  
  96. typedef struct _IAS_QUERY
  97. {
  98.     u_char  irdaDeviceID[4];
  99.     char    irdaClassName[61];
  100.     char    irdaAttribName[61];
  101.     u_short irdaAttribType;
  102.     union
  103.     {
  104.         int irdaAttribInt;
  105.         struct
  106.         {
  107.             int     Len;
  108.             u_char  OctetSeq[1];
  109.             u_char  Reserved[3];
  110.         } irdaAttribOctetSeq;
  111.         struct
  112.         {
  113.             int     Len;
  114.             u_char  CharSet;
  115.             u_char  UsrStr[1];
  116.             u_char  Reserved[2];
  117.         } irdaAttribUsrStr;
  118.     } irdaAttribute;
  119. } IAS_QUERY, *PIAS_QUERY, FAR *LPIAS_QUERY;
  120.  
  121. #endif // __AFIRDA__
  122.  
  123. // @CESYSGEN ENDIF
  124.