home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / samples / wps / carpp / horn.h < prev    next >
C/C++ Source or Header  |  1999-05-11  |  2KB  |  51 lines

  1. /******************************************************************************
  2. *
  3. *  Module Name: HORN.H
  4. *
  5. *  OS/2 Work Place Shell Sample Program - SOM 2.0 / IDL Version
  6. *
  7. *  Copyright (C) 1992-1995 IBM Corporation
  8. *
  9. *      DISCLAIMER OF WARRANTIES.  The following [enclosed] code is
  10. *      sample code created by IBM Corporation. This sample code is not
  11. *      part of any standard or IBM product and is provided to you solely
  12. *      for  the purpose of assisting you in the development of your
  13. *      applications.  The code is provided "AS IS", without
  14. *      warranty of any kind.  IBM shall not be liable for any damages
  15. *      arising out of your use of the sample code, even if they have been
  16. *      advised of the possibility of such damages.                                                    *
  17. *
  18. *  Description:
  19. *
  20. *      This file contains the declaration of class Horn.  Horn is a C++ class
  21. *       whose client is Carpp which is a SOM class.  This is one example of
  22. *       the use of C++ constructs in the implementation of a SOM class.
  23. *
  24. *      Horn is the abstraction of a real car's horn.  It has two user settable
  25. *       tones and a user settable duration.  A request to beep the horn will
  26. *       cause the high tone to be sounded for the specified duration followed
  27. *       by the low tone being sounded for the specified duration.
  28. ******************************************************************************/
  29. #include "carpp.xih"
  30.  
  31. class Horn
  32. {
  33.   ULONG lowTone;
  34.   ULONG highTone;
  35.   ULONG duration;
  36.  
  37. public:
  38.   Horn(VOID);
  39.   ULONG QueryDuration(VOID);
  40.   VOID  SetDuration(ULONG ulDuration);
  41.   ULONG QueryHighTone(VOID);
  42.   VOID  SetHighTone(ULONG ulTone);
  43.   ULONG QueryLowTone(VOID);
  44.   VOID  SetLowTone(ULONG ulTone);
  45.   VOID  SetToDefault(VOID);
  46.   VOID  Beep(VOID);
  47.   VOID  SaveState(Carpp *clientObject, PSZ CarClassTitle);
  48.   VOID  RestoreState(Carpp *clientObject, PSZ CarClassTitle);
  49. };
  50. /********************************  END  horn.h    ********************************/
  51.