home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / apimsg.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  3.6 KB  |  102 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 _APIMSG_H
  20. #define _APIMSG_H
  21.  
  22. #ifndef __APIAPI_H
  23.     #include "apiapi.h"
  24. #endif
  25. #ifndef __NSGUIDS_H
  26.     #include "nsguids.h"
  27. #endif
  28.  
  29. #include "msgcom.h"
  30. /////////////////////////////////////////////////////////////////////
  31. // This interface applies to those MSG_Panes that are compose windows
  32.  
  33. class IMsgCompose: public IUnknown {
  34. public:
  35. // Initialization/Demolition
  36.     virtual void InitializeMailCompositionContext( MSG_Pane* comppane, 
  37.                                                    const char *from,
  38.                                                    const char *reply_to,
  39.                                                    const char *to,
  40.                                                    const char *cc,
  41.                                                    const char *bcc,
  42.                                                    const char *fcc,
  43.                                                    const char *newsgroups,
  44.                                                    const char *followup_to,
  45.                                                    const char *subject,
  46.                                                    const char *attachment ) = 0;
  47.     virtual void RaiseMailCompositionWindow( MSG_Pane* comppane ) = 0;
  48.     virtual void DestroyMailCompositionContext( MWContext* context ) = 0;
  49.  
  50. // Misc Operations
  51.     virtual void UpdateToolbar ( MSG_Pane* comppane ) = 0;
  52.     virtual void MsgShowHeaders ( MSG_Pane* comppane, MSG_HEADER_SET headers ) = 0;
  53.     virtual char *PromptMessageSubject( MSG_Pane* comppane ) = 0;
  54.  
  55. // Message Operations
  56.     virtual void InsertMessageCompositionText( MSG_Pane* comppane,
  57.                                                const char *text,
  58.                                                XP_Bool leaveCursorAtBeginning) = 0;
  59.     virtual int GetMessageBody( MSG_Pane* comppane,
  60.                                 char **body,
  61.                                 uint32 *body_size,
  62.                                 MSG_FontCode **font_changes ) = 0;                                
  63.     virtual void DoneWithMessageBody(MSG_Pane* comppane, char* body,
  64.                                      uint32 body_size) = 0;
  65. };
  66.  
  67. typedef IMsgCompose *LPMSGCOMPOSE;
  68.  
  69. ///////////////////////////////////////////////////////////
  70. // This interface applies to those MSG_Panes that are lists
  71.  
  72. class IMsgList: public IUnknown {
  73. public:
  74. // Operations
  75.     virtual void ListChangeStarting( MSG_Pane* pane, XP_Bool asynchronous,
  76.                                      MSG_NOTIFY_CODE notify, MSG_ViewIndex where,
  77.                                      int32 num) = 0;
  78.     virtual void ListChangeFinished( MSG_Pane* pane, XP_Bool asynchronous,
  79.                                      MSG_NOTIFY_CODE notify, MSG_ViewIndex where,
  80.                                      int32 num) = 0;
  81.     virtual void GetSelection( MSG_Pane* pane, MSG_ViewIndex **indices, int *count, 
  82.                                int *focus) = 0;
  83.     virtual void SelectItem( MSG_Pane* pane, int item ) = 0;
  84.  
  85.     virtual void CopyMessagesInto( MSG_Pane *pane, MSG_ViewIndex *indices, int count,
  86.                                    MSG_FolderInfo *folderInfo) = 0;
  87.     virtual void MoveMessagesInto( MSG_Pane *pane, MSG_ViewIndex *indices, int count,
  88.                                    MSG_FolderInfo *folderInfo) = 0;
  89. };
  90.  
  91. typedef IMsgList *LPMSGLIST;
  92.  
  93. /* Unfiled: 
  94.     MSG_Pane*    FE_CreateCompositionPane( MWContext *context);
  95.     char*        FE_GetTempFileFor( MWContext *context, const char *fname,
  96.                                     XP_FileType ftype, XP_FileType *rettype);
  97.     void        FE_UpdateBiff( MSG_BIFF_STATE state );
  98.     uint32        FE_DiskSpaceAvailable (MWContext *context, const char *dir);
  99. */
  100.  
  101. #endif
  102.