home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / ddectc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.3 KB  |  86 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 __DDEContentTypeConverter_H
  20. //    Avoid include redundancy
  21. //
  22. #define __DDEContentTypeConverter_H
  23.  
  24. //    Purpose:    DDE content type converter
  25. //    Comments:    Handles all DDE server's that have registered themselves
  26. //                    with Netscape.
  27. //    Revision History:
  28. //        01-06-95    created GAB
  29. //
  30.  
  31. //    Required Includes
  32. //
  33. #include "strmdata.h"
  34.  
  35. //    Constants
  36. //
  37.  
  38. //    Structures
  39. //
  40. struct CDDEStreamData : public CStreamData    {
  41.     enum    {
  42.         m_OpenDocument = 0,
  43.         m_ViewDocFile,
  44.         m_ViewDocData
  45.     };
  46.  
  47.     CString m_csServerName;    //    DDE server name
  48.     DWORD m_dwHowHandle;    //    What services the content type converter should handle the request.
  49.     BOOL m_bQueryViewer;    //    Should we query the viewer first?
  50.     CString m_csMimeType;    //    Our mime type
  51.     
  52.     CDDEStreamData(const char *pServer, const char *pMimeType,
  53.         DWORD dwSDIFlags, BOOL bQueryViewer);
  54. };
  55.  
  56. struct CDDEDownloadData    {
  57.     CFile *m_pStream;
  58.     CString m_csFileName;
  59.     CString m_csURL;
  60.     CDDEStreamData *m_pCData;
  61.     DWORD m_dwFrameID;
  62.     BOOL m_bDelete;
  63.     
  64.     CDDEDownloadData(CDDEStreamData *pCData, const char *pAddress,
  65.         DWORD dwFrameID);
  66. };
  67.  
  68. //    Global variables
  69. //
  70.  
  71. //    Macros
  72. //
  73.  
  74. //    Function declarations
  75. //
  76. extern "C"    {
  77. NET_StreamClass *dde_stream(int format_out, void *data_obj,
  78.     URL_Struct *URL_s, MWContext  *context);
  79. int dde_StreamWrite(NET_StreamClass *stream, const char *cpWriteData, int32 lLength);
  80. void dde_StreamComplete(NET_StreamClass *stream);
  81. void dde_StreamAbort(NET_StreamClass *stream, int iStatus);
  82. unsigned int dde_StreamReady(NET_StreamClass *stream);
  83. };
  84.  
  85. #endif // __DDEContentTypeConverter_H
  86.