home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / olectc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.1 KB  |  65 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 __OLEContentTypeConverter_H
  20. //    Avoid include redundancy
  21. //
  22. #define __OLEContentTypeConverter_H
  23.  
  24. //    Purpose:    OLE content type converter
  25. //    Comments:   Handles all OLE automation servers that have registered themselves with Netscape.
  26.  
  27. #include "strmdata.h"
  28. #include "oleview1.h"
  29.  
  30. //    Structures
  31. //
  32. struct COLEStreamData : public CStreamData  {
  33.     CString m_csServerName; //  OLE Automation Server Name.
  34.     CString m_csMimeType;   //  The mime type of the data to handle.
  35.     COLEStreamData(const char *pServer, const char *pMimeType);
  36. };
  37.  
  38. struct COLEDownloadData {
  39.     IIViewer1 m_Viewer;
  40.     COLEStreamData *m_pCData;
  41.     enum    {
  42.         m_InitialBufferSize = 4096
  43.     };
  44.     BSTR m_pBuffer;
  45.     COLEDownloadData(COLEStreamData *pCData, const char *pAddress);
  46.     ~COLEDownloadData();
  47.  
  48.     //  Special hackage to handle the netlib not calling Ready before Write.
  49.     BOOL m_bReadyCalled;
  50. };
  51.  
  52.  
  53. //    Function declarations
  54. //
  55. extern "C"    {
  56. NET_StreamClass *ole_stream(int format_out, void *data_obj,
  57.     URL_Struct *URL_s, MWContext  *context);
  58. int ole_StreamWrite(NET_StreamClass *stream, const char *cpWriteData, int32 lLength);
  59. void ole_StreamComplete(NET_StreamClass *stream);
  60. void ole_StreamAbort(NET_StreamClass *stream, int iStatus);
  61. unsigned int ole_StreamReady(NET_StreamClass *stream);
  62. };
  63.  
  64. #endif // __OLEContentTypeConverter_H
  65.