home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / immplayd.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  4.1 KB  |  103 lines

  1. #ifndef _IMMPLAYD_
  2.    #define _IMMPLAYD_
  3. /*******************************************************************************
  4. * FILE NAME: immplayd.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the classes:                                                *
  8. *     IMMPlayableDevice                                                        *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   IBM Open Class Library                                                     *
  12. *   (C) Copyright International Business Machines Corporation 1992, 1996       *
  13. *   Licensed Material - Program-Property of IBM - All Rights Reserved.         *
  14. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  15. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  16. *                                                                              *
  17. *******************************************************************************/
  18. #include <immdev.hpp>
  19.  
  20. #include <itimer.hpp>
  21.  
  22. class IString;
  23.  
  24. class IMMDeviceSettings;
  25.  
  26. #pragma pack(4)
  27.  
  28.  
  29. class IMMPlayableDevice : public IMMDevice {
  30. typedef IMMDevice
  31.   Inherited;
  32. public:
  33. /*----------------------------- Constructors ---------------------------------*/
  34. virtual
  35.   ~IMMPlayableDevice ();
  36.  
  37. /*----------------------------- Start and Stop -------------------------------*/
  38. virtual IMMPlayableDevice
  39.   &cueForPlayback       (CallType call = wait),
  40.   &play                 (const IMMTime& from = IMMTime(),
  41.                          const IMMTime& to   = IMMTime(),
  42.                          Boolean resumeIfPaused = true,
  43.                          CallType call = nowait),
  44.   &stop                 (CallType call = wait);
  45.  
  46. /*----------------------------- Pause and Resume -----------------------------*/
  47. virtual IMMPlayableDevice
  48.   &pause                (CallType call = wait),
  49.   &resume               (Boolean resume = true, CallType call = wait);
  50.  
  51. /*----------------------------- Seek -----------------------------------------*/
  52. virtual IMMPlayableDevice
  53.   &seek                 (const IMMTime& to, CallType call = wait),
  54.   &seekToEnd            (CallType call = wait),
  55.   &seekToStart          (CallType call = wait),
  56.   &stepFrame            (unsigned long frames = 1, Boolean forward = true,
  57.                          CallType call = wait);
  58.  
  59. /*----------------------------- Cue Points -----------------------------------*/
  60.  
  61. /*----------------------------- Notifications --------------------------------*/
  62. virtual IMMPlayableDevice
  63.   &stopPositionTracking (CallType call = wait),
  64.   &startPositionTracking(const IMMTime& timeInterval, CallType call = wait);
  65.  
  66. unsigned long
  67.   length                (CallType call = wait) const,
  68.   position              (CallType call = wait) const;
  69.  
  70. protected:
  71. /*----------------------------- Constructors ---------------------------------*/
  72.   IMMPlayableDevice  (const IString& deviceOrFileName,
  73.                       Boolean openNow = true,
  74.                       unsigned long instance = 0,
  75.                       Boolean openShareable = true);
  76.   IMMPlayableDevice  (unsigned long deviceIdentifier,
  77.                       const IString& newAlias = IString());
  78.  
  79. /*-------------------------------- Implementation ----------------------------*/
  80. virtual IMMPlayableDevice
  81.   &saveDeviceSettings     (),
  82.   &restoreDeviceSettings  (Boolean newRecordMode = false);
  83.  
  84. private:
  85. /*--------------------------------- Private ----------------------------------*/
  86.  
  87. void
  88.   setPositionAdvise (const IMMTime &time, Boolean on, CallType call);
  89.  
  90. // use this to emulate the OS/2 MCI_SET_POSITION_ADVISE command
  91. ITimer
  92.   positionTimer ;
  93. void
  94.   positionTimerChange() ;
  95. IMMDeviceSettings
  96.   *fDeviceSettings ;
  97. }; // IMMPlayableDevice
  98.  
  99.  
  100. #pragma pack()
  101.  
  102. #endif /* _IMMPLAYD_ */
  103.