home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / header45.zip / qos.h < prev    next >
C/C++ Source or Header  |  1999-03-15  |  2KB  |  74 lines

  1. #ifdef __cplusplus
  2.    extern "C" {
  3. #endif
  4.  
  5. #ifndef _QOS_H_
  6. #define _QOS_H_
  7.  
  8. /*
  9.  * macros to get desired or minimum qos
  10.  * value from the component and macro to
  11.  * get a composite from the two component
  12.  */
  13.  
  14. #define DESIREDQOS(composite)           ((composite) >> 16)
  15. #define MINIMUMQOS(composite)           ((composite) && 0x0000FFFF)
  16. #define COMPOSITEQOS(desired,minimum)   (((desired)<<16)+(minimum))
  17.  
  18. /*
  19.  * Quality of service values
  20.  */
  21. #define QOS_COMPLETE     100
  22. #define QOS_NONE           1
  23. #define QOS_DEFAULT        0
  24. #define QOS_RESERVED     0xFF        /*values below this reserved */
  25.  
  26. /*
  27.  * Composite quality of service values
  28.  */
  29. #define GUARANTEED       COMPOSITEQOS(QOS_COMPLETE, QOS_COMPLETE)
  30. #define DONTCARE         COMPOSITEQOS(QOS_COMPLETE, QOS_NONE)
  31. #define DONTRESERVE      COMPOSITEQOS(QOS_NONE, QOS_NONE)
  32. #define SYSTEMDEFAULT    COMPOSITEQOS(QOS_DEFAULT, QOS_DEFAULT)
  33.  
  34. /*
  35.  * How should qos errors be reported?
  36.  */
  37. #define ERROR_REPORT     1           /* report to the user */
  38. #define ERROR_IGNORE     2           /* ignore them        */
  39. #define ERROR_DEFAULT    0           /* according to the system setting */
  40.  
  41. /*
  42.  * qos parameters
  43.  */
  44. #define SERVICE_REQUEST         1    /* service quality requested */
  45. #define MAX_EE_JITTER           2    /* allowable jitter          */
  46. #define MAX_DATA_RATE           3    /* maximum streaming rate    */
  47. #define AVG_DATA_RATE           4    /* avg. streaming rate       */
  48.  
  49. /*
  50.  * mmiom_beginstream parameters
  51.  */
  52. #define STREAM_READ             1
  53. #define STREAM_WRITE            2
  54.  
  55. /*
  56.  * qos structures - definitions
  57.  */
  58.  
  59. typedef struct _QOS {                /* qos parameter          */
  60.      LONG  lQOSParmId;               /* qos parameter name     */
  61.      LONG  lQOSValue;                /* value of the parameter */
  62. } QOS, *PQOS;
  63. typedef struct _QOSInfo {
  64.      LONG            lNumQOSParms;   /* number of qos parameters */
  65.      QOS             QOSParms[1];    /* array of qos parameters  */
  66. } QOSInfo, *PQOSInfo;
  67.  
  68. #endif /* _QOS_H_ */
  69.  
  70. #ifdef __cplusplus
  71. }
  72. #endif
  73.  
  74.