From 118e44a2ec46c3161b65e849dc3f243bd2474dba Mon Sep 17 00:00:00 2001 From: "bryner%uiuc.edu" Date: Tue, 1 Aug 2000 22:35:28 +0000 Subject: [PATCH] Removing unused files. Not part of the build. r=cls. --- include/ds.h | 271 ----------------------- include/dserr.h | 37 ---- include/garray.h | 261 ---------------------- include/imap.h | 529 -------------------------------------------- include/itapefs.h | 180 --------------- include/libcnv.h | 213 ------------------ include/libstyle.h | 39 ---- include/mcom_ndbm.h | 98 -------- include/msg_filt.h | 224 ------------------- include/msg_srch.h | 470 --------------------------------------- include/msgnet.h | 513 ------------------------------------------ include/np2.h | 38 ---- include/nsldap.h | 23 -- include/nslocks.h | 56 ----- include/ntos.h | 124 ----------- include/pics.h | 70 ------ include/prefetch.h | 30 --- include/pwcacapi.h | 103 --------- include/shr_str.h | 74 ------- include/timing.h | 242 -------------------- include/undo.h | 130 ----------- include/vcc.h | 80 ------- include/vobject.h | 428 ----------------------------------- include/xp_hash.h | 156 ------------- include/xp_help.h | 291 ------------------------ include/xp_mesg.h | 62 ------ include/xp_ncent.h | 68 ------ include/xp_qsort.h | 52 ----- include/xp_rgb.h | 40 ---- include/xp_thrmo.h | 39 ---- include/xp_time.h | 70 ------ include/xplocale.h | 159 ------------- 32 files changed, 5170 deletions(-) delete mode 100644 include/ds.h delete mode 100644 include/dserr.h delete mode 100644 include/garray.h delete mode 100644 include/imap.h delete mode 100644 include/itapefs.h delete mode 100644 include/libcnv.h delete mode 100644 include/libstyle.h delete mode 100644 include/mcom_ndbm.h delete mode 100644 include/msg_filt.h delete mode 100644 include/msg_srch.h delete mode 100644 include/msgnet.h delete mode 100644 include/np2.h delete mode 100644 include/nsldap.h delete mode 100644 include/nslocks.h delete mode 100644 include/ntos.h delete mode 100644 include/pics.h delete mode 100644 include/prefetch.h delete mode 100644 include/pwcacapi.h delete mode 100644 include/shr_str.h delete mode 100644 include/timing.h delete mode 100644 include/undo.h delete mode 100644 include/vcc.h delete mode 100644 include/vobject.h delete mode 100644 include/xp_hash.h delete mode 100644 include/xp_help.h delete mode 100644 include/xp_mesg.h delete mode 100644 include/xp_ncent.h delete mode 100644 include/xp_qsort.h delete mode 100644 include/xp_rgb.h delete mode 100644 include/xp_thrmo.h delete mode 100644 include/xp_time.h delete mode 100644 include/xplocale.h diff --git a/include/ds.h b/include/ds.h deleted file mode 100644 index 568dc39a054b..000000000000 --- a/include/ds.h +++ /dev/null @@ -1,271 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -#ifndef __DS_h_ -#define __DS_h_ -#ifdef XP_WIN32 -#include -#endif /* XP_WIN32 */ - -#ifdef XP_OS2 -#define INCL_WIN -#define INCL_GPI -#define TID OS2TID /* global rename in OS2 H's! */ -#include -#undef TID /* and restore */ -#endif - -#include "xp_mcom.h" - -XP_BEGIN_PROTOS - -/* Typedefs */ -typedef struct DSArrayStr DSArray; -typedef struct DSLinkStr DSLink; -typedef struct DSListStr DSList; -typedef struct DSArenaStr DSArena; - -#define DS_MIN(a,b) ((a)<(b)?(a):(b)) -#define DS_MAX(a,b) ((a)>(b)?(a):(b)) - -/* -** Your basic boolean. Done as an enum to cause compiler warnings when a -** boolean procedure doesn't return the right value. -** LISA SEZ: Please do not use this; use PRBool instead. Eventually -** (as soon as I can "make it so") DSBool is going away in favor of PRBool. -*/ -typedef enum DSBoolEnum { - DSTrue = 1, - DSFalse = 0 -} DSBool; - -/* -** A status code. Status's are used by procedures that return status -** values. Again the motivation is so that a compiler can generate -** warnings when return values are wrong. Correct testing of status codes: -** -** DSStatus rv; -** rv = some_function (some_argument); -** if (rv != DSSuccess) -** do_an_error_thing(); -** -*/ -typedef enum DSStatusEnum { - DSWouldBlock = -2, - DSFailure = -1, - DSSuccess = 0 -} DSStatus; - -/* -** A comparison code. Used for procedures that return comparision -** values. Again the motivation is so that a compiler can generate -** warnings when return values are wrong. -*/ -typedef enum DSComparisonEnum { - DSLessThan = -1, - DSEqual = 0, - DSGreaterThan = 1 -} DSComparison; - -typedef void (*DSElementFreeFunc)(void *e1, DSBool freeit); -typedef int (*DSElementCompareFunc)(void *e1, void *e2); - -/************************************************************************/ - -/* -** Simple variable length array of pointers. The array keeps a NULL -** pointer at the end of the array. -*/ -struct DSArrayStr { - void **things; - DSElementFreeFunc freeElement; -}; - -extern DSArray *DS_CreateArray(int slots); -extern DSStatus DS_GrowArray(DSArray *da, int slots); -extern void DS_SetArrayMethods(DSArray *da, DSElementFreeFunc freeFunc); -extern void DS_DestroyArray(DSArray *da, DSBool freeit); -extern void DS_Sort(DSArray *da, DSElementCompareFunc compare); -extern int DS_Elements(DSArray *da); -extern DSStatus DS_AddElement(DSArray *da, void *element); -extern void DS_RemoveElement(DSArray *da, void *element); - -/************************************************************************/ - -/* -** Circular linked list. Each link contains a pointer to the object that -** is actually in the list. -*/ -struct DSLinkStr { - DSLink *next; - DSLink *prev; - void *thing; -}; - -struct DSListStr { - DSLink link; -}; - -#define DS_InitList(lst) \ -{ \ - (lst)->link.next = &(lst)->link; \ - (lst)->link.prev = &(lst)->link; \ - (lst)->link.thing = 0; \ -} - -#define DS_ListEmpty(lst) \ - ((lst)->link.next == &(lst)->link) - -#define DS_ListHead(lst) \ - ((lst)->link.next) - -#define DS_ListTail(lst) \ - ((lst)->link.prev) - -#define DS_ListIterDone(lst,lnk) \ - ((lnk) == &(lst)->link) - -#define DS_AppendLink(lst,lnk) \ -{ \ - (lnk)->next = &(lst)->link; \ - (lnk)->prev = (lst)->link.prev; \ - (lst)->link.prev->next = (lnk); \ - (lst)->link.prev = (lnk); \ -} - -#define DS_InsertLink(lst,lnk) \ -{ \ - (lnk)->next = (lst)->link.next; \ - (lnk)->prev = &(lst)->link; \ - (lst)->link.next->prev = (lnk); \ - (lst)->link.next = (lnk); \ -} - -#define DS_RemoveLink(lnk) \ -{ \ - (lnk)->next->prev = (lnk)->prev; \ - (lnk)->prev->next = (lnk)->next; \ - (lnk)->next = 0; \ - (lnk)->prev = 0; \ -} - -extern DSLink *DS_NewLink(void *thing); -extern DSLink *DS_FindLink(DSList *lst, void *thing); -extern void DS_DestroyLink(DSLink *lnk, DSBool freeit); - -/************************************************************************/ - -/* -** Memory manager -*/ - -/* -** at one time XP_Block was a float* to force clients to cast things -** before use. Now DSBlock is defined since that will be most convenient -** for almost all uses. -*/ - -typedef unsigned char *DSBlock; -/* -** Allocate some memory. Always allocates at least one byte of memory. -*/ -extern void *DS_Alloc(size_t bytes); - -/* -** Reallocate some memory, growing or shrinking the memory. -*/ -extern void *DS_Realloc(void *oldptr, size_t bytes); - -/* -** Allocate and then zero some memory. Always allocates at least one byte -** of memory. -*/ -extern void *DS_Zalloc(size_t bytes); - -/* -** Allocate a block of memory. Always allocates at least one byte of -** memory. -*/ -extern DSBlock DS_AllocBlock(size_t bytes); - -/* -** Reallocate a block of memory, growing or shrinking the memory block. -*/ -extern DSBlock DS_ReallocBlock(DSBlock block, size_t newBytes); - -/* -** Free a block of memory. Safe to use on null pointers. -*/ -extern void DS_FreeBlock(DSBlock block); - -/* -** Free a chunk of memory. Safe to use on null pointers. -*/ -extern void DS_Free(void *ptr); - -/* -** Zero and then free a chunk of memory. Safe to use on null pointers. -*/ -extern void DS_Zfree(void *ptr, size_t bytes); - -/* - * Low cost Malloc Arenas. - * - * The chunks are a linked list. - * The beginning of each chunk is a pointer to the next chunk. - */ -struct DSArenaStr { - unsigned long chunkSize; /* size of each chunk */ - unsigned int refCount; /* reference count */ - void ** firstChunk; /* pointer to first chunk */ - void ** lastChunk; /* pointer to last chunk */ - void * pLast; /* last item allocated */ - void * pCur; /* beginning of free area */ - void * pCurEnd; /* end of free area in current chunk */ -}; - -/* make a new arena */ -extern DSArena * -DS_NewArena(unsigned long chunkSize); - -/* destroy an arena, and free all memory associated with it */ -extern void -DS_FreeArena(DSArena *arena, DSBool zero); - -/* malloc a chunk of data from the arena */ -extern void * -DS_ArenaAlloc(DSArena *arena, unsigned long size); - -/* malloc a chunk of data from the arena, zero filling it */ -extern void * -DS_ArenaZalloc(DSArena *arena, unsigned long size); - -/* change the size of an object, works best if it was the last object - * allocated - */ -extern void * -DS_ArenaGrow(DSArena *arena, void *pOld, unsigned long oldsize, - unsigned long newsize); - -XP_END_PROTOS - -#endif /* __DS_h_ */ diff --git a/include/dserr.h b/include/dserr.h deleted file mode 100644 index dbb151fb7e5b..000000000000 --- a/include/dserr.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -#ifndef __DS_ERR_h_ -#define __DS_ERR_h_ - -#define DS_ERROR_BASE (-0x1000) -#define DS_ERROR_LIMIT (DS_ERROR_BASE + 1000) - -#define IS_DS_ERROR(code) \ - (((code) >= DS_ERROR_BASE) && ((code) < DS_ERROR_LIMIT)) - -/* -** DS library error codes -*/ -#define DS_ERROR_OUT_OF_MEMORY (DS_ERROR_BASE + 0) - -#endif /* __DS_ERR_h_ */ diff --git a/include/garray.h b/include/garray.h deleted file mode 100644 index 2eb7488ec70e..000000000000 --- a/include/garray.h +++ /dev/null @@ -1,261 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - - -// -// Warning: This is a C++ file. -// -// -// This implements cross platform Growable arrays of Pointers. -// -#ifndef _GARRAY_H_ -#define _GARRAY_H_ - -// -// On Unix (well at least Solaris) we are having troubles with -// templates, so hey, we won't use them...djw. -// -// On Mac we are having troubles as well, so add me to the list. -// Now, why even have templates?...jar -// -#if ! ( defined(XP_WIN16) || defined(XP_UNIX) || defined(XP_MAC) ) -#define TEMPLATE_SUPPORT 1 -#endif - -#include "prtypes.h" - -class CXP_GrowableArray { -protected: - void **m_pData; - int m_iSize; - int m_iAllocSize; - - int NewSize( int iMinSize){ - int iNewSize = MAX( m_iAllocSize,16) ; - while( iNewSize < iMinSize ){ - iNewSize = iNewSize+iNewSize; - } - return iNewSize; - } - - // - // this is the routine that does the actual work. Should be in - // its own file. - // - void GuaranteeSize(int iSize){ - if(m_iAllocSize <= iSize){ - int iNewSize = NewSize( iSize ); - if( m_iAllocSize ){ - void ** pNewData = new void*[iNewSize]; - XP_BCOPY( m_pData, pNewData, m_iAllocSize * sizeof(void*) ); - delete [] m_pData; - m_pData = pNewData; - } - else{ - m_pData = new void*[iNewSize]; - } - m_iAllocSize = iNewSize; - } - } - -public: - CXP_GrowableArray(int iStartSize=0): m_pData(0),m_iSize(0),m_iAllocSize(0){ - if( iStartSize ){ - GuaranteeSize( iStartSize ); - } - }; - - ~CXP_GrowableArray(){ delete [] m_pData; } - - int Size(){ return m_iSize; } - - void SetSize( int iSize ){ - GuaranteeSize( iSize ); - m_iSize = iSize; - } - - void* operator[](int nIndex) const { return m_pData[nIndex]; } - void*& operator[](int nIndex){ return m_pData[nIndex]; } - - int Add(void* newElement){ - GuaranteeSize(m_iSize+1); - m_pData[m_iSize] = newElement; - /* Return index to last item in list */ - return m_iSize++; - } - - int Insert(void* newElement, int nIndex){ - intn iLowerLimit; - GuaranteeSize(m_iSize+1); - - if( nIndex < 0 ) - nIndex = 0; - - if( nIndex < m_iSize ) - { - iLowerLimit = PR_MAX(1, nIndex); - /* Shuffle pointers at and above insert index up */ - for( int i = m_iSize; i >= iLowerLimit; i-- ) - { - m_pData[i] = m_pData[i-1]; - } - /* Overwrite pointer at designated location */ - m_pData[nIndex] = newElement; - } else { - /* nIndex is too large - just add at end */ - m_pData[m_iSize] = newElement; - } - /* Return index to last item in list */ - return m_iSize++; - } - - int Delete( int nIndex ){ - if( nIndex < m_iSize ) - { - /* Shuffle remaining pointers down */ - for( int i = nIndex; i < m_iSize-1; i++ ) - { - m_pData[i] = m_pData[i+1]; - } - m_iSize--; - } - /* Return index to last item in list */ - return (m_iSize-1); - } - - int Delete( void* element ){ - for( int i = 0; i < m_iSize; i++ ) - { - if( m_pData[i] == element ) - { - return Delete(i); - } - } - return (m_iSize-1); - } - - int Find( void* element ){ - for( int i = 0; i < m_iSize; i++ ) - { - if( m_pData[i] == element ) - { - return i; - } - } - return -1; - } - - void Empty(){ - m_iSize = 0; - } -}; - -class CXP_PtrStack : public CXP_GrowableArray{ -public: - int m_iTop; - CXP_PtrStack(): m_iTop(-1){} - Bool IsEmpty(){ return m_iTop == -1; } - void Push( void* t ){ - if( ++m_iTop >= Size() ) { - Add( t ); - } - else { - (*this)[m_iTop] = t; - } - } - void* Top(){ return (*this)[m_iTop]; } - void* Pop(){ return (*this)[m_iTop--];} - void Reset(){ m_iTop = -1; } - int StackSize() { return m_iTop + 1; } -}; - -#ifdef TEMPLATE_SUPPORT - -template -class TXP_GrowableArray: public CXP_GrowableArray { -public: - PTRTYPE operator[](int nIndex) const { return (PTRTYPE)(int32)m_pData[nIndex]; } - PTRTYPE& operator[](int nIndex){ return *(PTRTYPE*)&m_pData[nIndex]; } - int Add(PTRTYPE newElement){ return CXP_GrowableArray::Add( (void*) newElement ); } -}; - -#define Declare_GrowableArray(NAME,PTRTYPE) \ - typedef TXP_GrowableArray TXP_GrowableArray_##NAME; - -#else - -#define Declare_GrowableArray(NAME,PTRTYPE) \ - class TXP_GrowableArray_##NAME: public CXP_GrowableArray { \ - public: \ - PTRTYPE operator[](int nIndex) const { return (PTRTYPE)(int32)m_pData[nIndex]; }\ - PTRTYPE& operator[](int nIndex){ return *(PTRTYPE*)&m_pData[nIndex]; } \ - int Add(PTRTYPE newElement){ return CXP_GrowableArray::Add( (void*) newElement ); } \ - }; \ - - -#endif - -// -// PtrStack Imlementation -// -#ifdef TEMPLATE_SUPPORT -template -class TXP_PtrStack : public TXP_GrowableArray { -public: - int m_iTop; - TXP_PtrStack(): m_iTop(-1){} - Bool IsEmpty(){ return m_iTop == -1; } - void Push( PTRTYPE t ){ - if( ++m_iTop >= Size() ) { - Add( t ); - } - else { - (*this)[m_iTop] = t; - } - } - PTRTYPE Top(){ return (*this)[m_iTop]; } - PTRTYPE Pop(){ return (*this)[m_iTop--];} - void Reset(){ m_iTop = -1; } - int StackSize(){ return m_iTop + 1; } -}; - -#define Declare_PtrStack(NAME,PTRTYPE) \ - typedef TXP_PtrStack TXP_PtrStack_##NAME; - -#else // No template support - -#define Declare_PtrStack(NAME, PTRTYPE) \ - class TXP_PtrStack_##NAME : public CXP_PtrStack { \ - public: \ - void Push( PTRTYPE t ){ CXP_PtrStack::Push((void*)(int32)t); } \ - PTRTYPE Top(){ return (PTRTYPE)(int32)CXP_PtrStack::Top(); } \ - PTRTYPE Pop(){ return (PTRTYPE)(int32)CXP_PtrStack::Pop(); } \ - PTRTYPE operator[](int nIndex) const { return (PTRTYPE)(int32)m_pData[nIndex]; }\ - PTRTYPE& operator[](int nIndex){ return *(PTRTYPE*)&m_pData[nIndex]; } \ - int Add(PTRTYPE newElement){ return CXP_GrowableArray::Add( (void*)(int32)newElement ); } \ - }; \ - - -#endif - -#endif - diff --git a/include/imap.h b/include/imap.h deleted file mode 100644 index c573ac84a4d2..000000000000 --- a/include/imap.h +++ /dev/null @@ -1,529 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ -#ifndef __imap__ -#define __imap__ - -#include "structs.h" -#include "msgcom.h" - - -/* used for communication between libmsg and libnet */ -#define kNoFlags 0x00 /* RFC flags */ -#define kMarked 0x01 -#define kUnmarked 0x02 -#define kNoinferiors 0x04 -#define kNoselect 0x08 -#define kImapTrash 0x10 /* Navigator flag */ -#define kJustExpunged 0x20 /* This update is a post expunge url update. */ -#define kPersonalMailbox 0x40 /* this mailbox is in the personal namespace */ -#define kPublicMailbox 0x80 /* this mailbox is in the public namespace */ -#define kOtherUsersMailbox 0x100 /* this mailbox is in the other users' namespace */ - -/* flags for individual messages */ -/* currently the ui only offers \Seen and \Flagged */ -#define kNoImapMsgFlag 0x0000 -#define kImapMsgSeenFlag 0x0001 -#define kImapMsgAnsweredFlag 0x0002 -#define kImapMsgFlaggedFlag 0x0004 -#define kImapMsgDeletedFlag 0x0008 -#define kImapMsgDraftFlag 0x0010 -#define kImapMsgRecentFlag 0x0020 -#define kImapMsgForwardedFlag 0x0040 /* Not always supported, check mailbox folder */ -#define kImapMsgMDNSentFlag 0x0080 /* Not always supported. check mailbox folder */ - -#define kImapMsgSupportUserFlag 0x8000 /* This seems to be the most cost effective way of - * piggying back the server support user flag - * info. - */ - -typedef enum { - kPersonalNamespace = 0, - kOtherUsersNamespace, - kPublicNamespace, - kUnknownNamespace -} EIMAPNamespaceType; - -typedef enum { - kCapabilityUndefined = 0x00000000, - kCapabilityDefined = 0x00000001, - kHasAuthLoginCapability = 0x00000002, - kHasXNetscapeCapability = 0x00000004, - kHasXSenderCapability = 0x00000008, - kIMAP4Capability = 0x00000010, /* RFC1734 */ - kIMAP4rev1Capability = 0x00000020, /* RFC2060 */ - kIMAP4other = 0x00000040, /* future rev?? */ - kNoHierarchyRename = 0x00000080, /* no hierarchy rename */ - kACLCapability = 0x00000100, /* ACL extension */ - kNamespaceCapability = 0x00000200, /* IMAP4 Namespace Extension */ - kMailboxDataCapability = 0x00000400, /* MAILBOXDATA SMTP posting extension */ - kXServerInfoCapability = 0x00000800 /* XSERVERINFO extension for admin urls */ -} eIMAPCapabilityFlag; - -typedef int32 imap_uid; - -#ifdef XP_CPLUSPLUS -class TImapFlagAndUidState; -#else -typedef struct TImapFlagAndUidState TImapFlagAndUidState; -#endif - -/* forward declaration */ -typedef void ImapActiveEntry; - -/* url used to signify that filtering is complete so - we can tell the fe that the inbox thread pane is - loaded */ -#define kImapFilteringCompleteURL "Mailbox://?filteringcomplete" - -/* url used to signify that online/offline synch is complete */ -#define kImapOnOffSynchCompleteURL "Mailbox://?onoffsynchcomplete" - -/* if a url creator does not know the hierarchySeparator, use this */ -#define kOnlineHierarchySeparatorUnknown ' ' - -struct mailbox_spec { - int32 folder_UIDVALIDITY; - int32 number_of_messages; - int32 number_of_unseen_messages; - int32 number_of_recent_messages; - - uint32 box_flags; - - char *allocatedPathName; - char hierarchySeparator; - const char *hostName; - - TNavigatorImapConnection *connection; - TImapFlagAndUidState *flagState; - - XP_Bool folderSelected; - XP_Bool discoveredFromLsub; - - const char *smtpPostAddress; - XP_Bool onlineVerified; -}; - -typedef struct mailbox_spec mailbox_spec; - - -enum EIMAPSubscriptionUpgradeState { - kEverythingDone, - kBringUpSubscribeUI -}; - -enum ImapOnlineCopyState { - kInProgress, - kSuccessfulCopy, - kFailedCopy, - kSuccessfulDelete, - kFailedDelete, - kReadyForAppendData, - kFailedAppend, - kInterruptedState -}; - -struct folder_rename_struct { - char *fHostName; - char *fOldName; - char *fNewName; -}; - - -typedef struct folder_rename_struct folder_rename_struct; - - -/* this file defines the syntax of the imap4 url's and offers functions - that create url strings. If the functions do not offer enough - functionality then let kevin know before you starting creating strings - from scratch. */ -#include "xp_mcom.h" - -XP_BEGIN_PROTOS - -/* need mailbox status urls to get the number of message and the - number of unread messages */ - -/* Selecting a mailbox */ -/* imap4://HOST?select?MAILBOXPATH */ -char *CreateImapMailboxSelectUrl(const char *imapHost, - const char *mailbox, - char hierarchySeparator, - const char *undoDeleteIdentifierList); - -/* lite select, used to verify UIDVALIDITY while going on/offline */ -char *CreateImapMailboxLITESelectUrl(const char *imapHost, - const char *mailbox, - char hierarchySeparator); - -/* expunge, used in traditional imap delete model */ -char *CreateImapMailboxExpungeUrl(const char *imapHost, - const char *mailbox, - char hierarchySeparator); - -/* Creating a mailbox */ -/* imap4://HOST?create?MAILBOXPATH */ -char *CreateImapMailboxCreateUrl(const char *imapHost, const char *mailbox, char hierarchySeparator); - -/* discover the children of this mailbox */ -char *CreateImapChildDiscoveryUrl(const char *imapHost, const char *mailbox, char hierarchySeparator); - -/* discover the n-th level children of this mailbox */ -char *CreateImapLevelChildDiscoveryUrl(const char *imapHost, const char *mailbox, char hierarchySeparator, int n); - -/* discover the mailboxes of this account */ -char *CreateImapAllMailboxDiscoveryUrl(const char *imapHost); - -/* discover the mailboxes of this account, and the subscribed mailboxes */ -char *CreateImapAllAndSubscribedMailboxDiscoveryUrl(const char *imapHost); - -/* deleting a mailbox */ -/* imap4://HOST?delete?MAILBOXPATH */ -char *CreateImapMailboxDeleteUrl(const char *imapHost, const char *mailbox, char hierarchySeparator); - -/* renaming a mailbox */ -/* imap4://HOST?rename?OLDNAME?NEWNAME */ -char *CreateImapMailboxRenameLeafUrl(const char *imapHost, - const char *oldBoxPathName, - char hierarchySeparator, - const char *newBoxLeafName); - -/* renaming a mailbox, moving hierarchy */ -/* imap4://HOST?movefolderhierarchy?OLDNAME?NEWNAME */ -/* oldBoxPathName is the old name of the child folder */ -/* destinationBoxPathName is the name of the new parent */ -char *CreateImapMailboxMoveFolderHierarchyUrl(const char *imapHost, - const char *oldBoxPathName, - char oldHierarchySeparator, - const char *destinationBoxPathName, - char newHierarchySeparator); - -/* listing available mailboxes */ -/* imap4://HOST?list */ -char *CreateImapListUrl(const char *imapHost, - const char *mailbox, - const char hierarchySeparator); - -/* biff */ -char *CreateImapBiffUrl(const char *imapHost, - const char *mailbox, - char hierarchySeparator, - uint32 uidHighWater); - - - -/* fetching RFC822 messages */ -/* imap4://HOST?fetch??MAILBOXPATH?x */ -/* 'x' is the message UID or sequence number list */ -/* will set the 'SEEN' flag */ -char *CreateImapMessageFetchUrl(const char *imapHost, - const char *mailbox, - char hierarchySeparator, - const char *messageIdentifierList, - XP_Bool messageIdsAreUID); - - -/* fetching the headers of RFC822 messages */ -/* imap4://HOST?header??MAILBOXPATH?x */ -/* 'x' is the message UID or sequence number list */ -/* will not affect the 'SEEN' flag */ -char *CreateImapMessageHeaderUrl(const char *imapHost, - const char *mailbox, - char hierarchySeparator, - const char *messageIdentifierList, - XP_Bool messageIdsAreUID); - - -/* search an online mailbox */ -/* imap4://HOST?search??MAILBOXPATH?SEARCHSTRING */ -char *CreateImapSearchUrl(const char *imapHost, - const char *mailbox, - char hierarchySeparator, - const char *searchString, - XP_Bool messageIdsAreUID); - -/* delete messages */ -/* imap4://HOST?deletemsg??MAILBOXPATH?x */ -/* 'x' is the message UID or sequence number list */ -char *CreateImapDeleteMessageUrl(const char *imapHost, - const char *mailbox, - char hierarchySeparator, - const char *messageIds, - XP_Bool idsAreUids); - -/* delete all messages */ -/* imap4://HOST?deleteallmsgs?MAILBOXPATH */ -char *CreateImapDeleteAllMessagesUrl(const char *imapHost, - const char *mailbox, - char hierarchySeparator); - -/* store +flags url */ -/* imap4://HOST?store+flags??MAILBOXPATH?x?f */ -/* 'x' is the message UID or sequence number list */ -/* 'f' is the byte of flags */ -char *CreateImapAddMessageFlagsUrl(const char *imapHost, - const char *mailbox, - char hierarchySeparator, - const char *messageIds, - imapMessageFlagsType flags, - XP_Bool idsAreUids); -/* store -flags url */ -/* imap4://HOST?store-flags??MAILBOXPATH?x?f */ -/* 'x' is the message UID or sequence number list */ -/* 'f' is the byte of flags */ -char *CreateImapSubtractMessageFlagsUrl(const char *imapHost, - const char *mailbox, - char hierarchySeparator, - const char *messageIds, - imapMessageFlagsType flags, - XP_Bool idsAreUids); - -/* set flags url, make the flags match */ -char *CreateImapSetMessageFlagsUrl(const char *imapHost, - const char *mailbox, - char hierarchySeparator, - const char *messageIds, - imapMessageFlagsType flags, - XP_Bool idsAreUids); - - -/* copy messages from one online box to another */ -/* imap4://HOST?onlineCopy?? - SOURCEMAILBOXPATH?x?DESTINATIONMAILBOXPATH */ -/* 'x' is the message UID or sequence number list */ -char *CreateImapOnlineCopyUrl(const char *imapHost, - const char *sourceMailbox, - char sourceHierarchySeparator, - const char *messageIds, - const char *destinationMailbox, - char destinationHierarchySeparator, - XP_Bool idsAreUids, - XP_Bool isMove); /* cause delete after copy */ - -/* copy a message from an online box to an offline box */ -/* imap4://HOST?ontooffCopy?SOURCEMAILBOXPATH?number=x? - DESTINATIONMAILBOXPATH */ -/* 'x' is the message sequence number */ -char *CreateImapOnToOfflineCopyUrl( const char *imapHost, - const char *sourceMailbox, - char sourceHierarchySeparator, - const char *messageIds, - const char *destinationMailbox, - XP_Bool idsAreUids, - XP_Bool isMove); /* cause delete after copy */ - -/* copy messages from an offline box to an online box */ -/* imap4://HOST?offtoonCopy?DESTINATIONMAILBOXPATH */ -/* the number of messages and their sizes are negotiated later */ -char *CreateImapOffToOnlineCopyUrl(const char *imapHost, - const char *destinationMailbox, - char destinationHierarchySeparator); - -/* Subscribe to a mailbox on the given IMAP host */ -char *CreateIMAPSubscribeMailboxURL(const char *imapHost, const char *mailboxName); - -/* Unsubscribe from a mailbox on the given IMAP host */ -char *CreateIMAPUnsubscribeMailboxURL(const char *imapHost, const char *mailboxName); - -/* get mail account rul */ -/* imap4://HOST?NETSCAPE */ -char *CreateImapManageMailAccountUrl(const char *imapHost); - -/* append message from file */ -/* imap4://HOST?appendmsgfromfile?MSGFILEPATH?DESTINATIONMAILBOXPATH */ -char *CreateImapAppendMessageFromFileUrl(const char *imapHost, - const char *destinationMailboxPath, - const char hierarchySeparator, - XP_Bool isDraft); - -/* refresh the ACL for a folder */ -char *CreateIMAPRefreshACLForFolderURL(const char *imapHost, const char *mailbox); - -/* refresh the ACL for all folders on given host*/ -char *CreateIMAPRefreshACLForAllFoldersURL(const char *imapHost); - -/* Run the auto-upgrade to IMAP Subscription */ -char *CreateIMAPUpgradeToSubscriptionURL(const char *imapHost, XP_Bool subscribeToAll); - -/* do a status command for the folder */ -char *CreateIMAPStatusFolderURL(const char *imapHost, const char *mailboxName, char hierarchySeparator); - -/* refresh the imap folder urls for the folder */ -char *CreateIMAPRefreshFolderURLs(const char *imapHost, const char *mailboxName); - -/* create a URL to force an all-parts reload of the fetch URL given in url. */ -char *IMAP_CreateReloadAllPartsUrl(const char *url); - -/* Explicitly LIST a given mailbox, and refresh its flags in the folder list */ -char *CreateIMAPListFolderURL(const char *imapHost, const char *mailboxName); - -NET_StreamClass *CreateIMAPDownloadMessageStream(ImapActiveEntry *ce, uint32 size, - const char *content_type, XP_Bool content_modified); - -void UpdateIMAPMailboxInfo(mailbox_spec *adoptedBoxSpec, MWContext *currentContext); -void UpdateIMAPMailboxStatus(mailbox_spec *adoptedBoxSpec, MWContext *currentContext); - -#define kUidUnknown -1 -int32 GetUIDValidityForSpecifiedImapFolder(const char *hostName, const char *canonicalimapName, MWContext *currentContext); - -enum EMailboxDiscoverStatus { - eContinue, - eContinueNew, - eListMyChildren, - eNewServerDirectory, - eCancelled }; - -enum EMailboxDiscoverStatus DiscoverIMAPMailbox(mailbox_spec *adoptedBoxSpec, MSG_Master *master, - MWContext *currentContext, XP_Bool broadcastDiscovery); - -void ReportSuccessOfOnlineCopy(MWContext *currentContext, enum ImapOnlineCopyState copyState); -void ReportSuccessOfOnlineDelete(MWContext *currentContext, const char *hostName, const char *mailboxName); -void ReportFailureOfOnlineCreate(MWContext *currentContext, const char *mailboxName); -void ReportSuccessOfOnlineRename(MWContext *currentContext, folder_rename_struct *names); -void ReportMailboxDiscoveryDone(MWContext *currentContext, URL_Struct *URL_s); -void ReportSuccessOfChildMailboxDiscovery(MWContext *currentContext); -void NotifyHeaderFetchCompleted(MWContext *currentContext, TNavigatorImapConnection *imapConnection); - -void ReportLiteSelectUIDVALIDITY(MSG_Pane *receivingPane, uint32 UIDVALIDITY); - -typedef void (UploadCompleteFunctionPointer)(void*); -void BeginMessageUpload(MWContext *currentContext, - PRFileDesc *ioSocket, - UploadCompleteFunctionPointer *completeFunction, - void *completionFunctionArgument); - -void IMAP_DoNotDownLoadAnyMessageHeadersForMailboxSelect(TNavigatorImapConnection *connection); -void IMAP_DownLoadMessagesForMailboxSelect(TNavigatorImapConnection *connection, - uint32 *messageKeys, /* uint32* is adopted */ - uint32 numberOfKeys); - -void IMAP_DownLoadMessageBodieForMailboxSelect(TNavigatorImapConnection *connection, - uint32 *messageKeys, /* uint32* is adopted */ - uint32 numberOfKeys); - -void IMAP_BodyIdMonitor(TNavigatorImapConnection *connection, XP_Bool enter); - -char *IMAP_GetCurrentConnectionUrl(TNavigatorImapConnection *connection); - -void IMAP_UploadAppendMessageSize(TNavigatorImapConnection *connection, uint32 msgSize, imapMessageFlagsType flags); -void IMAP_ResetAnyCachedConnectionInfo(); - -XP_Bool IMAP_CheckNewMail(TNavigatorImapConnection *connection); -XP_Bool IMAP_NewMailDetected(TNavigatorImapConnection *connection); - -TImapFlagAndUidState *IMAP_CreateFlagState(int numberOfMessages); -void IMAP_DeleteFlagState(TImapFlagAndUidState *state); -int IMAP_GetFlagStateNumberOfMessages(TImapFlagAndUidState *state); - -imap_uid IMAP_GetUidOfMessage(int zeroBasedIndex, TImapFlagAndUidState *state); -imapMessageFlagsType IMAP_GetMessageFlags(int zeroBasedIndex, TImapFlagAndUidState *state); -imapMessageFlagsType IMAP_GetMessageFlagsFromUID(imap_uid uid, XP_Bool *foundIt, TImapFlagAndUidState *state); - -void IMAP_TerminateConnection (TNavigatorImapConnection *connection); - -char *IMAP_CreateOnlineSourceFolderNameFromUrl(const char *url); - -void IMAP_FreeBoxSpec(mailbox_spec *victim); - -const char *IMAP_GetPassword(); -void IMAP_SetPassword(const char *password); -void IMAP_SetPasswordForHost(const char *host, const char *password); -/* called once only by MSG_InitMsgLib */ -void IMAP_StartupImap(); - -/* called once only by MSG_ShutdownMsgLib */ -void IMAP_ShutdownImap(); - -/* used to prevent recursive listing of mailboxes during discovery */ -int64 IMAP_GetTimeStampOfNonPipelinedList(); - -/* returns TRUE if either we have a password or we were preAuth'd by SSL certs */ -XP_Bool IMAP_HaveWeBeenAuthenticated(); - -/* used by libmsg when creating an imap message display stream */ -int IMAP_InitializeImapFeData (ImapActiveEntry * ce); -MSG_Pane *IMAP_GetActiveEntryPane(ImapActiveEntry * ce); -NET_StreamClass *IMAP_CreateDisplayStream(ImapActiveEntry * ce, XP_Bool clearCacheBit, uint32 size, const char *content_type); - -/* used by libmsg when a new message is loaded to interrupt the load of the previous message */ -void IMAP_PseudoInterruptFetch(MWContext *context); - -void IMAP_URLFinished(URL_Struct *URL_s); - -XP_Bool IMAP_HostHasACLCapability(const char *hostName); - -/**** IMAP Host stuff - used for communication between MSG_IMAPHost (in libmsg) and TImapHostInfo (in libnet) ****/ - -/* obsolete? */ -/*void IMAP_SetNamespacesFromPrefs(const char *hostName, char *personalDir, char *publicDir, char *otherUsersDir);*/ - -/* Sets the preference of whether or not we should always explicitly LIST the INBOX for given host */ -void IMAP_SetShouldAlwaysListInboxForHost(const char *hostName, XP_Bool shouldList); - -/* Gets the number of namespaces in use for a given host */ -int IMAP_GetNumberOfNamespacesForHost(const char *hostName); - -/* Sets the currently-used default personal namespace for a given host. Used for updating from libnet when - we get a NAMESPACE response. */ -void MSG_SetNamespacePrefixes(MSG_Master *master, const char *hostName, EIMAPNamespaceType type, const char *prefix); - - -/* Check to see if we need upgrade to IMAP subscription */ -extern XP_Bool MSG_ShouldUpgradeToIMAPSubscription(MSG_Master *mast); -extern void MSG_ReportSuccessOfUpgradeToIMAPSubscription(MWContext *context, enum EIMAPSubscriptionUpgradeState *state); - -/* Adds a set of ACL rights for the given folder on the given host for the given user. If userName is NULL, it means - the currently authenticated user (i.e. my rights). */ -extern void MSG_AddFolderRightsForUser(MSG_Master *master, const char *hostName, const char*mailboxName, const char *userName, const char *rights); - -/* Clears all ACL rights for the given folder on the given host for all users. */ -extern void MSG_ClearFolderRightsForFolder(MSG_Master *master, const char *hostName, const char *mailboxName); - -/* Refreshes the icon / flags for a given folder, based on new ACL rights */ -extern void MSG_RefreshFolderRightsViewForFolder(MSG_Master *master, const char *hostName, const char *mailboxName); - -extern XP_Bool MSG_GetFolderNeedsSubscribing(MSG_FolderInfo *folder); - -/* Returns TRUE if this folder needs an auto-refresh of the ACL (on a folder open, for example) */ -extern XP_Bool MSG_GetFolderNeedsACLListed(MSG_FolderInfo *folder); - -/* Returns TRUE if this folder has NEVER (ever) had an ACL retrieved for it */ -extern XP_Bool MSG_IsFolderACLInitialized(MSG_Master *master, const char *folderName, const char *hostName); - -extern char *IMAP_SerializeNamespaces(char **prefixes, int len); -extern int IMAP_UnserializeNamespaces(const char *str, char **prefixes, int len); - -extern XP_Bool IMAP_SetHostIsUsingSubscription(const char *hostname, XP_Bool using_subscription); - -/* Returns the runtime capabilities of the given host, or 0 if the host doesn't exist or if - they are uninitialized so far */ -extern uint32 IMAP_GetCapabilityForHost(const char *hostName); - -/* Causes a libmsg MSG_IMAPHost to refresh its capabilities based on new runtime info */ -extern void MSG_CommitCapabilityForHost(const char *hostName, MSG_Master *master); - -/* Returns TRUE if the given folder is \Noselect. Returns FALSE if it's not or if we don't - know about it. */ -extern XP_Bool MSG_IsFolderNoSelect(MSG_Master *master, const char *folderName, const char *hostName); - -XP_END_PROTOS - -#endif diff --git a/include/itapefs.h b/include/itapefs.h deleted file mode 100644 index 1f74c1e54ec9..000000000000 --- a/include/itapefs.h +++ /dev/null @@ -1,180 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -#ifndef ITAPEFS_H -#define ITAPEFS_H - -#ifdef EDITOR -// -// Abstract output file stream. -// -class IStreamOut { -public: - IStreamOut(); - virtual ~IStreamOut(); - - virtual void Write( char *pBuffer, int32 iCount )=0; - - // NOTICE: the implementation is not pure. There is a default - // implementation that implements this function interms of - // 'Write'. - virtual int Printf( char * pFormat, ... ); - - enum EOutStreamStatus { - EOS_NoError, - EOS_DeviceFull, - EOS_FileError - }; - - virtual EOutStreamStatus Status(){ return EOS_NoError; } - - // implemented in terms of the interface. - void WriteInt( int32 i ){ Write( (char*)&i, sizeof( int32 ) ); } - void WriteZString( char* pString); - void WritePartialZString( char* pString, int32 start, int32 end); -private: - char* stream_buffer; // used to implement Printf -}; - - -//----------------------------------------------------------------------- -// Abstract File System -//----------------------------------------------------------------------- -typedef void -EDT_ITapeFileSystemComplete( XP_Bool bSuccess, void *pArg ); - -class ITapeFileSystem { - PRBool m_FirstBinary; // is the first file really binary, not text? -public: - ITapeFileSystem() { m_FirstBinary = PR_FALSE; } - // ITapeFileSystem::File, ITapeFileSystem::Publish, or - // ITapeFileSystem::MailSend, - enum {File,Publish,MailSend}; - virtual intn GetType() = 0; - - // This function is called before anything else. It tells the file - // system the base url for the URLs added in AddFile(). - // An actual file, not a directory. - virtual void SetSourceBaseURL( char* pURL )=0; - - // DESCRIPTION: - // - // Add a name to the file system. It is up to the file system to localize - // the name. For example, I could add 'http://home.netsacpe.com/ - // and the file system might decide that it should be called 'index.html' - // if the file system were DOS, the url might be converted to INDEX.HTML - // - // pMIMEType may be NULL. In this case if the tape file system needs the - // MIME type, it must figure it out by itself. - // - // RETURNS: index of the file (0 based), OR - // ITapeFileSystem::Error if an error adding name, OR - // ITapeFileSystem::SourceDestSame if adding - // this name would result in the source and destination being the same, and thus - // no point in copying the file. - // - // The first file added must be the root HTML document. (It is ok for the root - // document to have the same source and dest URL). - // - virtual intn AddFile( char* pURL, char *pMIMEType, int16 iCharSetID)=0; - - // Return the number of files added to the file system. - virtual intn GetNumFiles()=0; - - // Returns the absolute version of the URL given in AddFile(), using the - // URL given in SetSourceBaseURL() as the base. - // Allocated with XP_STRDUP(). - virtual char* GetSourceURL(intn iFileIndex)=0; - - // Return the absolute destination of the HTML doc if meaningful, else return - // NULL. Almost the same as "GetDestPathURL()+GetDestURL(0)" except that this call - // will work before file 0 has been added to the file system. - virtual char* GetDestAbsURL()=0; - - // Gets the name of the RELATIVE url to place in the file. String is - // allocated with XP_STRDUP(); - // - virtual char* GetDestURL( intn iFileIndex )=0; - - // Return the path URL associated with the ITapeFilesystem or NULL if there is none. - // If NULL is returned, all URLs returned by GetDestURL() must be absolute. - // - // i.e. for a file or remote HTTP based ITapeFileSystem, this is the directory where the images are - // stored. For a MHTML ITapeFileSystem this is NULL. - // - // String is allocated with XP_STRDUP(). - virtual char* GetDestPathURL() = 0; - - // - // Returns the name to display when saving the file, can be the same as - // GetURLName. String is allocated with XP_STRDUP(); - // - virtual char* GetHumanName( intn iFileIndex )=0; - - enum { - Error = -1, SourceDestSame = -2 - }; - - // Does the file referenced by iFileIndex already exist? - // E.g. for the MHTML version, this will always return FALSE. - virtual XP_Bool FileExists(intn iFileIndex) = 0; - - // Will we be creating a new non-temporary file on the local machine. - // Used to update SiteManager. - virtual XP_Bool IsLocalPersistentFile(intn iFileIndex) = 0; - - // ### mwelch Added so that multipart/related message saver can properly construct - // messages using quoted/forwarded part data. - // Tell the tape file system the mime type of a particular part. - // Calling this overrides any previously determined mime type for this part. - virtual void CopyURLInfo(intn iFileIndex, const URL_Struct *pURL) = 0; - - // - // Opens the output stream. Returns a stream that can be written to or NULL if error. All - // 'AddFile's occur before the first OpenStream. - // Do not delete the returned stream, just call CloseStream() when done. - // - virtual IStreamOut *OpenStream( intn iFileIndex )=0; - - virtual void CloseStream( intn iFileIndex )=0; - - // Called on completion, TRUE if completed successfully, FALSE if it failed. - // The caller should not reference the ITapeFileSystem after calling Complete(). - // Caller does not free up memory for ITapeFileSystem, Complete() causes file system to delete itself. - // - // The tape file system will call pfComplete with pArg and with whether the ITapeFileSystem - // completed successfully. Note: the ITapeFileSystem may call pfComplete() with TRUE even if - // ITapeFileSystem::Complete() was given FALSE. - // pfComplete may be NULL. Call to pfComplete may be synchronous or asynchronous. - // - // The ITapeFileSystem will call pfComplete(success,pArg) before deleting itself. I.e. the ITapeFileSystem is still valid - // when it calls pfComplete(). - virtual void Complete( Bool bSuccess, EDT_ITapeFileSystemComplete *pfComplete, void *pArg )=0; - - inline PRBool IsFirstBinary(void) { return m_FirstBinary; } - inline void SetFirstBinary(void) { m_FirstBinary = PR_TRUE; } - inline void ResetFirstBinary(void) { m_FirstBinary = PR_FALSE; } -}; - -#endif // EDITOR - -#endif diff --git a/include/libcnv.h b/include/libcnv.h deleted file mode 100644 index 4fa6fa733c27..000000000000 --- a/include/libcnv.h +++ /dev/null @@ -1,213 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -//"libcnv.h" -#ifndef _LIBCNV_H -#define _LIBCNV_H -#ifndef _IMAGE_CONVERT -#error _IMAGE_CONVERT SYMBOL NEEDED BEFORE INCLUSION -#endif /*_IMAGE_CONVERT*/ - -#ifndef __cplusplus -typedef unsigned char BYTE; -typedef uint32 DWORD; -#endif - -#include "xp_core.h"/*defines of int32 ect*/ -#include "xp_file.h" -#include "xp_mem.h"/*XP_HUGE*/ - -#define MAXIMAGEPATHLEN 255 - - - -typedef enum -{ - CONV_CANCEL, - CONV_OK, - CONVERR_INVALIDSOURCE, - CONVERR_INVALIDDEST, - CONVERR_INVALIDFILEHEADER, - CONVERR_INVALIDIMAGEHEADER, - CONVERR_INVALIDBITDEPTH, - CONVERR_INVALIDCOLORMAP, - CONVERR_BADREAD, - CONVERR_OUTOFMEMORY, - CONVERR_JPEGERROR, - CONVERR_COMPRESSED, - CONVERR_BADPLANES, - CONVERR_BADWRITE, - CONVERR_INVALIDPARAMS, - CONVERR_UNKNOWN, - NUM_CONVERR -}CONVERT_IMAGERESULT; - - - -typedef BYTE * CONVERT_IMG_ROW; -typedef CONVERT_IMG_ROW * CONVERT_IMG_ARRAY; - - - -typedef enum -{ - conv_unknown, - conv_png, - conv_jpeg, - conv_bmp, - conv_pict, - conv_xpm, - conv_rgb, - conv_plugin -}convimgenum; - - -typedef struct tagCONVERT_IMG_STREAM -{ - XP_HUGE_CHAR_PTR m_mem; - FILE *m_file;/*used only with type 0 -must allready be opened for read or write does not use current index ect.*/ - int16 m_type;/*0=CONVERT_FILE 1=CONVERT_MEMORY*/ - DWORD m_streamsize;/* 0== unlimited */ - DWORD m_currentindex; -}CONVERT_IMG_STREAM; - - - -/*Sent in a BITMAP structure*/ -#define CONVERT_MEMORY 1 -#define CONVERT_FILE 0 - - -typedef struct tagCONVERT_IMGCONTEXT CONVERT_IMGCONTEXT; -typedef struct tagCONVERT_IMG_INFO CONVERT_IMG_INFO; - -typedef CONVERT_IMAGERESULT (*CONVERT_DIALOGIMAGECALLBACK)(CONVERT_IMGCONTEXT *input, - CONVERT_IMGCONTEXT *outputarray, - CONVERT_IMG_INFO *imginfo, - int16 numoutput, - CONVERT_IMG_ARRAY imagearray); -typedef CONVERT_IMAGERESULT (*CONVERT_COMPLETECALLBACK)(CONVERT_IMGCONTEXT *outputarray,int16 p_numoutputs,void *hook); - -typedef void (*CONVERT_BUFFERCALLBACK)(void *);/*j_common_ptr);*/ - - - -typedef struct tagCONVERT_CALLBACKS -{ - CONVERT_DIALOGIMAGECALLBACK m_dialogimagecallback; - CONVERT_BUFFERCALLBACK m_displaybuffercallback; - CONVERT_COMPLETECALLBACK m_completecallback; -}CONVERT_CALLBACKS; - - - -typedef struct tagCONVERT_IMGCONTEXT -{ - convimgenum m_imagetype; - CONVERT_IMG_STREAM m_stream;/*used with m_streamtype 1,2*/ - int16 m_quality; - char m_filename[MAXIMAGEPATHLEN];/*will not be used to open FILE *. used for output. maybe in future will open file?*/ - CONVERT_CALLBACKS m_callbacks; -#ifdef XP_OS2 - XP_OS2_ARG(void *m_parentwindow);/*used for callbacks to bring up dialog boxes. void * = CWnd *for Windows*/ -#else - XP_WIN_ARG(void *m_parentwindow);/*used for callbacks to bring up dialog boxes. void * = CWnd *for Windows*/ -#endif - void *m_pMWContext;//used for callbacks to insert the image. and for plugins -}CONVERT_IMGCONTEXT; - - - -typedef struct tagCONVERT_IMG_INFO -{ - BYTE *m_colormap; - int16 m_numcolorentries; - uint16 m_X_density; - uint16 m_Y_density; - int16 m_density_unit; - int16 m_in_color_space; - int16 m_input_components; - int16 m_data_precision; - int16 m_image_width;/*pixel width*/ - int16 m_image_height;/*pixel_height*/ - int16 m_bitsperpixel; - int16 m_row_width;/*width in bytes*/ - int16 m_stride; /*row_width-(pixel_width*bpp)/8 */ - DWORD m_image_size; /*informational purposes*/ -}CONVERT_IMG_INFO; - - - -#ifdef __cplusplus -extern "C" -{ -#endif - - - -/****************************/ -/*API CALLS AND DECLARATIONS*/ -/****************************/ - -/*converts input to p_numoutput many outputs*/ -/*p_outpuffilenames must be a PREALLOCATED array of char *s at least p_numoutputs char *s these pointers will -point to output filenames that YOU will be responsible to destroy! - you may pass in null for p_outputfilenames and it wil*/ -CONVERT_IMAGERESULT convert_stream2image(CONVERT_IMGCONTEXT p_input,CONVERT_IMG_INFO *p_imageinfo,int16 p_numoutputs,char **p_outputfilenames); - -/*quantize_pixels will change the imagearray to have only maxcolors distinct values*/ -CONVERT_IMAGERESULT convert_quantize_pixels(CONVERT_IMG_ARRAY imagearray,int16 imagewidth,int16 imageheight,int16 maxcolorvalue); - -/*given a imagecontext, it will tell you if it is a png,bmp,gif ect*/ -convimgenum select_file_type (CONVERT_IMGCONTEXT * p_input); - -/****************************/ -/*END API CALLS AND DECLARATIONS*/ -/****************************/ - - -/****************************/ -/*STREAM DECLARATIONS*/ -/****************************/ - -/*CONV_IMG_FREAD taken from JPEG libraries for independence from common header file*/ -#define CONV_IMG_FREAD(file,buf,sizeofbuf) \ - ((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) - -#define ReadOK(file,buffer,len) (CONV_IMG_FREAD(file,buffer,len) == ((size_t) (len))) - -int16 read_mem_stream(CONVERT_IMG_STREAM *p_stream,void *p_dest,uint16 p_bytecount); -BYTE read_mem_stream_byte(CONVERT_IMG_STREAM *p_stream); -int16 read_param(CONVERT_IMG_STREAM *p_input,void *p_dest,uint16 p_bytecount); -BYTE read_param_byte(CONVERT_IMG_STREAM *p_input); -/****************************/ -/*END STREAM DECLARATIONS*/ -/****************************/ - - -#ifdef __cplusplus -} -#endif - -#endif - - diff --git a/include/libstyle.h b/include/libstyle.h deleted file mode 100644 index 2e72ce07162b..000000000000 --- a/include/libstyle.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - - -/* libstyle.h --- Exported style sheet routines */ - -#ifndef __LIBSTYLE_H_ -#define __LIBSTYLE_H_ - -#include "xp_core.h" -#include "libmocha.h" - -XP_BEGIN_PROTOS - -extern JSBool -JSS_ResolveDocName(JSContext *mc, MWContext *context, JSObject *obj, jsval id); - -XP_END_PROTOS - -#endif /* __LIBSTYLE_H_ */ diff --git a/include/mcom_ndbm.h b/include/mcom_ndbm.h deleted file mode 100644 index aea1c75a0815..000000000000 --- a/include/mcom_ndbm.h +++ /dev/null @@ -1,98 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ -/*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Margo Seltzer. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)ndbm.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _NDBM_H_ -#define _NDBM_H_ - -#include "mcom_db.h" - -/* Map dbm interface onto db(3). */ -#define DBM_RDONLY O_RDONLY - -/* Flags to dbm_store(). */ -#define DBM_INSERT 0 -#define DBM_REPLACE 1 - -/* - * The db(3) support for ndbm(3) always appends this suffix to the - * file name to avoid overwriting the user's original database. - */ -#define DBM_SUFFIX ".db" - -typedef struct { - char *dptr; - int dsize; -} datum; - -typedef DB DBM; -#define dbm_pagfno(a) DBM_PAGFNO_NOT_AVAILABLE - -__BEGIN_DECLS -void dbm_close (DBM *); -int dbm_delete (DBM *, datum); -datum dbm_fetch (DBM *, datum); -datum dbm_firstkey (DBM *); -long dbm_forder (DBM *, datum); -datum dbm_nextkey (DBM *); -DBM *dbm_open (const char *, int, int); -int dbm_store (DBM *, datum, datum, int); -int dbm_dirfno (DBM *); -__END_DECLS - -#endif /* !_NDBM_H_ */ diff --git a/include/msg_filt.h b/include/msg_filt.h deleted file mode 100644 index b58bd7f4d080..000000000000 --- a/include/msg_filt.h +++ /dev/null @@ -1,224 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ -/* foobar Public API for mail (and news?) filters */ -#ifndef MSG_RULE_H -#define MSG_RULE_H - -/* - Terminology - Filter - either a Rule (defined with GUI) or a (Java) Script - Rule - -*/ -#include "msg_srch.h" - -typedef enum -{ - FilterError_Success = 0, /* no error */ - FilterError_First = SearchError_Last + 1, /* no functions return this; just for bookkeeping */ - FilterError_NotImplemented, /* coming soon */ - FilterError_OutOfMemory, /* out of memory */ - FilterError_FileError, /* error reading or writing the rules file */ - FilterError_InvalidVersion, /* invalid filter file version */ - FilterError_InvalidIndex, /* Invalid filter index */ - FilterError_InvalidMotion, /* invalid filter move motion */ - FilterError_InvalidFilterType, /* method doesn't accept this filter type */ - FilterError_NullPointer, /* a required pointer parameter was null */ - FilterError_NotRule, /* tried to get rule for non-rule filter */ - FilterError_NotScript, /* tried to get a script name for a non-script filter */ - FilterError_InvalidAction, /* invalid action */ - FilterError_SearchError, /* error in search code */ - FilterError_Last /* no functions return this; just for bookkeeping */ -} MSG_FilterError; - - -typedef enum - { - acNone, /* uninitialized state */ - acMoveToFolder, - acChangePriority, - acDelete, - acMarkRead, - acKillThread, - acWatchThread - } MSG_RuleActionType; - -typedef enum -{ - filterInboxRule = 0x1, - filterInboxJavaScript = 0x2, - filterInbox = 0x3, - filterNewsRule = 0x4, - filterNewsJavaScript = 0x8, - filterNews=0xb, - filterAll=0xf -} MSG_FilterType; - -typedef enum -{ - filterUp, - filterDown -} MSG_FilterMotion; - -typedef int32 MSG_FilterIndex; - -/* opaque struct defs - defined in libmsg/pmsgfilt.h */ -#ifdef XP_CPLUSPLUS - struct MSG_Filter; - struct MSG_Rule; - struct MSG_RuleAction; - struct MSG_FilterList; -#else - typedef struct MSG_FilterList MSG_FilterList; - typedef struct MSG_Filter MSG_Filter; - typedef struct MSG_Rule MSG_Rule; - typedef struct MSG_RuleAction MSG_RuleAction; -#endif - -XP_BEGIN_PROTOS - -/* Front ends call MSG_OpenFilterList to get a handle to a FilterList, of existing MSG_Filter *. - These are manipulated by the front ends as a result of user interaction - with dialog boxes. To apply the new list, fe's call MSG_CloseFilterList. - - For example, if the user brings up the rule management UI, deletes a rule, - and presses OK, the front end calls MSG_RemoveFilterListAt, and - then MSG_CloseFilterList. - -*/ -MSG_FilterError MSG_OpenFilterList(MSG_Master *master, MSG_FilterType type, MSG_FilterList **filterList); -MSG_FilterError MSG_OpenFolderFilterList(MSG_Pane *pane, MSG_FolderInfo *folder, MSG_FilterType type, MSG_FilterList **filterList); -MSG_FilterError MSG_OpenFolderFilterListFromMaster(MSG_Master *master, MSG_FolderInfo *folder, MSG_FilterType type, MSG_FilterList **filterList); -MSG_FilterError MSG_CloseFilterList(MSG_FilterList *filterList); -MSG_FilterError MSG_SaveFilterList(MSG_FilterList *filterList); /* save without deleting */ -MSG_FilterError MSG_CancelFilterList(MSG_FilterList *filterList); - -MSG_FolderInfo *MSG_GetFolderInfoForFilterList(MSG_FilterList *filterList); -MSG_FilterError MSG_GetFilterCount(MSG_FilterList *filterList, int32 *pCount); -MSG_FilterError MSG_GetFilterAt(MSG_FilterList *filterList, - MSG_FilterIndex filterIndex, MSG_Filter **filter); -/* these methods don't delete filters - they just change the list. FE still must - call MSG_DestroyFilter to delete a filter. -*/ -MSG_FilterError MSG_SetFilterAt(MSG_FilterList *filterList, - MSG_FilterIndex filterIndex, MSG_Filter *filter); -MSG_FilterError MSG_RemoveFilterAt(MSG_FilterList *filterList, - MSG_FilterIndex filterIndex); -MSG_FilterError MSG_MoveFilterAt(MSG_FilterList *filterList, - MSG_FilterIndex filterIndex, MSG_FilterMotion motion); -MSG_FilterError MSG_InsertFilterAt(MSG_FilterList *filterList, - MSG_FilterIndex filterIndex, MSG_Filter *filter); - -MSG_FilterError MSG_EnableLogging(MSG_FilterList *filterList, XP_Bool enable); -XP_Bool MSG_IsLoggingEnabled(MSG_FilterList *filterList); - -/* In general, any data gotten with MSG_*Get is good until the owning object - is deleted, or the data is replaced with a MSG_*Set call. For example, the name - returned in MSG_GetFilterName is valid until either the filter is destroyed, - or MSG_SetFilterName is called on the same filter. - */ -MSG_FilterError MSG_CreateFilter (MSG_FilterType type, char *name, MSG_Filter **result); -MSG_FilterError MSG_DestroyFilter(MSG_Filter *filter); -MSG_FilterError MSG_GetFilterType(MSG_Filter *, MSG_FilterType *filterType); -MSG_FilterError MSG_EnableFilter(MSG_Filter *, XP_Bool enable); -MSG_FilterError MSG_IsFilterEnabled(MSG_Filter *, XP_Bool *enabled); -MSG_FilterError MSG_GetFilterRule(MSG_Filter *, MSG_Rule ** result); -MSG_FilterError MSG_GetFilterName(MSG_Filter *, char **name); -MSG_FilterError MSG_SetFilterName(MSG_Filter *, const char *name); -MSG_FilterError MSG_GetFilterDesc(MSG_Filter *, char **description); -MSG_FilterError MSG_SetFilterDesc(MSG_Filter*, const char *description); -MSG_FilterError MSG_GetFilterScript(MSG_Filter *, char **name); -MSG_FilterError MSG_SetFilterScript(MSG_Filter *, const char *name); - -MSG_FilterError MSG_RuleAddTerm(MSG_Rule *, - MSG_SearchAttribute attrib, /* attribute for this term */ - MSG_SearchOperator op, /* operator e.g. opContains */ - MSG_SearchValue *value, /* value e.g. "Dogbert" */ - XP_Bool BooleanAND, /* TRUE if AND is the boolean operator. FALSE if OR is the boolean operators */ - char * arbitraryHeader); /* arbitrary header specified by user. ignored unless attrib = attribOtherHeader */ - -MSG_FilterError MSG_RuleGetNumTerms(MSG_Rule *, int32 *numTerms); - -MSG_FilterError MSG_RuleGetTerm(MSG_Rule *, int32 termIndex, - MSG_SearchAttribute *attrib, /* attribute for this term */ - MSG_SearchOperator *op, /* operator e.g. opContains */ - MSG_SearchValue *value, /* value e.g. "Dogbert" */ - XP_Bool *BooleanAnd, /* TRUE if AND is the boolean operator. FALSE if OR is the boolean operator */ - char ** arbitraryHeader); /* arbitrary header specified by user. ignore unless attrib = attribOtherHeader */ - -MSG_FilterError MSG_RuleSetScope(MSG_Rule *, MSG_ScopeTerm *scope); -MSG_FilterError MSG_RuleGetScope(MSG_Rule *, MSG_ScopeTerm **scope); - -/* if type is acChangePriority, value is a pointer to priority. - If type is acMoveToFolder, value is pointer to folder name. - Otherwise, value is ignored. -*/ -MSG_FilterError MSG_RuleSetAction(MSG_Rule *, MSG_RuleActionType type, void *value); -MSG_FilterError MSG_RuleGetAction(MSG_Rule *, MSG_RuleActionType *type, void **value); - -/* help FEs manage menu choices in Filter dialog box */ - -/* Use this to help build menus in the filter dialogs. See APIs below */ -typedef struct MSG_RuleMenuItem -{ - int16 attrib; - char name[32]; -} MSG_RuleMenuItem; - - -MSG_FilterError MSG_GetRuleActionMenuItems ( - MSG_FilterType type, /* type of filter */ - MSG_RuleMenuItem *items, /* array of caller-allocated structs */ - uint16 *maxItems); /* in- max array size; out- num returned */ - -MSG_FilterError MSG_GetFilterWidgetForAction( MSG_RuleActionType action, - MSG_SearchValueWidget *widget ); - -MSG_SearchError MSG_GetValuesForAction( MSG_RuleActionType action, - MSG_SearchMenuItem *items, - uint16 *maxItems); - -void MSG_ViewFilterLog(MSG_Pane *pane); - -/* -** Adding/editting javascript filters. -** -** The FE calls one of the below functions, along with a callback and some closure -** data. This callback is invoked when the user clicks OK in the JS filter dialog. -** If CANCEL is pressed, the callback is not invoked. -** -** If the user called MSG_EditJSFilter, the filter_index parameter of the callback -** is the same one passed in. If the user called MSG_NewJSFilter, the filter_index -** parameter is -1. -** -** The filter_changed parameter is TRUE if the user modified any of the fields of -** the javascript filter, and FALSE otherwise. -*/ -typedef void (*JSFilterCallback)(void* arg, MSG_FilterIndex filter_index, XP_Bool filter_changed); - -void MSG_EditJSFilter(MWContext *context, MSG_FilterList *filter_list, - MSG_FilterIndex filter_index, - JSFilterCallback cb, void *arg); -void MSG_NewJSFilter(MWContext *context, MSG_FilterList *filter_list, - MSG_FilterType filter_type, JSFilterCallback cb, void *arg); - -XP_END_PROTOS - -#endif diff --git a/include/msg_srch.h b/include/msg_srch.h deleted file mode 100644 index 8197bcb1b2d2..000000000000 --- a/include/msg_srch.h +++ /dev/null @@ -1,470 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ -/* - * Public API for searching mail, news, and LDAP - * pieces of this API are also used by filter rules and address book - * - */ - -#ifndef _MSG_SRCH_H -#define _MSG_SRCH_H - -#include "msgcom.h" /* for MSG_PRIORITY, MessageKey */ -#include "dirprefs.h" /* for DIR_AttributeId */ - -#define FE_IMPLEMENTS_BOOLEAN_OR - -typedef enum -{ - SearchError_First, /* no functions return this; just for bookkeeping */ - SearchError_Success, /* no error */ - SearchError_NotImplemented, /* coming soon */ - - SearchError_OutOfMemory, /* can't allocate required memory */ - SearchError_NullPointer, /* a req'd pointer parameter was null */ - SearchError_ScopeAgreement, /* attr or op not supp in this scope */ - SearchError_ListTooSmall, /* menu item array not big enough */ - - SearchError_ResultSetEmpty, /* search done, no matches found */ - SearchError_ResultSetTooBig, /* too many matches to get them all */ - - SearchError_InvalidAttribute, /* specified attrib not in enum */ - SearchError_InvalidScope, /* specified scope not in enum */ - SearchError_InvalidOperator, /* specified op not in enum */ - - SearchError_InvalidSearchTerm, /* cookie for search term is bogus */ - SearchError_InvalidSearchType, /* search type is bogus */ - SearchError_InvalidScopeTerm, /* cookie for scope term is bogus */ - SearchError_InvalidResultElement, /* cookie for result element is bogus */ - SearchError_InvalidPane, /* context probably bogus */ - SearchError_InvalidStream, /* in strm bad (too short? bad magic?) */ - SearchError_InvalidFolder, /* given folderInfo isn't searchable */ - SearchError_InvalidIndex, /* the passed index is invalid */ - - SearchError_HostNotFound, /* couldn't connect to server */ - SearchError_Timeout, /* network didn't respond */ - SearchError_DBOpenFailed, /* couldn't open off-line msg db */ - SearchError_Busy, /* operation can not be performed now */ - - SearchError_NotAMatch, /* used internally for term eval */ - SearchError_ScopeDone, /* used internally for scope list eval */ - - SearchError_ValueRequired, /* string to search for not provided */ - SearchError_Unknown, /* some random error */ - - SearchError_Last /* no functions return this; just for bookkeeping */ -} MSG_SearchError; - -typedef enum -{ - scopeMailFolder, - scopeNewsgroup, - scopeLdapDirectory, - scopeOfflineNewsgroup, - scopeAllSearchableGroups -} MSG_ScopeAttribute; - -typedef enum -{ - attribSubject = 0, /* mail and news */ - attribSender, - attribBody, - attribDate, - - attribPriority, /* mail only */ - attribMsgStatus, - attribTo, - attribCC, - attribToOrCC, - - attribCommonName, /* LDAP only */ - attrib822Address, - attribPhoneNumber, - attribOrganization, - attribOrgUnit, - attribLocality, - attribStreetAddress, - attribSize, - attribAnyText, /* any header or body */ - attribKeywords, - - attribDistinguishedName, /* LDAP result elem only */ - attribObjectClass, - attribJpegFile, - - attribLocation, /* result list only */ - attribMessageKey, /* message result elems */ - - attribAgeInDays, /* for purging old news articles */ - - attribGivenName, /* for sorting LDAP results */ - attribSurname, - - attribFolderInfo, /* for "view thread context" from result */ - - attribCustom1, /* custom LDAP attributes */ - attribCustom2, - attribCustom3, - attribCustom4, - attribCustom5, - - attribMessageId, - attribOtherHeader, /* for mail and news. MUST ALWAYS BE LAST attribute since we can have an arbitrary # of these...*/ - - kNumAttributes /* must be last attribute */ -} MSG_SearchAttribute; - -/* NB: If you add elements to this enum, add only to the end, since - * RULES.DAT stores enum values persistently - */ -typedef enum -{ - opContains = 0, /* for text attributes */ - opDoesntContain, - opIs, /* is and isn't also apply to some non-text attrs */ - opIsnt, - opIsEmpty, - - opIsBefore, /* for date attributes */ - opIsAfter, - - opIsHigherThan, /* for priority. opIs also applies */ - opIsLowerThan, - - opBeginsWith, - opEndsWith, - - opSoundsLike, /* for LDAP phoenetic matching */ - opLdapDwim, /* Do What I Mean for simple search */ - - opIsGreaterThan, - opIsLessThan, - - kNumOperators /* must be last operator */ -} MSG_SearchOperator; - -/* FEs use this to help build the search dialog box */ -typedef enum -{ - widgetText, - widgetDate, - widgetMenu, - widgetInt, /* added to account for age in days which requires an integer field */ - widgetNone -} MSG_SearchValueWidget; - -/* Used to specify type of search to be performed */ -typedef enum -{ - searchNone, - searchRootDSE, - searchNormal, - searchLdapVLV -} MSG_SearchType; - -/* Use this to specify the value of a search term */ -typedef struct MSG_SearchValue -{ - MSG_SearchAttribute attribute; - union - { - char *string; - MSG_PRIORITY priority; - time_t date; - uint32 msgStatus; /* see MSG_FLAG in msgcom.h */ - uint32 size; - MessageKey key; - uint32 age; /* in days */ - MSG_FolderInfo *folder; - } u; -} MSG_SearchValue; - -/* Use this to help build menus in the search dialog. See APIs below */ -#define kSearchMenuLength 64 -typedef struct MSG_SearchMenuItem -{ - int16 attrib; - char name[kSearchMenuLength]; - XP_Bool isEnabled; -} MSG_SearchMenuItem; - -#ifdef XP_CPLUSPLUS - struct MSG_ScopeTerm; - struct MSG_ResultElement; - struct DIR_Server; -#else - #include "dirprefs.h" - typedef struct MSG_ScopeTerm MSG_ScopeTerm; - typedef struct MSG_ResultElement MSG_ResultElement; -#endif - -XP_BEGIN_PROTOS - -/* manage lifetime of internal search memory */ -MSG_SearchError MSG_SearchAlloc (MSG_Pane *); /* alloc memory in context */ -MSG_SearchError MSG_SearchFree (MSG_Pane *); /* free memory in context */ - -MSG_SearchError MSG_AddSearchTerm ( - MSG_Pane *searchPane, /* ptr to pane to add criteria */ - MSG_SearchAttribute attrib, /* attribute for this term */ - MSG_SearchOperator op, /* operator e.g. opContains */ - MSG_SearchValue *value, /* value e.g. "Dogbert" */ - XP_Bool BooleanAND, /* set to true if associated boolean operator is AND */ - char * arbitraryHeader); /* user defined arbitrary header. ignored unless attrib = attribOtherHeader */ - -/* It's generally not necessary for the FE to read the list of terms after - * the list has been built. However, in our Basic/Advanced LDAP search dialogs - * the FE is supposed to remember the criteria, and since that information is - * lying around in the backend anyway, we'll just make it available to the FE - */ -MSG_SearchError MSG_CountSearchTerms ( - MSG_Pane *searchPane, - int *numTerms); -MSG_SearchError MSG_GetNthSearchTerm ( - MSG_Pane *searchPane, - int whichTerm, - MSG_SearchAttribute *attrib, - MSG_SearchOperator *op, - MSG_SearchValue *value); - -MSG_SearchError MSG_CountSearchScopes ( - MSG_Pane *searchPane, - int *numScopes); -MSG_SearchError MSG_GetNthSearchScope ( - MSG_Pane *searchPane, - int which, - MSG_ScopeAttribute *scopeId, - void **scope); - -/* add a scope (e.g. a mail folder) to the search */ -MSG_SearchError MSG_AddScopeTerm ( - MSG_Pane *searchPane, /* ptr to pane to add search scope */ - MSG_ScopeAttribute attrib, /* what kind of scope term is this */ - MSG_FolderInfo *folder); /* which folder to search */ - -/* special cases for LDAP since LDAP isn't really a folderInfo */ -MSG_SearchError MSG_AddLdapScope ( - MSG_Pane *searchPane, - DIR_Server *server); -MSG_SearchError MSG_AddAllLdapScopes ( - MSG_Pane *searchPane, - XP_List *dirServerList); - -/* Call this function everytime the scope changes! It informs the FE if - the current scope support custom header use. FEs should not display the - custom header dialog if custom headers are not supported */ - -XP_Bool MSG_ScopeUsesCustomHeaders( - MSG_Master * master, - MSG_ScopeAttribute scope, - void * selection, /* could be a folder or server based on scope */ - XP_Bool forFilters); /* is this a filter we are talking about? */ - -XP_Bool MSG_IsStringAttribute( /* use this to determine if your attribute is a string attrib */ - MSG_SearchAttribute); - -/* add all scopes of a given type to the search */ -MSG_SearchError MSG_AddAllScopes ( - MSG_Pane *searchPane, /* ptr to pane to add scopes */ - MSG_Master *master, /* mail or news scopes */ - MSG_ScopeAttribute attrib); /* what kind of scopes to add */ - -/* begin execution of the search */ -MSG_SearchError MSG_Search ( - MSG_Pane *searchPane); /* So we know how to work async */ -MSG_SearchError MSG_InterruptSearchViaPane ( - MSG_Pane *searchPane); /* ptr to pane with search to interrupt */ -void *MSG_GetSearchParam ( - MSG_Pane *pane); /* ptr to pane to retrieve param from */ -MSG_SearchType MSG_GetSearchType ( - MSG_Pane *pane); /* ptr to pane to retrieve search type from*/ -MSG_SearchError MSG_SetSearchParam ( - MSG_Pane *searchPane, /* ptr to pane to add search param */ - MSG_SearchType type, /* type of specialized search to perform */ - void *param); /* extended search parameter */ -uint32 MSG_GetNumResults ( /* ptr to pane to retrieve get # results */ - MSG_Pane *pane); - -/* manage elements in list of search hits */ -MSG_SearchError MSG_GetResultElement ( - MSG_Pane *searchPane, /* ptr to pane containing results */ - MSG_ViewIndex idx, /* zero-based index of result to get */ - MSG_ResultElement **result); /* filled in resultElement. NOT allocated */ -MSG_SearchError MSG_GetResultAttribute ( - MSG_ResultElement *elem, /* which result elem to get value for */ - MSG_SearchAttribute attrib, /* which attribute to get value for */ - MSG_SearchValue **result); /* filled in value */ -MSG_SearchError MSG_OpenResultElement ( - MSG_ResultElement *elem, /* which result elem to open */ - void *window); /* MSG_Pane* for mail/news, contxt for LDAP */ -MWContextType MSG_GetResultElementType ( - MSG_ResultElement *elem); /* context type needed for this elem */ -MWContext *MSG_IsResultElementOpen ( - MSG_ResultElement *elem); /* current context if open, NULL if not */ -MSG_SearchError MSG_SortResultList ( - MSG_Pane *searchPane, /* ptr to pane containing results */ - MSG_SearchAttribute sortKey, /* which attribute is the sort key */ - XP_Bool descending); /* T- sort descending, F- sort ascending */ -MSG_SearchError MSG_DestroySearchValue ( - MSG_SearchValue *value); /* free struct and heap-based struct elems */ -MSG_SearchError MSG_ModifyLdapResult ( - MSG_ResultElement *elem, /* which result element to modify */ - MSG_SearchValue *val); /* new value to stuff in */ -MSG_SearchError MSG_AddLdapResultsToAddressBook( - MSG_Pane *searchPane, /* ptr to pane containing results */ - MSG_ViewIndex *indices, /* selection array */ - int count); /* size of array */ -MSG_SearchError MSG_ComposeFromLdapResults( - MSG_Pane *searchPane, /* ptr to pane containing results */ - MSG_ViewIndex *indices, /* selection array */ - int count); /* size of array */ - -/* help FEs manage menu selections in Search dialog box */ -MSG_SearchError MSG_GetSearchWidgetForAttribute ( - MSG_SearchAttribute attrib, /* which attr to get UI widget type for */ - MSG_SearchValueWidget *widget); /* what kind of UI widget specifies attr */ - -/* For referring to DIR_Servers and MSG_FolderInfos polymorphically */ -typedef struct MSG_ScopeUnion -{ - MSG_ScopeAttribute *attribute; - union - { - DIR_Server *server; - MSG_FolderInfo *folder; - } u; -} MSG_ScopeUnion; - - -/* always call this routine b4 calling MSG_GetAttributesForSearchScopes to - determine how many elements your MSG_SearchMenuItem array needs to be */ -MSG_SearchError MSG_GetNumAttributesForSearchScopes( - MSG_Master *master, - MSG_ScopeAttribute scope, - void ** selArray, /* selected items for LCD calculation */ - uint16 selCount, /* number of selected items */ - uint16 *numItems); /* out - number of attribute items for scope */ - -MSG_SearchError MSG_GetAttributesForSearchScopes ( - MSG_Master *master, - MSG_ScopeAttribute scope, - void **selArray, /* selected items for LCD calculation */ - uint16 selCount, /* number of selected items */ - MSG_SearchMenuItem *items, /* array of caller-allocated structs */ - uint16 *maxItems); /* in- max array size; out- num returned */ - -MSG_SearchError MSG_GetOperatorsForSearchScopes ( - MSG_Master *master, - MSG_ScopeAttribute scope, - void **selArray, /* selected items for LCD calculation */ - uint16 selCount, /* number of selected items */ - MSG_SearchAttribute attrib, /* return available ops for this attrib */ - MSG_SearchMenuItem *items, /* array of caller-allocated structs */ - uint16 *maxItems); /* in- max array size; out- num returned */ - -MSG_SearchError MSG_GetScopeMenuForSearchMessages ( - MSG_Master *master, - MSG_FolderInfo **selArray, - uint16 selCount, - MSG_SearchMenuItem *items, - uint16 *maxItems); - -/* always call this routine b4 calling MSG_GetAttributesForFilterScopes to - determine how many elements your MSG_SearchMenuItem array needs to be */ -MSG_SearchError MSG_GetNumAttributesForFilterScopes( - MSG_Master *master, - MSG_ScopeAttribute scope, - void ** selArray, /* selected items for LCD calculation */ - uint16 selCount, /* number of selected items */ - uint16 *numItems); /* out - number of attribute items for scope */ - -MSG_SearchError MSG_GetAttributesForFilterScopes ( - MSG_Master *master, - MSG_ScopeAttribute scope, - void **selArray, /* selected items for LCD calculation */ - uint16 selCount, /* number of selected items */ - MSG_SearchMenuItem *items, /* array of caller-allocated structs */ - uint16 *maxItems); /* in- max array size; out- num returned */ - -MSG_SearchError MSG_GetOperatorsForFilterScopes ( - MSG_Master *master, - MSG_ScopeAttribute scope, - void **selArray, /* selected items for LCD calculation */ - uint16 selCount, /* number of selected items */ - MSG_SearchAttribute attrib, /* return available ops for this attrib */ - MSG_SearchMenuItem *items, /* array of caller-allocated structs */ - uint16 *maxItems); /* in- max array size; out- num returned */ - -/***************************************************************************** - These two functions have been added to the search APIs to help support Arbitrary - Headers. In particular, the FEs need to be able to grab a semaphore when they - create an edit headers dialog (we only want to allow 1 dialog to be open at a time). - AcquireEditHeadersSemaphore returns TRUE if the FE successfully acquired the semaphore - and FALSE if someone else acquired it. ReleaseEditHeaderSemaphore returns TRUE if you - were the original holder of the semaphore and the semaphore was released. FALSE if you - were not the original holder - **********************************************************************************/ -XP_Bool MSG_AcquireEditHeadersSemaphore (MSG_Master * master, void * holder); -XP_Bool MSG_ReleaseEditHeadersSemaphore (MSG_Master * master, void * holder); - -MSG_SearchError MSG_SearchAttribToDirAttrib ( - MSG_SearchAttribute searchAttrib, - DIR_AttributeId *dirAttrib); - - -MSG_SearchError MSG_GetBasicLdapSearchAttributes ( - DIR_Server *server, - MSG_SearchMenuItem *items, - int *maxItems); - -/* maybe these belong in msgcom.h? */ -void MSG_GetPriorityName (MSG_PRIORITY priority, char *name, uint16 max); -void MSG_GetUntranslatedPriorityName (MSG_PRIORITY priority, - char *name, uint16 max); -void MSG_GetStatusName (uint32 status, char *name, uint16 max); -MSG_PRIORITY MSG_GetPriorityFromString(const char *priority); - -/* support for profile searching in Dredd */ -MSG_SearchError MSG_SaveProfileStatus (MSG_Pane *searchPane, XP_Bool *enabled); -MSG_SearchError MSG_SaveProfile (MSG_Pane *searchPane, const char *profileName); - -/* support for searching all Dredd groups + all subscribed groups */ -MSG_SearchError MSG_AddAllSearchableGroupsStatus(MSG_Pane *searchPane, XP_Bool *enabled); - -/* support for opening a search result in its thread pane context */ -XP_Bool MSG_GoToFolderStatus (MSG_Pane *searchPane, - MSG_ViewIndex *indices, - int32 numIndices); - -/* used between libnet and libmsg to allow searching for characters which - * are otherwise significant in news: URLs - */ -extern char *MSG_EscapeSearchUrl (const char *value); -extern char *MSG_UnEscapeSearchUrl (const char *value); - -/* This is how "search:" of different mail/news folder types works */ -extern int MSG_ProcessSearch (MWContext *context); -extern int MSG_InterruptSearch (MWContext *context); - -XP_END_PROTOS - -#endif /* _MSG_SRCH_H */ diff --git a/include/msgnet.h b/include/msgnet.h deleted file mode 100644 index 42230e78b49d..000000000000 --- a/include/msgnet.h +++ /dev/null @@ -1,513 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ -/* msgnet.h --- prototypes for API's between libmsg and libnet. - */ - -#ifndef _MSGNET_H_ -#define _MSGNET_H_ -#include "msgcom.h" -#include "dirprefs.h" - -XP_BEGIN_PROTOS - -/* so libnet can mark expired articles as read. */ -extern int MSG_MarkMessageKeyRead (MSG_Pane *pane, MessageKey key, const char *xref); - -/* record imap message flags in the db of the current pane (message or thread panes) */ -extern void MSG_RecordImapMessageFlags(MSG_Pane* pane, - MessageKey msgKey, - imapMessageFlagsType flags); - -/* notify libmsg of deleted messages */ -extern void MSG_ImapMsgsDeleted(MSG_Pane *urlPane, - const char *onlineMailboxName, - const char *hostName, - XP_Bool deleteAllMsgs, - const char *doomedKeyString); - -/* called to setup state before a copy download */ -extern void MSG_StartImapMessageToOfflineFolderDownload(MWContext* context); - -/* notify libmsg that inbox filtering is complete */ -extern void MSG_ImapInboxFilteringComplete(MSG_Pane *urlPane); - -/* notify libmsg that the online/offline synch is complete */ -extern void MSG_ImapOnOffLineSynchComplete(MSG_Pane *urlPane); - -/* notify libmsg that an imap folder load was interrupted */ -extern void MSG_InterruptImapFolderLoad(MSG_Pane *urlPane, const char *hostName, const char *onlineFolderPath); - -/* find a reference or NULL to the specified imap folder */ -extern MSG_FolderInfo* MSG_FindImapFolder(MSG_Pane *urlPane, const char *hostName, const char *onlineFolderPath); - -/* Used to kill connections after removing them from the cache so biff wont hang around them */ -extern void MSG_IMAP_KillConnection(TNavigatorImapConnection *imapConnection); - -/* If there is a cached connection, for this folder, uncache it and return it */ -extern TNavigatorImapConnection* MSG_UnCacheImapConnection(MSG_Master* master, const char *host, const char *folderName); - -/* Cache this connection and return TRUE if there is not one there already, else false */ -extern XP_Bool MSG_TryToCacheImapConnection(MSG_Master* master, const char *host, const char *folderName, TNavigatorImapConnection *connection); - -extern void MSG_SetIMAPMessageUID (MessageKey key, - void *state); - - -extern const char *MSG_GetMessageIdFromState (void *state); -extern XP_Bool MSG_IsSaveDraftDeliveryState (void *state); - -extern void MSG_SetUserAuthenticated (MSG_Master* master, XP_Bool bAuthenticated); - -extern XP_Bool MSG_IsUserAuthenticated (MSG_Master* master); - -extern void MSG_SetMailAccountURL(MSG_Master* master, const char *urlString); -extern void MSG_SetHostMailAccountURL(MSG_Master* master, const char *hostName, const char *urlString); -extern void MSG_SetHostManageListsURL(MSG_Master* master, const char *hostName, const char *urlString); -extern void MSG_SetHostManageFiltersURL(MSG_Master* master, const char *hostName, const char *urlString); - -extern const char *MSG_GetMailAccountURL(MSG_Master* master); - -extern void MSG_SetNewsgroupUsername(MSG_Pane* pane, const char *username); -extern const char *MSG_GetNewsgroupUsername(MSG_Pane *pane); - -extern void MSG_SetNewsgroupPassword(MSG_Pane* pane, const char *password); -extern const char *MSG_GetNewsgroupPassword(MSG_Pane *pane); - -extern const char* MSG_GetPopHost(MSG_Prefs* prefs); - -extern XP_Bool MSG_GetUseSSLForIMAP4(MSG_Pane *pane); -extern int32 MSG_GetIMAPSSLPort(MSG_Pane *pane); - -/* called from libnet to clean up state from mailbox:copymessages */ -extern void MSG_MessageCopyIsCompleted (struct MessageCopyInfo**); - -/* called from libnet to determine if the current copy is finished */ -extern XP_Bool MSG_IsMessageCopyFinished(struct MessageCopyInfo*); - -/* called from mailbox and url libnet modules */ -extern -int MSG_BeginCopyingMessages(MWContext *context); - -extern -int MSG_FinishCopyingMessages(MWContext *context); - -extern const char *MSG_GetIMAPHostUsername(MSG_Master *master, const char *hostName); -extern const char *MSG_GetIMAPHostPassword(MSG_Master *master, const char *hostName); -extern void MSG_SetIMAPHostPassword(MSG_Master *master, const char *hostName, const char *password); -extern int MSG_GetIMAPHostIsUsingSubscription(MSG_Master *master, const char *hostName, XP_Bool *usingSubscription); -extern XP_Bool MSG_GetIMAPHostDeleteIsMoveToTrash(MSG_Master *master, const char *hostName); -extern MSG_FolderInfo *MSG_GetTrashFolderForHost(MSG_IMAPHost *host); -extern int IMAP_AddIMAPHost(const char *hostName, XP_Bool usingSubscription, XP_Bool overrideNamespaces, - const char *personalNamespacePrefix, const char *publicNamespacePrefixes, - const char *otherUsersNamespacePrefixes, XP_Bool haveAdminUrl); -extern XP_Bool MSG_GetIMAPHostIsSecure(MSG_Master *master, const char *hostName); - -typedef enum -{ MSG_NotRunning = 0x00000000 -, MSG_RunningOnline = 0x00000001 -, MSG_RunningOffline = 0x00000002 -} MSG_RunningState; - -extern MSG_FolderInfo *MSG_SetFolderRunningIMAPUrl(MSG_Pane *urlPane, const char *hostName, const char *onlineFolderPath, MSG_RunningState runningState); -extern void MSG_IMAPUrlFinished(MSG_FolderInfo *folder, URL_Struct *URL_s); - -/* =========================================================================== - OFFLINE IMAP - =========================================================================== - */ - -extern uint32 MSG_GetImapMessageFlags(MSG_Pane *urlPane, - const char *hostName, - const char *onlineBoxName, - uint32 key); - -extern void MSG_StartOfflineImapRetrieval(MSG_Pane *urlPane, - const char *hostName, - const char *onlineBoxName, - uint32 key, - void **offLineRetrievalData); - -extern uint32 MSG_GetOfflineMessageSize(void *offLineRetrievalData); - -extern int MSG_ProcessOfflineImap(void *offLineRetrievalData, char *socketBuffer, uint32 read_size); - -extern int MSG_InterruptOfflineImap(void *offLineRetrievalData); - -extern void MSG_GetNextURL(MSG_Pane *pane); - -/* Returns the original pane that a progress pane was associated with. If - the given pane is not a progresspane, returns NULL. */ -extern MSG_Pane* MSG_GetParentPane(MSG_Pane* progresspane); - -/* do an imap biff of the imap inbox */ -extern void MSG_ImapBiff(MWContext* context, MSG_Prefs* prefs); -extern MWContext *MSG_GetBiffContext(); - -extern void MSG_SetFolderAdminURL(MSG_Master *master, const char *hostName, const char*mailboxName, const char *url); - -/* The NNTP module of netlib calls these to feed XOVER data to the message - library, in response to a news:group.name URL having been opened. - If MSG_FinishXOVER() returns a message ID, that message will be loaded - next (used for selecting the first unread message in a group after - listing that group.) - - The "out" arguments are (if non-NULL) a file descriptor to write the XOVER - line to, followed by a "\n". This is used by the XOVER-caching code. - */ -extern int MSG_InitXOVER (MSG_Pane* pane, - MSG_NewsHost* host, - const char* group_name, - uint32 first_msg, uint32 last_msg, - uint32 oldest_msg, uint32 youngest_msg, - void **data); -extern int MSG_ProcessXOVER (MSG_Pane* pane, char *line, void **data); -extern int MSG_ProcessNonXOVER (MSG_Pane* pane, char *line, void **data); -extern int MSG_FinishXOVER (MSG_Pane* pane, void **data, int status); - -/* In case of XOVER failed due to the authentication process, we need to - do some clean up. So that we could have a fresh start once we pass the - authentication check. -*/ -extern int MSG_ResetXOVER (MSG_Pane* pane, void **data); - - -/* These calls are used by libnet to determine which articles it ought to - get in a big newsgroup. */ - -extern int -MSG_GetRangeOfArtsToDownload(MSG_Pane* pane, void** data, MSG_NewsHost* host, - const char* group_name, - int32 first_possible, /* Oldest article available - from newsserver*/ - int32 last_possible, /* Newest article available - from newsserver*/ - int32 maxextra, - int32* first, - int32* last); - - -extern int -MSG_AddToKnownArticles(MSG_Pane *pane, MSG_NewsHost* host, - const char* groupname, int32 first, int32 last); - -extern int MSG_InitAddArticleKeyToGroup(MSG_Pane *pane, MSG_NewsHost* host, - const char* groupName, void **parseState); - -extern int MSG_AddArticleKeyToGroup(void *parse_state, int32 first); - -extern int MSG_FinishAddArticleKeyToGroup(MSG_Pane *pane, void **parse_state); - -/* After displaying a list of newsgroups, we need the NNTP module to go and - run "GROUP" commands for the ones for which we don't know the unread - article count. This function returns a count of how many groups we think - we're going to need this for (so we can display progress in a reasonable - way). - */ -extern int32 MSG_GetNewsRCCount(MSG_Pane* pane, MSG_NewsHost* host); - -/* Gets the name of the next group that we want to get article counts for. - The caller must free the given name using XP_FREE(). - MSG_DisplaySubscribedGroup() should get called with this group before - this call happens again. */ - -extern char* MSG_GetNewsRCGroup(MSG_Pane* pane, MSG_NewsHost* host); - - - -/* In response to a "news://host/" URL; this is called once for each group - that was returned by MSG_GetNewsRCGroup(), after the NNTP GROUP command has - been run. It's also called whenever we actually visit the group (the user - clicks on the newsgroup line), in case the data has changed since the - initial passthrough. The "nowvisiting" parameter is TRUE in the latter - case, FALSE otherwise. */ -extern int MSG_DisplaySubscribedGroup(MSG_Pane* pane, - MSG_NewsHost* host, - const char *group, - int32 oldest_message, - int32 youngest_message, - int32 total_messages, - XP_Bool nowvisiting); - -/* In response to an NNTP GROUP command, the server said the group doesn't exist */ -extern int MSG_GroupNotFound(MSG_Pane* pane, - MSG_NewsHost* host, - const char *group, - XP_Bool opening); - -/* In response to a "news://host/?newgroups" URL, to ask the server for a - list of recently-added newsgroups. Similar to MSG_DisplaySubscribedGroup, - except that in this case, the group is not already in the list. */ -extern int MSG_DisplayNewNewsGroup (MWContext *context, - MSG_NewsHost* host, const char *group_name, - int32 oldest_message, - int32 youngest_message); - - -/* News servers work better if you ask for message numbers instead of IDs. - So, the NNTP module asks us what the group and number of an ID is with - this. If we don't know, we return 0 for both. If the pane is not a - thead or message pane, this routine will fail. - */ -extern void MSG_NewsGroupAndNumberOfID (MSG_Pane *pane, - const char *message_id, - const char **group_return, - uint32 *message_number_return); - -/* This routine is used by netlib to see if we have this article off-line - It might be combined with the above routine, but I'm not sure if this - is the way we're ultimately going to do this. -*/ -extern XP_Bool MSG_IsOfflineArticle (MSG_Pane *pane, - const char *message_id, - const char **group_return, - uint32 *message_number_return); - -extern int MSG_StartOfflineRetrieval(MSG_Pane *pane, - const char *group, - uint32 message_number, - void **offlineState); - -extern int MSG_ProcessOfflineNews(void *offlineState, char *outputBuffer, int outputBufSize); - -extern int MSG_InterruptOfflineNews(void *offlineState); - -/* libnet callbacks for Dredd NNTP extensions */ - -extern void MSG_SupportsNewsExtensions (MSG_NewsHost *host, XP_Bool supports); -extern void MSG_AddNewsExtension (MSG_NewsHost *host, const char *ext); -extern XP_Bool MSG_QueryNewsExtension (MSG_NewsHost *host, const char *ext); -extern XP_Bool MSG_NeedsNewsExtension (MSG_NewsHost *host, const char *ext); - -extern void MSG_AddSearchableGroup (MSG_NewsHost *host, const char *group); -extern void MSG_AddSearchableHeader (MSG_NewsHost *host, const char *header); -extern int MSG_AddProfileGroup (MSG_Pane *pane, - MSG_NewsHost* host, - const char *groupName); - -extern int MSG_AddPrettyName(MSG_NewsHost* host, - const char *groupName, const char *prettyName); - -extern int MSG_SetXActiveFlags(MSG_Pane *pane, char *groupName, - int32 firstPossibleArt, - int32 lastPossibleArt, - char *flags); - -extern int MSG_AddSubscribedGroup (MSG_Pane *pane, const char *groupUrl); - -extern void MSG_AddPropertyForGet (MSG_NewsHost *host, const char *property, - const char *value); - -/* libnet calls this if it got an error 441 back from the newsserver. That - error almost certainly means that the newsserver already has a message - with the same message id. If this routine returns TRUE, then we were - pretty much expecting that error code, because we know we tried twice to - post the same message, and we can just ignore it. */ -extern XP_Bool MSG_IsDuplicatePost(MSG_Pane* comppane); - - -/* libnet uses this on an error condition to tell libmsg to generate a new - message-id for the given composition. */ -extern void MSG_ClearCompositionMessageID(MSG_Pane* comppane); - - -/* libnet uses this to determine the message-id for the given composition (so - it can test if this message was already posted.) */ -extern const char* MSG_GetCompositionMessageID(MSG_Pane* comppane); - -/* The "news:" and "mailbox:" protocol handlers call this when a message is - displayed, so that we can use the contents of the headers when composing - replies. - */ -extern void -MSG_ActivateReplyOptions(MSG_Pane* messagepane, MimeHeaders *headers); - -/* Tell the subscribe pane about a new newsgroup we noticed. */ - -extern int -MSG_AddNewNewsGroup(MSG_Pane* pane, MSG_NewsHost* host, - const char* groupname, int32 oldest, int32 youngest, - const char *flag, XP_Bool bXactiveFlags); - -/* tell the host info database that we're going to need to get the extra info - for this new newsgroup -*/ -extern int MSG_SetGroupNeedsExtraInfo(MSG_NewsHost *host, - const char* groupname, XP_Bool needsExtra); - -/* returns the name of the first group which needs extra info */ -extern char *MSG_GetFirstGroupNeedingExtraInfo(MSG_NewsHost *host); - -/* Find out from libmsg when we last checked for new newsgroups (so we know - what date to give the "newgroups" command.) */ - -extern time_t -MSG_NewsgroupsLastUpdatedTime(MSG_NewsHost* host); - - - -/* The "mailbox:" protocol module uses these routines to invoke the mailbox - parser in libmsg. - */ -extern int MSG_BeginOpenFolderSock (MSG_Pane* pane, - const char *folder_name, - const char *message_id, int32 msgnum, - void **folder_ptr); -extern int MSG_FinishOpenFolderSock (MSG_Pane* pane, - const char *folder_name, - const char *message_id, int32 msgnum, - void **folder_ptr); -extern void MSG_CloseFolderSock (MSG_Pane* pane, const char *folder_name, - const char *message_id, int32 msgnum, - void *folder_ptr); -extern int MSG_OpenMessageSock (MSG_Pane* messagepane, const char *folder_name, - const char *msg_id, int32 msgnum, - void *folder_ptr, void **message_ptr, - int32 *content_length); -extern int MSG_ReadMessageSock (MSG_Pane* messagepane, const char *folder_name, - void *message_ptr, const char *message_id, - int32 msgnum, char *buffer, int32 buffer_size); -extern void MSG_CloseMessageSock (MSG_Pane* messagepane, - const char *folder_name, - const char *message_id, int32 msgnum, - void *message_ptr); -extern void MSG_PrepareToIncUIDL(MSG_Pane* messagepane, URL_Struct* url, - const char* uidl); - -/* This is how "mailbox:?empty-trash" works - */ -extern int MSG_BeginEmptyTrash(MSG_Pane* folderpane, URL_Struct* url, - void** closure); -extern int MSG_FinishEmptyTrash(MSG_Pane* folderpane, URL_Struct* url, - void* closure); -extern int MSG_CloseEmptyTrashSock(MSG_Pane* folderpane, URL_Struct* url, - void* closure); - -/* This is how "mailbox:?compress-folder" and - "mailbox:/foo/baz/nsmail/inbox?compress-folder" works. */ - -extern int MSG_BeginCompressFolder(MSG_Pane* pane, URL_Struct* url, - const char* foldername, void** closure); -extern int MSG_FinishCompressFolder(MSG_Pane* pane, URL_Struct* url, - const char* foldername, void* closure); -extern int MSG_CloseCompressFolderSock(MSG_Pane* pane, URL_Struct* url, - void* closure); -/* This is how "mailbox:?deliver-queued" works - */ -extern int MSG_BeginDeliverQueued(MSG_Pane* pane, URL_Struct* url, - void** closure); -extern int MSG_FinishDeliverQueued(MSG_Pane* pane, URL_Struct* url, - void* closure); -extern int MSG_CloseDeliverQueuedSock(MSG_Pane* pane, URL_Struct* url, - void* closure); - -/* This is how "mailbox:?background" works */ -extern int MSG_ProcessBackground(URL_Struct* urlstruct); - -/* libnet --> libmsg glue for newsgroup searching */ -extern void MSG_AddNewsXpatHit (MWContext *context, uint32 artNum); -extern void MSG_AddNewsSearchHit (MWContext *context, const char *resultLine); - -/* libnet --> libmsg glue for imap mail folder searching */ -extern void MSG_AddImapSearchHit (MWContext *context, const char *resultLine); -/* The POP3 protocol module uses these routines to hand us new messages. - */ -extern XP_Bool MSG_BeginMailDelivery (MSG_Pane* folderpane); -extern void MSG_AbortMailDelivery (MSG_Pane* folderpane); -extern void MSG_EndMailDelivery (MSG_Pane* folderpane); -extern void *MSG_IncorporateBegin (MSG_Pane* folderpane, - FO_Present_Types format_out, - char *pop3_uidl, - URL_Struct *url, - uint32 flags); -extern int MSG_IncorporateWrite (MSG_Pane* folderpane, void *closure, - const char *block, int32 length); -extern int MSG_IncorporateComplete(MSG_Pane* folderpane, void *closure); -extern int MSG_IncorporateAbort (MSG_Pane* folderpane, void *closure, - int status); -extern void MSG_ClearSenderAuthedFlag(MSG_Pane* folderpane, void *closure); - - - - -/* This is how the netlib registers the converters relevant to MIME message - display and composition. - */ -void MSG_RegisterConverters (void); - -extern void -MSG_StartMessageDelivery (MSG_Pane *pane, - void *fe_data, - MSG_CompositionFields *fields, - XP_Bool digest_p, - XP_Bool dont_deliver_p, - const char *attachment1_type, - const char *attachment1_body, - uint32 attachment1_body_length, - const struct MSG_AttachmentData *attachments, - void *mimeRelatedPart, /* only used in compose pane */ - void (*message_delivery_done_callback) - (MWContext *context, - void *fe_data, - int status, - const char *error_message)); - -/* When a message which has the `partial' bit set, meaning we only downloaded - the first 20 lines because it was huge, this function will be called to - return some HTML to tack onto the end of the message to explain that it - is truncated, and provide a clickable link which will download the whole - message. - */ -extern char *MSG_GeneratePartialMessageBlurb (MSG_Pane* messagepane, - URL_Struct *url, void *closure, - MimeHeaders *headers); - - -extern int MSG_GetUrlQueueSize (const char *url, MWContext *context); - -extern XP_Bool MSG_RequestForReturnReceipt(MSG_Pane* pane); -extern XP_Bool MSG_SendingMDNInProgress(MSG_Pane* pane); - -extern uint32 MSG_GetIMAPMessageSizeFromDB(MSG_Pane *masterPane, const char *hostName, char *folderName, char *id, XP_Bool idIsUid); - -extern void MSG_RefreshFoldersForUpdatedIMAPHosts(MWContext *context); - -extern XP_Bool MSG_MailCheck(MWContext *context, MSG_Prefs *prefs); - -extern void MSG_Pop3MailCheck(MWContext *context); - -extern int NET_parse_news_url (const char *url, - char **host_and_portP, - XP_Bool *securepP, - char **groupP, - char **message_idP, - char **command_specific_dataP); - -extern char *MSG_GetArbitraryHeadersForHost(MSG_Master *master, const char *hostName); - -/* Directory Server Replication - */ -extern XP_Bool NET_ReplicateDirectory(MSG_Pane *pane, DIR_Server *server); - -XP_END_PROTOS - - -#endif diff --git a/include/np2.h b/include/np2.h deleted file mode 100644 index c89e4f022fa4..000000000000 --- a/include/np2.h +++ /dev/null @@ -1,38 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - - -/* - * Prototypes for functions exported by OJI based libplugin and called by the FEs or other XP libs. - */ - -#ifndef _NP2_H -#define _NP2_H - -#include "jni.h" -#include "lo_ele.h" - -PR_EXTERN(const char *) NPL_GetText(LO_CommonPluginStruct* embed); -PR_EXTERN(jobject) NPL_GetJavaObject(LO_CommonPluginStruct* embed); - -#endif /* _NP2_H */ - diff --git a/include/nsldap.h b/include/nsldap.h deleted file mode 100644 index f67c23b9002f..000000000000 --- a/include/nsldap.h +++ /dev/null @@ -1,23 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* blank ldap header just to satisfy MSVC dependency generator */ diff --git a/include/nslocks.h b/include/nslocks.h deleted file mode 100644 index 9bc39f067b32..000000000000 --- a/include/nslocks.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -#ifndef nspr_locks_h___ -#define nspr_locks_h___ - -/* many people in libnet [mkautocf.c ...] (and possibly others) get - * NSPR20 for free by including nslocks.h. To minimize changes during - * the javaectomy effort, we are including this file (where previously - * it was only included if java was included. - */ -#include "prmon.h" -#ifdef XP_MAC -#include "prpriv.h" /* for MonitorEntryCount */ -#else -#include "private/prpriv.h" -#endif - -#if defined(JAVA) || defined(NS_MT_SUPPORTED) - -XP_BEGIN_PROTOS -extern PRMonitor* libnet_asyncIO; -XP_END_PROTOS - -#define LIBNET_LOCK() PR_EnterMonitor(libnet_asyncIO) -#define LIBNET_UNLOCK() PR_ExitMonitor(libnet_asyncIO) -#define LIBNET_IS_LOCKED() PR_InMonitor(libnet_asyncIO) - -#else /* !JAVA && !NS_MT_SUPPORTED*/ - -#define LIBNET_LOCK() -#define LIBNET_UNLOCK() -#define LIBNET_IS_LOCKED() 1 - -#endif /* JAVA */ - -#endif /* nspr_locks_h___ */ diff --git a/include/ntos.h b/include/ntos.h deleted file mode 100644 index 259bc159f423..000000000000 --- a/include/ntos.h +++ /dev/null @@ -1,124 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/********************************************************************** - * ntOS.h - functionality used bt NT Operating System - * - **********************************************************************/ - -#ifndef _ntos_h -#define _ntos_h - - -#ifdef __cplusplus -extern "C" { /* Assume C declarations for C++ */ -#endif /* __cplusplus */ - -/* prototypes for info.c */ -typedef enum { - OS_WIN95, - OS_WINNT, - OS_WIN32S, - OS_UNKNOWN -} OS_TYPE; - -typedef enum { - PROCESSOR_I386, - PROCESSOR_ALPHA, - PROCESSOR_MIPS, - PROCESSOR_PPC, - PROCESSOR_UNKNOWN -} PROCESSOR_TYPE; - -OS_TYPE INFO_GetOperatingSystem (); -DWORD INFO_GetOperatingSystemMajorVersion (); -DWORD INFO_GetOperatingSystemMinorVersion (); -void OS_GetComputerName (LPTSTR computerName, int nComputerNameLength ); -PROCESSOR_TYPE OS_GetProcessor (); - - -/* prototypes for path.c */ -DWORD WINAPI PATH_RemoveRelative ( char * path ); -DWORD WINAPI PATH_ConvertNtSlashesToUnix( LPCTSTR lpszNtPath, LPSTR lpszUnixPath ); - - -/* prototypes for registry.c */ -BOOL REG_CheckIfKeyExists( HKEY hKey, LPCTSTR registryKey ); -BOOL REG_CreateKey( HKEY hKey, LPCTSTR registryKey ); -BOOL REG_DeleteKey( HKEY hKey, LPCTSTR registryKey ); - -BOOL -REG_GetRegistryParameter( - HKEY hKey, - LPCTSTR registryKey, - LPTSTR QueryValueName, - LPDWORD ValueType, - LPBYTE ValueBuffer, - LPDWORD ValueBufferSize - ); - -BOOL -REG_SetRegistryParameter( - HKEY hKey, - LPCTSTR registryKey, - LPTSTR valueName, - DWORD valueType, - LPCTSTR ValueString, - DWORD valueStringLength - ); - -BOOL -REG_GetSubKeysInfo( - HKEY hKey, - LPCTSTR registryKey, - LPDWORD lpdwNumberOfSubKeys, - LPDWORD lpdwMaxSubKeyLength - ); - -BOOL -REG_GetSubKey( HKEY hKey, - LPCTSTR registryKey, - DWORD nSubKeyIndex, - LPTSTR registrySubKeyBuffer, - DWORD subKeyBufferSize - ); - -/* prototypes for service.c */ -#define SERVRET_ERROR 0 -#define SERVRET_INSTALLED 1 -#define SERVRET_STARTING 2 -#define SERVRET_STARTED 3 -#define SERVRET_STOPPING 4 -#define SERVRET_REMOVED 5 - -DWORD SERVICE_GetNTServiceStatus(LPCTSTR serviceName, LPDWORD lpLastError ); -DWORD SERVICE_InstallNTService(LPCTSTR serviceName, LPCTSTR serviceExe ); -DWORD SERVICE_RemoveNTService(LPCTSTR serviceName); -DWORD SERVICE_StartNTService(LPCTSTR serviceName); -DWORD SERVICE_StopNTService(LPCTSTR serviceName); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/include/pics.h b/include/pics.h deleted file mode 100644 index 4eb34d0c21de..000000000000 --- a/include/pics.h +++ /dev/null @@ -1,70 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -#ifndef PICS_H -#define PICS_H - -typedef struct { - char *service; - XP_Bool generic; - char *fur; /* means 'for' */ - XP_List *ratings; -} PICS_RatingsStruct; - -typedef struct { - char *name; - double value; -} PICS_RatingValue; - -typedef enum { - PICS_RATINGS_PASSED, - PICS_RATINGS_FAILED, - PICS_NO_RATINGS -} PICS_PassFailReturnVal; - -void PICS_FreeRatingsStruct(PICS_RatingsStruct *rs); - -/* return NULL or ratings struct */ -PICS_RatingsStruct * PICS_ParsePICSLable(char * label); - -/* returns TRUE if page should be censored - * FALSE if page is allowed to be shown - */ -PICS_PassFailReturnVal PICS_CompareToUserSettings(PICS_RatingsStruct *rs, char *cur_page_url); - -XP_Bool PICS_IsPICSEnabledByUser(void); - -XP_Bool PICS_AreRatingsRequired(void); - -/* returns a URL string from a RatingsStruct - * that includes the service URL and rating info - */ -char * PICS_RStoURL(PICS_RatingsStruct *rs, char *cur_page_url); - -void PICS_Init(MWContext *context); - -XP_Bool PICS_CanUserEnableAdditionalJavaCapabilities(void); - -XP_Bool PICS_CheckForValidTreeRating(char *url_address); - - -#endif /* PICS_H */ diff --git a/include/prefetch.h b/include/prefetch.h deleted file mode 100644 index ac912d413862..000000000000 --- a/include/prefetch.h +++ /dev/null @@ -1,30 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ -/* Prefetching H file */ -#ifndef PREFETCH_H -#define PREFETCH_H - -extern void PRE_AddToList(MWContext* context, char* url); -extern void PRE_Fetch(MWContext* context); -extern void PRE_Enable(PRUint8 nNumber); - -#endif /* PREFETCH_H */ diff --git a/include/pwcacapi.h b/include/pwcacapi.h deleted file mode 100644 index ab1be848696e..000000000000 --- a/include/pwcacapi.h +++ /dev/null @@ -1,103 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -#ifndef PWCACAPI_H -#define PWCACAPI_H - -/* contains a null terminated array of name and value stings - * - * end index of name should always be equal to the end index of value - * - */ - -typedef struct _PCNameValuePair PCNameValuePair; -typedef struct _PCNameValueArray PCNameValueArray; - -typedef void PCDataInterpretFunc ( - char *module, - char *key, - char *data, int32 data_size, - char *type_buffer, int32 type_buffer_size, - char *url_buffer, int32 url_buffer_size, - char *username_buffer, int32 username_buffer_size, - char *password_buffer, int32 password_buffer_size); - -/* returns 0 on success -1 on error - */ -extern int PC_RegisterDataInterpretFunc(char *module, - PCDataInterpretFunc *func); - -extern int PC_PromptUsernameAndPassword(MWContext *context, - char *prompt, - char **username, - char **password, - XP_Bool *remember_password, - XP_Bool is_secure); - -extern char *PC_PromptPassword(MWContext *context, - char *prompt, - XP_Bool *remember_password, - XP_Bool is_secure); - -extern char *PC_Prompt(MWContext *context, - char *prompt, - char *deft, - XP_Bool *remember, - XP_Bool is_secure); - -void PC_FreeNameValueArray(PCNameValueArray *array); - -PCNameValueArray * PC_NewNameValueArray(void); - -uint32 PC_ArraySize(PCNameValueArray *array); - -char * PC_FindInNameValueArray(PCNameValueArray *array, char *name); - -int PC_DeleteNameFromNameValueArray(PCNameValueArray *array, char *name); - -void PC_EnumerateNameValueArray(PCNameValueArray *array, char **name, char **value, XP_Bool beginning); - -int PC_AddToNameValueArray(PCNameValueArray *array, char *name, char *value); - -void PC_CheckForStoredPasswordData(char *module, char *key, char **data, int32 *len); - -int PC_DeleteStoredPassword(char *module, char *key); - -PCNameValueArray * PC_CheckForStoredPasswordArray(char *module, char *key); - -int PC_StoreSerializedPassword(char *module, char *key, char *data, int32 len); - -int PC_StorePasswordNameValueArray(char *module, char *key, PCNameValueArray *array); - -void PC_SerializeNameValueArray(PCNameValueArray *array, char **data, int32 *len); - -PCNameValueArray * PC_CharToNameValueArray(char *data, int32 len); - -/*, returns status - */ -int PC_DisplayPasswordCacheAsHTML(URL_Struct *URL_s, - FO_Present_Types format_out, - MWContext *context); - -void PC_Shutdown(); - -#endif /* PWCACAPI_H */ diff --git a/include/shr_str.h b/include/shr_str.h deleted file mode 100644 index f2655e2f8a71..000000000000 --- a/include/shr_str.h +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* - * shr_str.h - * --------- - * - * Error codes that are shared by more than one module of - * Netscape Navigator. This file is probably a temporary - * workaround until we can get a more sophisticated sharing - * mechanism in place. - * - * Codes are represented as fixed numbers, not offsets off - * of a base, to avoid namespace collision. - * - */ - -#ifndef SHR_STR_H -#define SHR_STR_H - -#define MK_OUT_OF_MEMORY -207 -#define MK_UNABLE_TO_OPEN_FILE -223 -#define MK_DISK_FULL -250 -#define MK_UNABLE_TO_OPEN_TMP_FILE -253 -#define MK_MIME_NO_RECIPIENTS -267 -#define MK_NNTP_SERVER_NOT_CONFIGURED -307 -#define MK_UNABLE_TO_DELETE_FILE -327 - -#define MK_MSG_DELIV_MAIL 15412 -#define MK_MSG_DELIV_NEWS 15414 -#define MK_MSG_SAVE_AS 15483 -#define MK_MSG_NO_HEADERS 15528 -#define MK_MSG_MIME_MAC_FILE 15530 -#define MK_MSG_CANT_OPEN 15540 -#define XP_MSG_UNKNOWN 15572 -#define XP_EDIT_NEW_DOC_NAME 15629 - -#define XP_ALERT_TITLE_STRING -7956 -#define XP_SEC_SHOWCERT -7963 -#define XP_SEC_SHOWORDER -7962 - - -#ifdef XP_WIN - -/* for Winsock defined error codes */ -#include "winsock.h" - -#define XP_ERRNO_ECONNREFUSED WSAECONNREFUSED -#define XP_ERRNO_EIO WSAECONNREFUSED -#define XP_ERRNO_EISCONN WSAEISCONN -#define XP_ERRNO_EWOULDBLOCK EWOULDBLOCK - -#endif /* XP_WIN */ - -#endif diff --git a/include/timing.h b/include/timing.h deleted file mode 100644 index 575208313dac..000000000000 --- a/include/timing.h +++ /dev/null @@ -1,242 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -#ifndef timing_h__ -#define timing_h__ - -#include "prtypes.h" -#include "prtime.h" - -PR_BEGIN_EXTERN_C - -/** - * Write a timing message to the timing log module, using - * printf() formatting. The message will be pre-pended with - * thread and timing information. Do not use this function directly; - * rather, use the TIMING_MSG() macro, below. - *

- * This is based on NSPR2.0 logging, so it is not necessary to - * terminate messages with a newline. - * - * @fmtstr The printf()-style format string. - */ -PR_EXTERN(void) -TimingWriteMessage(const char* fmtstr, ...); - -/** - * Queries whether the timing log is currently enabled. - * - * @return PR_TRUE if the timing log is currently enabled. - */ -PR_EXTERN(PRBool) -TimingIsEnabled(void); - -/** - * Sets the timing log's state. - * - * @param enabled PR_TRUE to enable, PR_FALSE to - * disable. - */ -PR_EXTERN(void) -TimingSetEnabled(PRBool aEnabled); - - -/** - * Start a unique "clock" with the given name. If the clock already - * exists, this call will not re-start it. - * - * @param clock A C-string name for the clock. - */ -PR_EXTERN(void) -TimingStartClock(const char* aClock); - -/** - * Stop the "clock" with the given name, returning the elapsed - * time in result. This destroys the clock. - *

- * If the clock has already been stopped, this call will have - * no effect. - * - * @param result If successful, returns the time recorded on - * the clock (in microseconds). - * @param clock The C-string name of the clock to stop. - * @return PR_TRUE if the clock exists, was running, - * and was successfully stopped. - */ -PR_EXTERN(PRBool) -TimingStopClock(PRTime* result, const char* aClock); - -/** - * Return PR_TRUE if the clock with the specified - * name exists and is running. - */ -PR_EXTERN(PRBool) -TimingIsClockRunning(const char* aClock); - -/** - * Convert an elapsed time into a human-readable string. - * - * @param time An elapsed PRTime value. - * @param buffer The buffer to use for conversion. - * @param size The size of buffer. - * @return A pointer to buffer. - */ -PR_EXTERN(char*) -TimingElapsedTimeToString(PRTime aTime, char* aBuffer, PRUint32 aSize); - -PR_END_EXTERN_C - -#if !defined(MOZ_TIMING) - -#define TIMING_MESSAGE(args) ((void) 0) -#define TIMING_STARTCLOCK_NAME(op, name) ((void) 0) -#define TIMING_STOPCLOCK_NAME(op, name, cx, msg) ((void) 0) -#define TIMING_STARTCLOCK_OBJECT(op, obj) ((void) 0) -#define TIMING_STOPCLOCK_OBJECT(op, obj, cx, msg) ((void) 0) - -#else /* !defined(MOZ_TIMING) */ - -/** - * Use this macro to log timing information. It uses the - * "double-parens" hack to allow you to pass arbitrarily formatted - * strings; e.g., - * - *

- * TIMING_MESSAGE(("cache,%s,not found", url->address));
- * 
- */ -#define TIMING_MESSAGE(args) TimingWriteMessage args - - -/** - * Use this macro to start a "clock" on an object using a pointer - * to the object; e.g., - * - *
- * TIMING_STARTCLOCK_OBJECT("http:request", URL_s);
- * 
- * - * The clock should be uniquely identified by the op and - * obj parameters. - * - * @param op A C-string that is the "operation" that is being - * performed. - * @param obj A pointer to an object. - */ -#define TIMING_STARTCLOCK_OBJECT(op, obj) \ -do {\ - char buf[256];\ - PR_snprintf(buf, sizeof(buf), "%s,%08x", op, obj);\ - TimingStartClock(buf);\ -} while (0) - - -/** - * Use this macro to stop a "clock" on an object and print out - * a message that indicates the total elapsed time on the clock; - * e.g., - * - *
- * TIMING_STOPCLOCK_OBJECT("http:request", URL_s, "ok");
- * 
- * - * The op and obj parameters are used to - * identify the clock to stop. - * - * @param op A C-string that is the "operation" that is being - * performed. - * @param obj A pointer to an object. - * @param cx A pointer to the MWContext. - * @param msg A message to include in the log entry. - */ -#define TIMING_STOPCLOCK_OBJECT(op, obj, cx, msg) \ -do {\ - char buf[256];\ - PR_snprintf(buf, sizeof(buf), "%s,%08x", op, obj);\ - if (TimingIsClockRunning(buf)) {\ - PRTime tmElapsed;\ - PRUint32 nElapsed;\ - TimingStopClock(&tmElapsed, buf);\ - LL_L2UI(nElapsed, tmElapsed);\ - TimingWriteMessage("clock,%s,%ld,%08x,%s",\ - buf, nElapsed, cx, msg);\ - }\ -} while (0) - - -/** - * Use this macro to start a "clock" on a "named" operation; e.g., - * - *
- * TIMING_STARTCLOCK_NAME("http:request", "http://www.cnn.com");
- * 
- * - * The clock should be uniquely identified by the op and - * name parameters. - * - * @param op A C-string identifying the operation that is being - * performed. - * @param name A C-string that is the name for the timer. - */ -#define TIMING_STARTCLOCK_NAME(op, name) \ -do {\ - char buf[256];\ - PR_snprintf(buf, sizeof(buf), "%s,%.64s", op, name);\ - TimingStartClock(buf);\ -} while (0) - - -/** - * Use this macro to stop a "clock" on a "named operation" and print out - * a message that indicates the total elapsed time on the clock; - * e.g., - * - *
- * TIMING_STOPCLOCK_NAME("http:request", "http://www.cnn.com", "ok");
- * 
- * - * The op and name parameters are used to - * identify the clock to stop. - * - * @param op A C-string that is the "operation" that is being - * performed. - * @param name A C-string that is the name for the timer. - * @param msg A message to include in the log entry. - */ -#define TIMING_STOPCLOCK_NAME(op, name, cx, msg) \ -do {\ - char buf[256];\ - PR_snprintf(buf, sizeof(buf), "%s,%.64s", op, name);\ - if (TimingIsClockRunning(buf)) {\ - PRTime tmElapsed;\ - PRUint32 nElapsed;\ - TimingStopClock(&tmElapsed, buf);\ - LL_L2UI(nElapsed, tmElapsed);\ - TimingWriteMessage("clock,%s,%ld,%08x,%s",\ - buf, nElapsed, cx, msg);\ - }\ -} while (0) - -#endif /* !defined(NO_TIMING) */ - -#endif /* timing_h__ */ - diff --git a/include/undo.h b/include/undo.h deleted file mode 100644 index 0b0c210907e8..000000000000 --- a/include/undo.h +++ /dev/null @@ -1,130 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - - -/* - undo.h --- creating and maintaining an undo list. - Created: Terry Weissman , 9-Sept-95. -*/ - -#ifndef _UNDO_H_ -#define _UNDO_H_ - - - -typedef struct UndoState UndoState; - - -XP_BEGIN_PROTOS - -/* Create a new undo state. (Returns NULL if no memory available). State will - be saved to execute up to "maxdepth" undos in a row.*/ -extern UndoState* UNDO_Create(int maxdepth); - - -/* Throw away the undo state. */ -extern void UNDO_Destroy(UndoState* state); - - -/* Throw away all the queued events in the undo state. If we are in the middle - of a batch (there are outstanding calls to UNDO_StartBatch()), then future - events in the batch are also thrown away. */ -extern void UNDO_DiscardAll(UndoState* state); - -/* Mark the beginning of a bunch of actions that should be undone as one user - action. Should always be matched by a later call to UNDO_EndBatch(). - These calls can nest. They fail only if running out of memory, in which - case they will call UNDO_DiscardAll(). */ - -/* Note you can use the tag arguments to associate a batch of events with - some user defined tag e.g., a name or object identifying the batch of events */ - -extern int UNDO_StartBatch(UndoState* state); - -extern int UNDO_EndBatch(UndoState* state, void (*freetag)(void*), void* tag); - - -/* Returns TRUE if undoing will do something (i.e., the menu item for "Undo" - should be selectable). */ - -extern XP_Bool UNDO_CanUndo(UndoState* state); - - -/* Returns TRUE if redoing will do something (i.e., the menu item for "Redo" - should be selectable). */ - -extern XP_Bool UNDO_CanRedo(UndoState* state); - - -/* Actually do an undo. Should only be called if UNDO_CanUndo returned TRUE. - May not be called if there are any pending calls to UNDO_StartBatch. */ - -extern int UNDO_DoUndo(UndoState* state); - - -/* Actually do an redo. Should only be called if UNDO_CanRedo returned TRUE. - May not be called if there are any pending calls to UNDO_StartBatch. */ - -extern int UNDO_DoRedo(UndoState* state); - - -/* Log an event. The "undoit" function is to be called with the closure to - undo an event that just happened. It returns a success code; if negative, - the code will be propagated up to the call to UNDO_DoUndo and UNDO_DoRedo, - and UNDO_DiscardAll will be called. Note that the undoit function almost - always ends up calling UNDO_LogEvent again, to log the function to undo thie - undoing of this action. If you get my drift. - - The "freeit" function is called when the undo library decides it will never - ever call undoit function. It is called with the closure to free storage - used by the closure. - - If this fails (we ran out of memory), then it will return a negative failure - code, and call UNDO_DiscardAll() and the freeit func. */ - -/* Note you can use the tag arguments to associate the event with - some user defined tag e.g., a name or object identifying the event. */ - -#ifdef XP_OS2 -typedef int (*PNSLUFN)(void *); -typedef void (*PNSLFFN)(void *); -extern int UNDO_LogEvent(UndoState* state, PNSLUFN undoit, - PNSLFFN freeit, void* closure, - PNSLFFN freetag, void* tag); -#else -extern int UNDO_LogEvent(UndoState* state, int (*undoit)(void*), - void (*freeit)(void*), void* closure, - void (*freetag)(void*), void* tag); -#endif - -/* Retrieve the undo/redo tag from the top of the corresponding stack. The - tag is the "thing" YOU assigned during either an UNDO_EndBatch() or - UNDO_LogEvent call. You most likely use the tag to identify the event[s] - that can be undone/redone. - e.g., Label the Edit|Undo menu item with, say, Edit|Undo Delete. */ - -extern void *UNDO_PeekUndoTag(UndoState* state); -extern void *UNDO_PeekRedoTag(UndoState* state); - -XP_END_PROTOS - -#endif /* !_UNDO_H_ */ diff --git a/include/vcc.h b/include/vcc.h deleted file mode 100644 index e3b8ccabfc26..000000000000 --- a/include/vcc.h +++ /dev/null @@ -1,80 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/*************************************************************************** -(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International -Business Machines Corporation and Siemens Rolm Communications Inc. - -For purposes of this license notice, the term Licensors shall mean, -collectively, Apple Computer, Inc., AT&T Corp., International -Business Machines Corporation and Siemens Rolm Communications Inc. -The term Licensor shall mean any of the Licensors. - -Subject to acceptance of the following conditions, permission is hereby -granted by Licensors without the need for written agreement and without -license or royalty fees, to use, copy, modify and distribute this -software for any purpose. - -The above copyright notice and the following four paragraphs must be -reproduced in all copies of this software and any software including -this software. - -THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE -ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR -MODIFICATIONS. - -IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT, -INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT -OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - -EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. - -The software is provided with RESTRICTED RIGHTS. Use, duplication, or -disclosure by the government are subject to restrictions set forth in -DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. - -***************************************************************************/ - -#ifndef __VCC_H__ -#define __VCC_H__ 1 - -XP_BEGIN_PROTOS - -#include "vobject.h" - -VObject* Parse_MIME(const char *input, unsigned long len); - -VObject* Parse_MIME_FromFile(XP_File file); - -VObject* Parse_MIME_FromFileName(char* fname); - -typedef void (*MimeErrorHandler)(char *); - -void registerMimeErrorHandler(MimeErrorHandler); - -XP_END_PROTOS - -#endif /* __VCC_H__ */ diff --git a/include/vobject.h b/include/vobject.h deleted file mode 100644 index 619998fcb616..000000000000 --- a/include/vobject.h +++ /dev/null @@ -1,428 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/*************************************************************************** -(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International -Business Machines Corporation and Siemens Rolm Communications Inc. - -For purposes of this license notice, the term Licensors shall mean, -collectively, Apple Computer, Inc., AT&T Corp., International -Business Machines Corporation and Siemens Rolm Communications Inc. -The term Licensor shall mean any of the Licensors. - -Subject to acceptance of the following conditions, permission is hereby -granted by Licensors without the need for written agreement and without -license or royalty fees, to use, copy, modify and distribute this -software for any purpose. - -The above copyright notice and the following four paragraphs must be -reproduced in all copies of this software and any software including -this software. - -THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE -ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR -MODIFICATIONS. - -IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT, -INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT -OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - -EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. - -The software is provided with RESTRICTED RIGHTS. Use, duplication, or -disclosure by the government are subject to restrictions set forth in -DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. - -***************************************************************************/ - -/* - -The vCard/vCalendar C interface is implemented in the set -of files as follows: - -vcc.y, yacc source, and vcc.c, the yacc output you will use -implements the core parser - -vobject.c implements an API that insulates the caller from -the parser and changes in the vCard/vCalendar BNF - -port.h defines compilation environment dependent stuff - -vcc.h and vobject.h are header files for their .c counterparts - -vcaltmp.h and vcaltmp.c implement vCalendar "macro" functions -which you may find useful. - -test.c is a standalone test driver that exercises some of -the features of the APIs provided. Invoke test.exe on a -VCARD/VCALENDAR input text file and you will see the pretty -print output of the internal representation (this pretty print -output should give you a good idea of how the internal -representation looks like -- there is one such output in the -following too). Also, a file with the .out suffix is generated -to show that the internal representation can be written back -in the original text format. - -For more information on this API see the readme.txt file -which accompanied this distribution. - - Also visit: - - http://www.versit.com - http://www.ralden.com - -*/ - - -#ifndef __VOBJECT_H__ -#define __VOBJECT_H__ 1 - -#include "xp.h" -#include "xp_file.h" - -/* -Unfortunately, on the Mac (and possibly other platforms) with our current, out-dated -libraries (Plauger), |wchar_t| is defined incorrectly, which breaks vcards. - -We can't fix Plauger because it doesn't come with source. Later, when we -upgrade to MSL, we can make this evil hack go away. In the mean time, -vcards are not allowed to use the (incorrectly defined) |wchar_t| type. Instead, -they will use an appropriately defined local type |vwchar_t|. -*/ - -#ifdef XP_MAC - typedef uint16 vwchar_t; -#else - typedef wchar_t vwchar_t; -#endif - -XP_BEGIN_PROTOS - -#define VC7bitProp "7bit" -#define VC8bitProp "8bit" -#define VCAAlarmProp "aalarm" -#define VCAdditionalNamesProp "addn" -#define VCAdrProp "adr" -#define VCAgentProp "agent" -#define VCAIFFProp "aiff" -#define VCAOLProp "aol" -#define VCAppleLinkProp "applelink" -#define VCAttachProp "attach" -#define VCAttendeeProp "attendee" -#define VCATTMailProp "attmail" -#define VCAudioContentProp "audiocontent" -#define VCAVIProp "avi" -#define VCBase64Prop "base64" -#define VCBBSProp "bbs" -#define VCBirthDateProp "bday" -#define VCBMPProp "bmp" -#define VCBodyProp "body" -#define VCBusinessRoleProp "role" -#define VCCalProp "vcalendar" -#define VCCaptionProp "cap" -#define VCCardProp "vcard" -#define VCCarProp "car" -#define VCCategoriesProp "categories" -#define VCCellularProp "cell" -#define VCCGMProp "cgm" -#define VCCharSetProp "cs" -#define VCCIDProp "cid" -#define VCCISProp "cis" -#define VCCityProp "l" -#define VCClassProp "class" -#define VCCommentProp "note" -#define VCCompletedProp "completed" -#define VCContentIDProp "content-id" -#define VCCountryNameProp "c" -#define VCDAlarmProp "dalarm" -#define VCDataSizeProp "datasize" -#define VCDayLightProp "daylight" -#define VCDCreatedProp "dcreated" -#define VCDeliveryLabelProp "label" -#define VCDescriptionProp "description" -#define VCDIBProp "dib" -#define VCDisplayStringProp "displaystring" -#define VCDomesticProp "dom" -#define VCDTendProp "dtend" -#define VCDTstartProp "dtstart" -#define VCDueProp "due" -#define VCEmailAddressProp "email" -#define VCEncodingProp "encoding" -#define VCEndProp "end" -#define VCEventProp "vevent" -#define VCEWorldProp "eworld" -#define VCExNumProp "exnum" -#define VCExpDateProp "exdate" -#define VCExpectProp "expect" -#define VCExtAddressProp "ext add" -#define VCFamilyNameProp "f" -#define VCFaxProp "fax" -#define VCFullNameProp "fn" -#define VCGeoProp "geo" -#define VCGeoLocationProp "geo" -#define VCGIFProp "gif" -#define VCGivenNameProp "g" -#define VCGroupingProp "grouping" -#define VCHomeProp "home" -#define VCIBMMailProp "ibmmail" -#define VCInlineProp "inline" -#define VCInternationalProp "intl" -#define VCInternetProp "internet" -#define VCISDNProp "isdn" -#define VCJPEGProp "jpeg" -#define VCLanguageProp "lang" -#define VCLastModifiedProp "last-modified" -#define VCLastRevisedProp "rev" -#define VCLocationProp "location" -#define VCLogoProp "logo" -#define VCMailerProp "mailer" -#define VCMAlarmProp "malarm" -#define VCMCIMailProp "mcimail" -#define VCMessageProp "msg" -#define VCMETProp "met" -#define VCModemProp "modem" -#define VCMPEG2Prop "mpeg2" -#define VCMPEGProp "mpeg" -#define VCMSNProp "msn" -#define VCNamePrefixesProp "npre" -#define VCNameProp "n" -#define VCNameSuffixesProp "nsuf" -#define VCNoteProp "note" -#define VCOrgNameProp "orgname" -#define VCOrgProp "org" -#define VCOrgUnit2Prop "oun2" -#define VCOrgUnit3Prop "oun3" -#define VCOrgUnit4Prop "oun4" -#define VCOrgUnitProp "oun" -#define VCPagerProp "pager" -#define VCPAlarmProp "palarm" -#define VCParcelProp "parcel" -#define VCPartProp "part" -#define VCPCMProp "pcm" -#define VCPDFProp "pdf" -#define VCPGPProp "pgp" -#define VCPhotoProp "photo" -#define VCPICTProp "pict" -#define VCPMBProp "pmb" -#define VCPostalBoxProp "box" -#define VCPostalCodeProp "pc" -#define VCPostalProp "postal" -#define VCPowerShareProp "powershare" -#define VCPreferredProp "pref" -#define VCPriorityProp "priority" -#define VCProcedureNameProp "procedurename" -#define VCProdIdProp "prodid" -#define VCProdigyProp "prodigy" -#define VCPronunciationProp "sound" -#define VCPSProp "ps" -#define VCPublicKeyProp "key" -#define VCQPProp "qp" -#define VCQuickTimeProp "qtime" -#define VCQuotedPrintableProp "quoted-printable" -#define VCRDateProp "rdate" -#define VCRegionProp "r" -#define VCRelatedToProp "related-to" -#define VCRepeatCountProp "repeatcount" -#define VCResourcesProp "resources" -#define VCRNumProp "rnum" -#define VCRoleProp "role" -#define VCRRuleProp "rrule" -#define VCRSVPProp "rsvp" -#define VCRunTimeProp "runtime" -#define VCSequenceProp "sequence" -#define VCSnoozeTimeProp "snoozetime" -#define VCStartProp "start" -#define VCStatusProp "status" -#define VCStreetAddressProp "street" -#define VCSubTypeProp "subtype" -#define VCSummaryProp "summary" -#define VCTelephoneProp "tel" -#define VCTIFFProp "tiff" -#define VCTimeZoneProp "tz" -#define VCTitleProp "title" -#define VCTLXProp "tlx" -#define VCTodoProp "vtodo" -#define VCTranspProp "transp" -#define VCUniqueStringProp "uid" -#define VCURLProp "url" -#define VCURLValueProp "urlval" -#define VCValueProp "value" -#define VCVersionProp "version" -#define VCVideoProp "video" -#define VCVoiceProp "voice" -#define VCWAVEProp "wave" -#define VCWMFProp "wmf" -#define VCWorkProp "work" -#define VCX400Prop "x400" -#define VCX509Prop "x509" -#define VCXRuleProp "xrule" -#define VCCooltalk "x-mozilla-cpt" -#define VCCooltalkAddress "x-moxilla-cpadr" -#define VCUseServer "x-mozilla-cpsrv" -#define VCUseHTML "x-mozilla-html" - -/* return type of vObjectValueType: */ -#define VCVT_NOVALUE 0 - /* if the VObject has no value associated with it. */ -#define VCVT_STRINGZ 1 - /* if the VObject has value set by setVObjectStringZValue. */ -#define VCVT_USTRINGZ 2 - /* if the VObject has value set by setVObjectUStringZValue. */ -#define VCVT_UINT 3 - /* if the VObject has value set by setVObjectIntegerValue. */ -#define VCVT_ULONG 4 - /* if the VObject has value set by setVObjectLongValue. */ -#define VCVT_RAW 5 - /* if the VObject has value set by setVObjectAnyValue. */ -#define VCVT_VOBJECT 6 - /* if the VObject has value set by setVObjectVObjectValue. */ - -#define NAME_OF(o) o->id -#define VALUE_TYPE(o) o->valType -#define STRINGZ_VALUE_OF(o) o->val.strs -#define USTRINGZ_VALUE_OF(o) o->val.ustrs -#define INTEGER_VALUE_OF(o) o->val.i -#define LONG_VALUE_OF(o) o->val.l -#define ANY_VALUE_OF(o) o->val.any -#define VOBJECT_VALUE_OF(o) o->val.vobj - -typedef struct VObject VObject; - -typedef union ValueItem { - const char *strs; - const vwchar_t *ustrs; - unsigned int i; - unsigned long l; - void *any; - VObject *vobj; - } ValueItem; - -struct VObject { - VObject *next; - const char *id; - VObject *prop; - unsigned short valType; - ValueItem val; - }; - -typedef struct StrItem StrItem; - -struct StrItem { - StrItem *next; - const char *s; - unsigned int refCnt; - }; - -typedef struct OFile { - XP_File fp; - char *s; - int len; - int limit; - int alloc:1; - int fail:1; - } OFile; - -typedef struct VObjectIterator { - VObject* start; - VObject* next; - } VObjectIterator; - -VObject* newVObject(const char *id); -void deleteVObject(VObject *p); -char* dupStr(const char *s, unsigned int size); -void deleteStr(const char *p); -void unUseStr(const char *s); - -void setVObjectName(VObject *o, const char* id); -void setVObjectStringZValue(VObject *o, const char *s); -void setVObjectStringZValue_(VObject *o, const char *s); -void setVObjectUStringZValue(VObject *o, const vwchar_t *s); -void setVObjectUStringZValue_(VObject *o, const vwchar_t *s); -void setVObjectIntegerValue(VObject *o, unsigned int i); -void setVObjectLongValue(VObject *o, unsigned long l); -void setVObjectAnyValue(VObject *o, void *t); -VObject* setValueWithSize(VObject *prop, void *val, unsigned int size); -VObject* setValueWithSize_(VObject *prop, void *val, unsigned int size); - -const char* vObjectName(VObject *o); -const char* vObjectStringZValue(VObject *o); -const vwchar_t* vObjectUStringZValue(VObject *o); -unsigned int vObjectIntegerValue(VObject *o); -unsigned long vObjectLongValue(VObject *o); -void* vObjectAnyValue(VObject *o); -VObject* vObjectVObjectValue(VObject *o); -void setVObjectVObjectValue(VObject *o, VObject *p); - -VObject* addVObjectProp(VObject *o, VObject *p); -VObject* addProp(VObject *o, const char *id); -VObject* addProp_(VObject *o, const char *id); -VObject* addPropValue(VObject *o, const char *p, const char *v); -VObject* addPropSizedValue_(VObject *o, const char *p, const char *v, unsigned int size); -VObject* addPropSizedValue(VObject *o, const char *p, const char *v, unsigned int size); -VObject* addGroup(VObject *o, const char *g); -void addList(VObject **o, VObject *p); - -VObject* isAPropertyOf(VObject *o, const char *id); - -VObject* nextVObjectInList(VObject *o); -void initPropIterator(VObjectIterator *i, VObject *o); -int moreIteration(VObjectIterator *i); -VObject* nextVObject(VObjectIterator *i); - -extern void printVObject(XP_File fp,VObject *o); -void printVObject_(XP_File fp, VObject *o, int level); -extern void writeVObject(XP_File fp, VObject *o); -void writeVObject_(OFile *fp, VObject *o); -char* writeMemVObject(char *s, int *len, VObject *o); -char* writeMemVObjects(char *s, int *len, VObject *list); - -const char* lookupStr(const char *s); - -void cleanStrTbl(); - -void cleanVObject(VObject *o); -void cleanVObjects(VObject *list); - -const char* lookupProp(const char* str); -const char* lookupProp_(const char* str); - -vwchar_t* fakeUnicode(const char *ps, int *bytes); -int uStrLen(const vwchar_t *u); -char* fakeCString(const vwchar_t *u); - -void printVObjectToFile(char *fname,VObject *o); -void printVObjectsToFile(char *fname,VObject *list); -void writeVObjectToFile(char *fname, VObject *o); -void writeVObjectsToFile(char *fname, VObject *list); - -#define MAXPROPNAMESIZE 256 -#define MAXMOZPROPNAMESIZE 16 - -XP_END_PROTOS - -#endif /* __VOBJECT_H__ */ - - diff --git a/include/xp_hash.h b/include/xp_hash.h deleted file mode 100644 index 7d14da2f903d..000000000000 --- a/include/xp_hash.h +++ /dev/null @@ -1,156 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -#ifndef _XP_HASH_ -#define _XP_HASH_ - -#include "xp_list.h" - -XP_BEGIN_PROTOS - -typedef uint32 (*XP_HashingFunction) (const void *ele); - -/* A hash compare function is like strcmp - it should return negative, zero, - or positive depending on the ordering and equality of its arguments. - */ -typedef int (*XP_HashCompFunction) (const void *ele1, const void *ele2); - -/* get hash number from a string */ -extern uint32 XP_StringHash (const void *xv); - -/* Hash Tables. - */ - -typedef struct xp_HashTable *XP_HashTable; /* opaque */ - -typedef XP_Bool (*XP_HashTableMapper) (XP_HashTable table, - const void *key, void *value, - void *closure); - -/* Create a new, empty hash table object. - SIZE should be your best guess at how many items will go into this - table; if SIZE is too small, that's ok, but there will be a small - performance hit. The size need not be prime. - */ -extern XP_HashTable XP_HashTableNew (uint32 size, - XP_HashingFunction hash_fn, - XP_HashCompFunction compare_fn); - -/* Clear and free the hash table. - */ -extern void XP_HashTableDestroy (XP_HashTable table); - -/* Remove all entries from the hash table. - */ -extern void XP_Clrhash (XP_HashTable table); - -/* Add an association between KEY and VALUE to the hash table. - An existing association will be replaced. - (Note that 0 is a legal value.) - This can only fail if we run out of memory. - */ -extern int XP_Puthash (XP_HashTable table, const void *key, void *value); - -/* Remove the for KEY in the table, if it exists. - Returns FALSE if the key wasn't in the table. - */ -extern XP_Bool XP_Remhash (XP_HashTable table, const void *key); - -/* Looks up KEY in the table and returns the corresponding value. - If KEY is not in the table, `default_value' will be returned instead. - (This is necessary since 0 is a valid value with which a key can be - associated.) - */ -extern void *XP_Gethash (XP_HashTable table, const void *key, - void *default_value); - -/* Apply a function to each pair of elements in the hash table. - If that function returns FALSE, then the mapping stops prematurely. - The mapping function may call XP_Remhash() on the *current* key, but - not on any other key in this table. It also may not clear or destroy - the table. - */ -extern void XP_Maphash (XP_HashTable table, XP_HashTableMapper mapper, - void *closure); - -/* Apply a function to each pair of elements in the hash table. - After calling the function, that pair will be removed from the table. - If the function returns FALSE, then the mapping stops prematurely. - Any items which were not mapped over will still remain in the table, - but those items which were mapped over will have been freed. - - This could also be done by having the mapper function unconditionally - call XP_Remhash(), but using this function will be slightly more efficient. - */ -extern void XP_MapRemhash (XP_HashTable table, XP_HashTableMapper mapper, - void *closure); - - -/* =========================================================================== - Hash Lists, which aren't really hash tables. - */ - - -#define XP_HASH_DUPLICATE_OBJECT -99 - -typedef struct _XP_HashList { - XP_List **list; - int size; - XP_HashingFunction hash_func; - XP_HashCompFunction comp_func; -} XP_HashList; - -/* create a hash list - */ -extern XP_HashList * -XP_HashListNew (int size, XP_HashingFunction hash_func, XP_HashCompFunction comp_func); - -/* free a hash list - */ -extern void -XP_HashListDestroy (XP_HashList * hash_struct); - -/* add an element to a hash list - * - * returns positive on success and negative on failure - * - * ERROR return codes - * - * XP_HASH_DUPLICATE_OBJECT - */ -extern int -XP_HashListAddObject (XP_HashList * hash_struct, void * new_ele); - -/* finds an object by name in the hash list - */ -extern void * -XP_HashListFindObject (XP_HashList * hash_struct, void * ele); - -/* removes an object by name from the hash list - * and returns the object if found - */ -extern void * -XP_HashListRemoveObject (XP_HashList * hash_struct, void * ele); - -XP_END_PROTOS - -#endif /* _XP_HASH_ */ diff --git a/include/xp_help.h b/include/xp_help.h deleted file mode 100644 index 98681610aefa..000000000000 --- a/include/xp_help.h +++ /dev/null @@ -1,291 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ -/* xp_help.h */ - - -/* - * * - * Revision history: * - * Author: Edwin Aoki * - * Extensive Revision: Kevin Driscoll 3/19/97 * - * Updated ONLY Mail/News entries: Kevin Driscoll 3/21/97 * - * Updated to add discussion IDs: Kevin Driscoll 4/22/97 * - * Added missing/modified IDs: Gina Cariga 4/22/97 * - * Added offline & help_edit_dict IDs: Kevin Driscoll 4/28/97 * - * Added 2 HELP_HTML_MAIL IDs: Kevin Driscoll 4/29/97 * - * Fixed 5 wrong component names in helpIDs: Kevin Driscoll 5/7/97* - * Fixed 1 and added 1 ID: Kevin Driscoll 5/9/97 * - * Corrected 7 helpside IDs as per Melton: Kevin Driscoll 5/12/97 * - * Added 1 new ID for conference: Kevin Driscoll 5/12/97 * - * Corrected 2 IDs for offine download: Kevin Driscoll 5/21/97 * - *******************************************************************/ - -#ifndef XP_HELP_H -#define XP_HELP_H - - -/* The main entry point into help for most folks. This function takes a string - which represents the component and topic name for a Communicator help topic. - It prepends the netscape vendor to create a fully-qualified topic name. If - an MWContext which represents the current window is available, pass that in, - otherwise, specify NULL and NetHelp will locate an appropriate context to use. - In either event, XP_NetHelp then calls NET_LoadNetHelpTopic, below. */ - -extern void -XP_NetHelp(MWContext *pContext, const char *topic); - - -/* Called by FEs to load a fully-qualified topic. This function is implemented in - libnet/mkhelp.c, but it's extracted here so unrelated FE parts don't have - to include mkhelp.h */ - -extern void -NET_LoadNetHelpTopic(MWContext *pContext, const char *topic); - - -/* These defines correspond to help tags that can be passed to - XP_NetHelp, above, to invoke nethelp. */ - - -/* Main product help */ - -#define HELP_COMMUNICATOR "home:start_here" - -/* Address Book Dialogs */ - -#define HELP_ADDRESS_BOOK "messengr:ADDRESS_BOOK" -#define HELP_ADD_LIST_MAILING_LIST "messengr:ADD_LIST_MAILING_LIST" -#define HELP_ADD_USER_NETSCAPE_COOLTALK "messengr:ADD_USER_NETSCAPE_COOLTALK" -#define HELP_ADD_USER_PROPS "messengr:ADD_USER_PROPERTIES" -#define HELP_ADD_USER_SECURITY "messengr:ADD_USER_SECURITY" -#define HELP_ADD_USER_CONTACT "messengr:ADD_USER_CONTACT" -#define HELP_ADD_USER_NETSCAPE_COOLTALK "messengr:ADD_USER_NETSCAPE_COOLTALK" -#define HELP_LDAP_SERVER_PROPS "messengr:LDAP_SERVER_PROPERTIES" -#define HELP_EDIT_USER_CALLPOINT "messengr:ADD_USER_NETSCAPE_COOLTALK" -#define HELP_EDIT_USER_CONTACT "messengr:ADD_USER_CONTACT" -#define HELP_EDIT_USER "messengr:ADD_USER_PROPERTIES" -#define HELP_EDIT_USER_SECURITY "messengr:EDIT_USER_SECURITY" -#define HELP_MAIL_LIST_PROPS "messengr:ADD_LIST_MAILING_LIST" -#define HELP_SEARCH_MAILNEWS "messengr:SEARCH_MAILNEWS" -#define HELP_SEARCH_LDAP "messengr:SEARCH_LDAP" -#define HELP_SELECT_ADDRESSES "messengr:SELECT_ADDRESSES" -#define HELP_SEARCH_ADDRESS_BOOKS "messengr:SEARCH_ADDRESS_BOOKS" - -/* Bookmark Dialogs */ - -#define HELP_BOOKMARK_PROPERTIES "navigatr:BOOKMARK_PROPERTIES" -#define HELP_FIND_IN_BOOKMARKS "navigatr:FIND_IN_BOOKMARKS" - -/* Browser Dialogs */ - -#define HELP_OPEN_PAGE "navigatr:OPEN_PAGE" -#define HELP_SEARCH_HISTORY_LIST "navigatr:SEARCH_HISTORY_LIST" - -/* Conference Dialogs */ - -#define HELP_ADD_TO_SENDLIST "confernc:ADD_TO_SENDLIST" -#define HELP_CANVAS_SIZE "confernc:CANVAS_SIZE" -#define HELP_CHAT_FILE_SAVE "confernc:CHAT_FILE_SAVE" -#define HELP_COLLAB_BROWSER "confernc:COLLAB_BROWSER" -#define HELP_CHAT_ABOUT "confernc:CONF_CHAT_ABOUT" -#define HELP_CHAT_EDITLOG "confernc:CONF_CHAT_EDITLOG" -#define HELP_CHAT_EDITPAD "confernc:CONF_CHAT_EDITPAD" -#define HELP_CONF_FILEX "confernc:CONF_FILEX_ABOUT" -#define HELP_CONF_FILERCV "confernc:CONF_FILEX_FILERCV" -#define HELP_CONF_FILESND "confernc:CONF_FILEX_FILESND" -#define HELP_CONF_WB_ABOUT "confernc:CONF_WB_ABOUT" -#define HELP_DIRECT_CALL "confernc:DIRECT_CALL" -#define HELP_FILE_INCLUDE "confernc:FILE_INCLUDE" -#define HELP_FILE_OPEN "confernc:FILE_OPEN" -#define HELP_PROPS_AUDIO "confernc:PROPERTIES_AUDIO" -#define HELP_PROPS_AUDIO_ADVANCED "confernc:PROPERTIES_AUDIO_ADVANCED" -#define HELP_PROPS_BUSINESS_CARD "confernc:PROPERTIES_BUSINESS_CARD" -#define HELP_PROPS_CALL "confernc:PROPERTIES_CALL" -#define HELP_PROPS_SPEED_DIAL "confernc:PROPERTIES_SPEED_DIAL" -#define HELP_RECORD_VOICEMAIL "confernc:RECORD_VOICEMAIL" -#define HELP_SEND_VOICEMAIL "confernc:SEND_VOICEMAIL" -#define HELP_WB_FILE_SAVE "confernc:WB_FILE_SAVE" - -/* Editor Dialogs */ - -#define HELP_DOC_PROPS_ADVANCED "composer:DOCUMENT_PROPERTIES_ADVANCED" -#define HELP_DOC_PROPS_APPEARANCE "composer:DOCUMENT_PROPERTIES_APPEARANCE" -#define HELP_DOC_PROPS_GENERAL "composer:DOCUMENT_PROPERTIES_GENERAL" -#define HELP_HTML_TAG "composer:HTML_TAG" -#define HELP_NEW_TABLE_PROPS "composer:NEW_TABLE_PROPERTIES" -#define HELP_PROPS_CHARACTER "composer:PROPERTIES_CHARACTER" -#define HELP_PROPS_HRULE "composer:PROPERTIES_HRULE" -#define HELP_PROPS_IMAGE "composer:PROPERTIES_IMAGE" -#define HELP_PROPS_IMAGE_ALT "composer:PROPERTIES_IMAGE_ALT" -#define HELP_PROPS_LINK "composer:PROPERTIES_LINK" -#define HELP_PROPS_PARAGRAPH "composer:PROPERTIES_PARAGRAPH" -#define HELP_PROPS_TARGET "composer:PROPERTIES_TARGET" -#define HELP_PUBLISH_FILES "composer:PUBLISH_FILES" -#define HELP_TABLE_PROPS_CELL "composer:TABLE_PROPERTIES_CELL" -#define HELP_TABLE_PROPS_ROW "composer:TABLE_PROPERTIES_ROW" -#define HELP_TABLE_PROPS_TABLE "composer:TABLE_PROPERTIES_TABLE" -#define HELP_SPELL_CHECK "composer:SPELL_CHECK" -#define HELP_IMAGE_CONVERSION "composer:IMAGE_CONVERSION" -#define HELP_EXTRA_HTML "composer:EXTRA_HTML" -#define HELP_COLOR_PICKER "composer:COLOR_PICKER" - -/* Mail Dialogs */ - -#define HELP_FILTER_RULES "messengr:FILTER_RULES" -#define HELP_MAIL_FILTERS "messengr:MAIL_FILTERS" -#define HELP_MAIL_FOLDER_PROPS_GENERAL "messengr:MAIL_FOLDER_PROPERTIES_GENERAL" -#define HELP_MAIL_FOLDER "messengr:MAIL_FOLDER" -#define HELP_MAIL_NEWS_WIZARD "messengr:MAIL_NEWS_WIZARD" -#define HELP_MESSAGE_LIST_WINDOW "messengr:MESSAGE_LIST_WINDOW" -#define HELP_MAIL_MESSAGE_WINDOW "messengr:MAIL_MESSAGE_WINDOW" - -#define HELP_HTML_MAIL_QUESTION "messengr:HTML_MAIL_QUESTION" -#define HELP_HTML_MAIL_QUESTION_RECIPIENT "messengr:HTML_MAIL_QUESTION_RECIPIENT" - -#ifdef MOZ_MAIL_NEWS -#define HELP_SEARCH_MAILNEWS_OPTIONS "messengr:SEARCH_MAILNEWS_OPTIONS" -#define HELP_SEARCH_MAILNEWS_HEADERS "messengr:SEARCH_MAILNEWS_HEADERS" -#define HELP_SEARCH_LDAP_BASIC "messengr:SEARCH_LDAP_BASIC" -#define HELP_SEARCH_LDAP_ADVANCED "messengr:SEARCH_LDAP_ADVANCED" -#define HELP_FILTER_RULES_ADVANCED "messengr:FILTER_RULES_ADVANCED" -#define HELP_MAIL_FOLDER_PROPERTIES_SHARING "messengr:MAIL_FOLDER_PROPERTIES_SHARING" -#define HELP_MAIL_FOLDER_PROPERTIES_DOWNLOAD "messengr:MAIL_FOLDER_PROPERTIES_DOWNLOAD" -#define HELP_MAILNEWS_SYNCHRONIZE "messengr:MAILNEWS_SYNCHRONIZE" -#define HELP_MAILNEWS_SELECT_ITEMS "messengr:MAILNEWS_SELECT_ITEMS" -#define HELP_MAILSERVER_PROPERTY_GENERAL "messengr:MAILSERVER_PROPERTY_GENERAL" -#define HELP_MAILSERVER_PROPERTY_POP "messengr:MAILSERVER_PROPERTY_POP" -#define HELP_MAILSERVER_PROPERTY_IMAP "messengr:MAILSERVER_PROPERTY_IMAP" -#define HELP_MAILSERVER_PROPERTY_ADVANCED "messengr:MAILSERVER_PROPERTY_ADVANCED" -#define HELP_IMAP_UPGRADE "messengr:IMAP_UPGRADE" -#endif - -/* Main Preferences: Appearance */ - -#define HELP_PREFS_APPEARANCE "navigatr:PREFERENCES_APPEARANCE" -#define HELP_PREFS_APPEARANCE_FONTS "navigatr:PREFERENCES_APPEARANCE_FONTS" -#define HELP_PREFS_APPEARANCE_COLORS "navigatr:PREFERENCES_APPEARANCE_COLORS" - -/* Main Preferences: Browser */ - -#define HELP_PREFS_BROWSER "navigatr:PREFERENCES_NAVIGATOR" -#define HELP_PREFS_BROWSER_LANGUAGES "navigatr:PREFERENCES_NAVIGATOR_LANGUAGES" -#define HELP_PREFS_BROWSER_APPLICATIONS "navigatr:PREFERENCES_NAVIGATOR_APPLICATIONS" - -/* Main Preferences: Mail and Groups */ - -#define HELP_PREFS_MAILNEWS_MAIN_PANE "messengr:PREFERENCES_MAILNEWS_MAIN_PANE" -#define HELP_PREFS_MAILNEWS_IDENTITY "messengr:PREFERENCES_MAILNEWS_IDENTITY" -#define HELP_PREFS_MAILNEWS_MESSAGES "messengr:PREFERENCES_MAILNEWS_MESSAGES" -#define HELP_PREFS_MAILNEWS_MAILSERVER "messengr:PREFERENCES_MAILNEWS_MAILSERVER" -#define HELP_PREFS_MAILNEWS_GROUPSERVER "messengr:PREFERENCES_MAILNEWS_GROUPSERVER" -#define HELP_PREFS_MAILNEWS_DIRECTORY "messengr:PREFERENCES_MAILNEWS_DIRECTORY" -#ifdef MOZ_MAIL_NEWS -#define HELP_PREFS_MAILNEWS_ADDRESSING "messengr:PREFERENCES_MAILNEWS_ADDRESSING" -#define HELP_PREFS_MAILNEWS_COPIES "messengr:PREFERENCES_MAILNEWS_COPIES" -#define HELP_PREFS_MAILNEWS_FORMATTING "messengr:PREFERENCES_MAILNEWS_FORMATTING" -#define HELP_PREFS_MAILNEWS_RECEIPTS "messengr:PREFERENCES_MAILNEWS_RECEIPTS" -#endif -#define HELP_MAILNEWS_EDIT_CARD "messengr:MAILNEWS_EDIT_CARD" -#define HELP_MAILNEWS_EDIT_CARD_NAME_TAB "messengr:ADD_USER_PROPERTIES" -#define HELP_MAILNEWS_EDIT_CARD_CONTACT_TAB "messengr:ADD_USER_CONTACT" -#define HELP_MAILNEWS_EDIT_CARD_CONFERENCE_CARD "messengr:ADD_USER_NETSCAPE_COOLTALK" - -/* Main Preferences: LI */ - -#define HELP_PREFS_LI_LOGIN "navigatr:PREFERENCES_NAVIGATOR" -#define HELP_PREFS_LI_SERVER "navigatr:PREFERENCES_NAVIGATOR_LANGUAGES" -#define HELP_PREFS_LI_FILES "navigatr:PREFERENCES_NAVIGATOR_APPLICATIONS" - -#ifndef MOZ_MAIL_NEWS -#define HELP_PREFS_IDENTITY "navigatr:PREFERENCES_IDENTITY" -#endif /* MOZ_MAIL_NEWS */ - -/* Main Preferences: Composer */ - -#ifdef XP_MAC -#define HELP_PREFS_COMPOSER "composer:PREFERENCES_EDITOR_GENERAL" -#define HELP_PREFS_COMPOSER_PUBLISHING "composer:PREFERENCES_EDITOR_PUBLISH" -#else -#define HELP_PREFS_COMPOSER "messengr:PREFERENCES_COMPOSER" -#define HELP_PREFS_COMPOSER_PUBLISHING "messengr:PREFERENCES_COMPOSER_PUBLISHING" -#endif - -/* Main Preferences: Offline */ - -#define HELP_PREFS_OFFLINE "navigatr:PREFERENCES_OFFLINE" -#define HELP_PREFS_OFFLINE_GROUPS "navigatr:PREFERENCES_OFFLINE_GROUPS" - -/* Main Preferences: Advanced */ - -#define HELP_PREFS_ADVANCED "navigatr:PREFERENCES_ADVANCED" -#define HELP_PREFS_ADVANCED_CACHE "navigatr:PREFERENCES_ADVANCED_CACHE" -#define HELP_PREFS_ADVANCED_PROXIES "navigatr:PREFERENCES_ADVANCED_PROXIES" -#define HELP_PREFS_ADVANCED_DISK_SPACE "navigatr:PREFERENCES_ADVANCED_DISK_SPACE" -#define HELP_PREFS_ADVANCED_SMARTUPDATE "navigatr:PREFERENCES_ADVANCED_SMARTUPDATE" - -/* Main Preferences: Conference */ - -#define HELP_CONF_PREFS_PROPS_CALL "home:PROPERTIES_CALL" -#define HELP_CONF_PREFS_PROPS_AUDIO "home:PROPERTIES_AUDIO" -#define HELP_CONF_PREFS_PROPS_BUSINESS_CARD "home:PROPERTIES_BUSINESS_CARD" - -/* Editor Preferences */ - -#define HELP_EDIT_PREFS_EDITOR_APPEARANCE "composer:PREFERENCES_EDITOR_APPEARANCE" -#define HELP_EDIT_PREFS_EDITOR_GENERAL "composer:PREFERENCES_EDITOR_GENERAL" -#define HELP_EDIT_PREFS_EDITOR_PUBLISH "composer:PREFERENCES_EDITOR_PUBLISH" -#define HELP_EDIT_DICTIONARY "composer:EDIT_DICTIONARY" - -/* Security Preferences */ - -#define HELP_SEC_PREFS_SEC_GENERAL "home:PREFERENCES_SECURITY_GENERAL" -#define HELP_SEC_PREFS_SEC_PASSWORDS "home:PREFERENCES_SECURITY_PASSWORDS" -#define HELP_SEC_PREFS_SEC_PERSONAL_CERTIFICATES "home:PREFERENCES_SECURITY_PERSONAL_CERTIFICATES" -#define HELP_SEC_PREFS_SEC_SITE_CERTIFICATES "home:PREFERENCES_SECURITY_SITE_CERTIFICATES" - - -/* Security Advisor Dialogs */ - -#define HELP_SEC_PASS "home:SECURITY_ADVISOR_PASSWORDS" -#define HELP_SEC_PCERT "home:SECURITY_ADVISOR_PERSONAL_CERTIFICATES" -#define HELP_SEC_ADV "home:SECURITY_ADVISOR_SECURITY_ADVISOR" -#define HELP_SEC_SCERT "home:SECURITY_ADVISOR_SITE_CERTIFICATES" - -/* Discussion Dialogs */ - -#define HELP_NEWS_DISCUSION_GENERAL "collabra:NEWS_DISCUSSION_GENERAL" -#define HELP_NEWS_DISCUSION_DOWNLOAD "collabra:NEWS_DISCUSSION_DOWNLOAD" -#define HELP_NEWS_DISCUSION_DISKSPACE "collabra:NEWS_DISCUSSION_DISKSPACE" -#define HELP_NEWS_NEW_GROUP_SERVER "collabra:NEWS_NEW_GROUP_SERVER" -#define HELP_NEWS_ADD_DIRECTORY_SERVER "collabra:NEWS_ADD_DIRECTORY_SERVER" -#define HELP_NEWS_DIRECTORY_SERVER_PROPERTY "collabra:NEWS_DIRECTORY_SERVER_PROPERTY" -#define HELP_DISCUSSION_HOST_PROPERTIES "collabra:DISCUSSION_HOST_PROPERTIES" -#define HELP_SUBSCRIBE_SEARCH "collabra:SUBSCRIBE_SEARCH" -#define HELP_SUBSCRIBE_LIST_NEW "collabra:SUBSCRIBE_LIST_NEW" -#define HELP_SUBSCRIBE_LIST_ALL "collabra:SUBSCRIBE_LIST_ALL" -#define HELP_ADD_SERVER "collabra:ADD_SERVER" - - -#define HELP_OFFLINE_DOWNLOAD "collabra:NEWS_DISCUSSION_DOWNLOAD_OFFLINE" -#define HELP_OFFLINE_DISCUSSION_GROUPS "collabra:NEWS_DISCUSSION_GROUPS" - -#endif diff --git a/include/xp_mesg.h b/include/xp_mesg.h deleted file mode 100644 index 75b2dc3da2aa..000000000000 --- a/include/xp_mesg.h +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -/*----------------------------------------------------------------------------- - Position String Formatting - %ns argument n is a string - %ni argument n is an integer - %% literal % - - n must be from 1 to 9 - - XP_MessageLen returns the length of the formatted message, including - the terminating NULL. - - XP_Message formats the message into the given buffer, not exceeding - bufferLen (which includes the terminating NULL). If there isn't enough - space, XP_Message will truncate the text and terminate it (unlike - strncpy, which will truncate but not terminate). - - XP_StaticMessage is like XP_Message but maintains a private buffer - which it resizes as necessary. ------------------------------------------------------------------------------*/ - -#ifndef _XP_Message_ -#define _XP_Message_ - -#include "xp_core.h" - -XP_BEGIN_PROTOS - -int -XP_MessageLen (const char * format, ...); - -void -XP_Message (char * buffer, int bufferLen, const char * format, ...); - -const char * -XP_StaticMessage (const char * format, ...); - -XP_END_PROTOS - -#endif /* _XP_Message_ */ - diff --git a/include/xp_ncent.h b/include/xp_ncent.h deleted file mode 100644 index e07ae3bc1890..000000000000 --- a/include/xp_ncent.h +++ /dev/null @@ -1,68 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -#ifndef __XP_NavCenter_H -#define __XP_NavCenter_H - -#ifdef MOZILLA_CLIENT - -#include "xp_core.h" -#include "htrdf.h" - -XP_BEGIN_PROTOS - -/* Callback function, allows consumer of the list to specialize search - * via a callback. This is needed because of different components - * that hide under MWContextBrowser, when they really should be - * something like MWContextEditor or MWContextNetcaster. - * The callback allows you to decide the details to match by. - * Return TRUE if the context is suitable, FALSE if it is not. - * The varargs will match the paramaters of the find function up to - * the callback exactly. - */ -typedef XP_Bool (*ContextMatch)(MWContext *pCX); - -extern MWContext *XP_GetLastActiveContext(ContextMatch cxFilter); -extern void XP_SetLastActiveContext(MWContext *pCX); -extern void XP_RemoveContextFromLastActiveStack(MWContext *pCX); - -extern void XP_RegisterNavCenter(HT_Pane htPane, MWContext *pDocked); -extern void XP_UnregisterNavCenter(HT_Pane htPane); - -extern void XP_DockNavCenter(HT_Pane htPane, MWContext *pContext); -extern void XP_UndockNavCenter(HT_Pane htPane); -extern XP_Bool XP_IsNavCenterDocked(HT_Pane htPane); -extern MWContext *XP_GetNavCenterContext(HT_Pane htPane); - -extern void XP_SetNavCenterUrl(MWContext *pContext, char *pUrl); -extern void XP_AddNavCenterSitemap(MWContext *pContext, char *pSitemap, char* name); -extern void XP_RemoveNavCenterInfo(MWContext *pContext); - -extern void XP_RegisterViewHTMLPane(HT_View htView, MWContext *pContext); -extern int XP_GetURLForView(HT_View htView, char *pAddress); - - -XP_END_PROTOS - -#endif /* MOZILLA_CLIENT */ - -#endif /* __XP_NavCenter_H */ diff --git a/include/xp_qsort.h b/include/xp_qsort.h deleted file mode 100644 index 958580bc7a87..000000000000 --- a/include/xp_qsort.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - - -/* We need this because Solaris' version of qsort is broken and - * causes array bounds reads. - */ - -#ifndef xp_qsort_h___ -#define xp_qsort_h___ - -/* Had to pull the following define out of xp_core.h - * to avoid including xp_core.h. - * That brought in too many header file dependencies. - */ -#if defined(__cplusplus) -extern "C" { -#endif - -#if (!defined(HAVE_QSORT)&&!defined(XP_WIN)) || defined(BROKEN_QSORT) || defined(XP_MAC) -extern void XP_QSORT(void *, size_t, size_t, - int (*)(const void *, const void *)); -#elif defined(XP_OS2) -#define XP_QSORT(base, nel, width, compar) qsort((base),(nel),(width),(int(_Optlink*)(const void*,const void*))(compar)) -#else -#define XP_QSORT(base, nel, width, compar) qsort((base),(nel),(width),(compar)) -#endif - -#if defined(__cplusplus) -} -#endif - -#endif /* xp_qsort_h___ */ diff --git a/include/xp_rgb.h b/include/xp_rgb.h deleted file mode 100644 index 522a1ce3bd2b..000000000000 --- a/include/xp_rgb.h +++ /dev/null @@ -1,40 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - - -/* - xp_rgb.c --- parsing color names to RGB triplets. - Created: John Giannandrea , 28-Sep-95 -*/ - -#include "xp.h" - -XP_BEGIN_PROTOS - -/* Looks up the passed name via a caseless compare in a static table - of color names. If found it sets the passed pointers to contain - the red, green, and blue values for that color. On success the return - code is 0. Returns 1 if no match is found for the color. - */ -extern intn XP_ColorNameToRGB(char *name, uint8 *r, uint8 *g, uint8 *b); - -XP_END_PROTOS diff --git a/include/xp_thrmo.h b/include/xp_thrmo.h deleted file mode 100644 index 26b0d8abfb29..000000000000 --- a/include/xp_thrmo.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - - -/* xp_thrmo.h --- Status message text for the thermometer. */ - -#ifndef _XP_THRMO_ -#define _XP_THRMO_ - -#include "xp_core.h" - -XP_BEGIN_PROTOS -extern const char * -XP_ProgressText (unsigned long total_bytes, - unsigned long bytes_received, - unsigned long start_time_secs, - unsigned long now_secs); -XP_END_PROTOS - -#endif /* _XP_THRMO_ */ diff --git a/include/xp_time.h b/include/xp_time.h deleted file mode 100644 index ce82a6b1dbd0..000000000000 --- a/include/xp_time.h +++ /dev/null @@ -1,70 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - - -/* - xp_time.c --- parsing dates and timzones and stuff - Created: Jamie Zawinski , 3-Aug-95 -*/ - -#include "xp.h" -#include - -XP_BEGIN_PROTOS - -/* Returns the number of minutes difference between the local time and GMT. - This takes into effect daylight savings time. This is the value that - should show up in outgoing mail headers, etc. - */ -extern int XP_LocalZoneOffset (void); - -/* This parses a time/date string into a time_t - (seconds after "1-Jan-1970 00:00:00 GMT") - If it can't be parsed, 0 is returned. - - Many formats are handled, including: - - 14 Apr 89 03:20:12 - 14 Apr 89 03:20 GMT - Fri, 17 Mar 89 4:01:33 - Fri, 17 Mar 89 4:01 GMT - Mon Jan 16 16:12 PDT 1989 - Mon Jan 16 16:12 +0130 1989 - 6 May 1992 16:41-JST (Wednesday) - 22-AUG-1993 10:59:12.82 - 22-AUG-1993 10:59pm - 22-AUG-1993 12:59am - 22-AUG-1993 12:59 PM - Friday, August 04, 1995 3:54 PM - 06/21/95 04:24:34 PM - 20/06/95 21:07 - 95-06-08 19:32:48 EDT - - If the input string doesn't contain a description of the timezone, - we consult the `default_to_gmt' to decide whether the string should - be interpreted relative to the local time zone (FALSE) or GMT (TRUE). - The correct value for this argument depends on what standard specified - the time string which you are parsing. - */ -extern time_t XP_ParseTimeString (const char *string, XP_Bool default_to_gmt); - -XP_END_PROTOS diff --git a/include/xplocale.h b/include/xplocale.h deleted file mode 100644 index bd443960a1df..000000000000 --- a/include/xplocale.h +++ /dev/null @@ -1,159 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - - -#include -#include - -#include "xp_core.h" -#include "ntypes.h" -#ifndef __XPLOCALE__ -#define __XPLOCALE__ - -XP_BEGIN_PROTOS - - -/**@name Locale Sensitive Operations */ -/*@{*/ - -/** - * Collate strings according to global locale. - * - * Compares two strings in the global locale. - * Returns a number less than 0 if the second string is greater, - * 0 if they are the same, and greater than 0 if the first string is - * greater, according to the sorting rules appropriate for the current - * locale. - * This routine currently does not handle multiple charsets. - * The locale is controlled by the platform through a control panel or - * the LC_TIME environment variable. - * - * @param s1 Specifies string 1, in the global locale's charset - * @param s2 Specifies string 2, in the global locale's charset - * @return 0 if s1 is equal to s2, - * less than 0 if s2 is greater, - * greater than 0 if s1 is greater - */ -PUBLIC int XP_StrColl( - const char *s1, - const char *s2 -); - - -/** - * Constants for XP_StrfTime. - * - *
    - *
  • - * XP_TIME_FORMAT - format the date/time into time format. - *
  • - * XP_TIME_WEEKDAY_TIME_FORMAT - format the date/time into "weekday name plus - * time" format. - *
  • - * XP_DATE_TIME_FORMAT - format the date/time into "date plus time" format. - *
  • - * XP_LONG_DATE_TIME_FORMAT - format the date/time into "long date plus time" - * format. - *
- */ -enum XP_TIME_FORMAT_TYPE { - XP_TIME_FORMAT = 0, - XP_WEEKDAY_TIME_FORMAT = 1, - XP_DATE_TIME_FORMAT = 2, - XP_LONG_DATE_TIME_FORMAT = 3 -}; - -/** - * Format date/time string. - * - * This routine takes a context as argument and figures out what charset the - * context is in. Then it formats the specified time into a string using - * the platform's date/time formatting support. The locale is controlled by - * the platform through a control panel or the LC_TIME environment variable. - * - * @param context Specifies the context to access charset information - * @param result Returns the formatted date/time string - * @param maxsize Specifies the size of the result buffer - * @param format Specifies the desired format - * @param timeptr Specifies the date/time - * @return the size of the formatted date/time string. - * @see INTL_ctime - */ -PUBLIC size_t XP_StrfTime( - MWContext *context, - char *result, - size_t maxsize, - int format, - const struct tm *timeptr -); - -/** - * Locale sensitive version of ANSI C ctime(). - * - * This routine converts the specified date/time into a string using the - * platform's date/time formatting support. The returned string is similar to - * that returned by the ctime function, except that the locale is respected. - * The locale is controlled by the platform through a control panel or the - * LC_TIME environment variable. - * - * @param context Specifies the context to access charset information - * @param date Specifies the date/time - * @return the formatted date/time string in ctime style. - * @see XP_StrfTime - */ -PUBLIC const char *INTL_ctime( - MWContext *context, - time_t *date -); - -/** - * The Front End function that implements XP_StrColl. - * - * Don't call this API. Use XP_StrColl instead. - * - * @see XP_StrColl - */ -MODULE_PRIVATE extern int FE_StrColl( - const char *s1, - const char *s2 -); - -/** - * The Front End function that implements XP_StrfTime. - * - * Don't call this API. Use XP_StrfTime instead. - * - * @see XP_StrfTime - */ -MODULE_PRIVATE extern size_t FE_StrfTime( - MWContext *context, - char *result, - size_t maxsize, - int format, - const struct tm *timeptr -); -/*@}*/ - - -XP_END_PROTOS - -#endif