home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / include / msgmapi.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.6 KB  |  81 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. /*
  20. ** msgmapi.h -- implements XP mail/news support for the Microsoft Mail API (MAPI)
  21. **
  22. */
  23.  
  24. #ifndef _MSGMAPI_H
  25. #define _MSGMAPI_H
  26.  
  27. #ifdef XP_WIN
  28.  
  29. #include "msgcom.h"
  30. #include "abcom.h"
  31.  
  32. // rhp - to fix the problem caused by MSFT...grrrrr...
  33. #ifndef MAPI_OLE    // Because MSFT doesn't do this for us :-(
  34. #include <mapi.h>         // for MAPI specific types...        
  35. #endif 
  36.  
  37. #ifdef XP_CPLUSPLUS
  38. class MSG_MapiListContext;
  39. #else
  40. typedef struct MSG_MapiListContext MSG_MapiListContext;
  41. #endif
  42.  
  43. XP_BEGIN_PROTOS
  44.  
  45. MessageKey MSG_GetFirstKeyInFolder (MSG_FolderInfo *folder, MSG_MapiListContext **cookie);
  46. MessageKey MSG_GetNextKeyInFolder (MSG_MapiListContext *cookie);
  47. XP_Bool MSG_GetMapiMessageById (MSG_FolderInfo *folder, MessageKey key, lpMapiMessage *message);
  48. XP_Bool MSG_MarkMapiMessageRead (MSG_FolderInfo *folder, MessageKey key, XP_Bool read);
  49. void MSG_FreeMapiMessage (lpMapiMessage msg);
  50.  
  51. /* Address Book Specific APIs to support MAPI calls for MAPIDetails and MAPIResolveName */
  52.  
  53. int AB_MAPI_ResolveName(
  54.     char * string,
  55.     AB_ContainerInfo ** ctr, /* caller allocates ptr to ctr, BE fills. Caller must close the ctr when done */
  56.     ABID * id);
  57.  
  58. /* Caller must free the character strings returned by these functions using XP_FREE */
  59. char * AB_MAPI_GetEmailAddress(AB_ContainerInfo * ctr,ABID id);
  60.  
  61. char * AB_MAPI_GetFullName(AB_ContainerInfo * ctr, ABID id);
  62.  
  63. char * AB_MAPI_ConvertToDescription(AB_ContainerInfo * ctr);
  64.  
  65. AB_ContainerInfo * AB_MAPI_ConvertToContainer(char * description);
  66.  
  67. int AB_MAPI_CreatePropertySheetPane(
  68.     MWContext * context,
  69.     MSG_Master * master,
  70.     AB_ContainerInfo * ctr, 
  71.     ABID id,
  72.     MSG_Pane **  personPane); /* BE fills the ptr with a person pane */
  73.  
  74. void AB_MAPI_CloseContainer(AB_ContainerInfo ** ctr);
  75.  
  76. XP_END_PROTOS
  77.  
  78. #endif /* XP_WIN */
  79.  
  80. #endif /* _MSGMAPI_H */
  81.