home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / ncapiurl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.0 KB  |  72 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. #ifndef __NCAPI_URL_DATA_H
  20. #define __NCAPI_URL_DATA_H
  21.  
  22. //    This file used to define the data structure assigned into the ncapi_data
  23. //        of the URL_Struct for the windows front end.
  24.  
  25. class CNcapiUrlData    {
  26. public:
  27.     CNcapiUrlData(CAbstractCX *pCX, URL_Struct *pUrl);
  28.     ~CNcapiUrlData();
  29.  
  30. //    Context that we're tracking.
  31. private:
  32.     CAbstractCX *m_pCX;
  33. public:
  34.     void ChangeContext(CAbstractCX *pNewCX);
  35.  
  36. //    Url struct that we're tracking.
  37. private:
  38.     URL_Struct *m_pUrl;
  39.  
  40. //    Block deletion of a URL struct in some cases.
  41. private:
  42.     BOOL m_bDelete;
  43. public:
  44.     BOOL CanFreeUrl() const;
  45.     void DontFreeUrl();
  46.  
  47. //    Setting of a progress application.
  48. private:
  49.     CString m_csProgressServer;
  50. public:
  51.     void SetProgressServer(CString& csProgressServer);
  52.     BOOL HasProgressServer() const;
  53.     void ClearProgressServer();
  54.  
  55. //    Progress callbacks into us, which we then route to an ncapi
  56. private:
  57.     DWORD m_dwTransactionID;
  58.     BOOL m_bInitializedProgress;
  59. public:
  60.     BOOL Alert(const char *pMessage);
  61.     BOOL Confirm(const char *pMessage);
  62.     void MakingProgress(const char *pMessage, int iPercent);
  63.     void InitializeProgress();
  64.     void EndProgress();
  65.  
  66. //    How to get the transaction ID.
  67. public:
  68.     DWORD GetTransactionID() const;
  69. };
  70.  
  71. #endif // __NCAPI_URL_DATA_H
  72.