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

  1. #ifndef _IMMREMED_
  2.    #define _IMMREMED_
  3. /*******************************************************************************
  4. * FILE NAME:  immremed.hpp                                                     *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the classes:                                                *
  8. *     IMMRemovableMedia                                                        *
  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 <immplayd.hpp>
  19. #include <istring.hpp>
  20. #include <inotify.hpp>
  21.  
  22. class IMMRemovableMediaHandler;
  23. class IMMRemovableMediaNotifyHandler;
  24. class IMMRemovableMediaData;
  25.  
  26. #pragma pack(4)
  27.  
  28.  
  29. class IMMRemovableMedia : public IMMPlayableDevice {
  30. typedef IMMPlayableDevice
  31.   Inherited;
  32. public:
  33. /*----------------------------- Constructors ---------------------------------*/
  34. virtual
  35.   ~IMMRemovableMedia();
  36.  
  37. /*-------------------------------- Door and Presence -------------------------*/
  38. virtual IMMRemovableMedia
  39.   &closeDoor     (CallType call = wait),
  40.   &openDoor      (Boolean open = true, CallType call = wait);
  41.  
  42. Boolean
  43.   isMediaPresent (CallType call = wait) const;
  44.  
  45.  
  46. /*----------------------- Notification Event Descriptions --------------------*/
  47. static INotificationId const
  48.   IC_IMPORTM mediaLoadedId;
  49.  
  50. /*----------------------- Observer Notification ------------------------------*/
  51. virtual IMMRemovableMedia
  52.  &enableNotification (Boolean enabled = true);
  53.  
  54. protected:
  55. /*----------------------------- Constructors ---------------------------------*/
  56.   IMMRemovableMedia (const IString& deviceName,
  57.                       Boolean openNow,
  58.                       unsigned long instance,
  59.                       Boolean openShareable);
  60.  
  61.   IMMRemovableMedia (unsigned long deviceIdentifier,
  62.                       const IString& newAlias = IString());
  63.  
  64. /*------------------- Observer Notification Implementation -------------------*/
  65. IMMRemovableMedia
  66.  &setNotificationHandler ( IMMRemovableMediaNotifyHandler* notifyHandler );
  67.  
  68. IMMRemovableMediaNotifyHandler
  69.  *notificationHandler    ( ) const;
  70.  
  71.  
  72. private:
  73. /*--------------------------------- Private ----------------------------------*/
  74. friend class IMMRemovableMediaHandler;
  75.  
  76. IMMRemovableMedia                         //aj: very platform-specific, private hides them better than protected
  77.   &startCheckMediaTimer(),
  78.   &stopCheckMediaTimer();
  79. void                                      //aj
  80.   checkMedia      (unsigned long timerId);
  81.  
  82. IMMRemovableMediaData
  83.   *fRemovableMediaData;
  84.  
  85.  
  86. }; // IMMRemvableMedia
  87.  
  88.  
  89. #pragma pack()
  90.  
  91. #endif /* _IMMREMED_ */
  92.