home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / macfe / central / earlmgr.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.3 KB  |  75 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. // earlmgr.h, Mac front end
  20.  
  21. #ifndef _EarlMgr_
  22. #define _EarlMgr_
  23. #pragma once
  24.  
  25.     // client
  26. class CMimeMapper;
  27.     // project
  28. #include "xp_core.h"
  29. #include "ntypes.h"
  30. #include "client.h"
  31.     // utilities
  32. struct CStr255;
  33.     // libraries
  34. class LFileStream;
  35.     // system
  36.  
  37. /*****************************************************************************
  38.  *    EarlManager
  39.  *    Dispatcher of the load commands    
  40.  ******************************************************************************/
  41.  
  42. class EarlManager: public LPeriodical {
  43. public:
  44.                     EarlManager ();
  45.     
  46.     // ÑÑ URL loading interface
  47.     
  48.     // StartLoadURL tells network library to start loading the URL
  49.     static int        StartLoadURL (URL_Struct * request, MWContext *context,
  50.                         FO_Present_Types output_format);
  51.  
  52.     // Cancels all loads for a given context
  53.     static void     DoCancelLoad (MWContext *context);
  54.  
  55.     // Called by netlib when URL loading is done. This routine is passed to NET_LoadURL
  56.     static void     DispatchFinishLoadURL (URL_Struct *url, int status, MWContext *context);
  57.  
  58.     // ÑÑ Event handling
  59.     // Instead of calling NET_InterruptWindow at unsafe time (possible reentrancy)
  60.     // call this function. It will interrupt the window after netlib returns
  61.     void            InterruptThis(MWContext * context);
  62.     void            SpendTime (const EventRecord &inMacEvent);
  63.     void            SpendYieldedTime();
  64. private:
  65.     void             FinishLoadURL (URL_Struct *url, int status, MWContext *context);
  66.     MWContext *     fInterruptContext;        // Just used by InterruptThis
  67. };
  68.  
  69. extern EarlManager TheEarlManager;
  70.  
  71.  
  72. #endif // _EarlMgr_
  73.  
  74.  
  75.