move flag and uid state to idl

This commit is contained in:
bienvenu%netscape.com 1999-09-06 18:11:24 +00:00
parent 898f194209
commit d99f4cbfdd
6 changed files with 13 additions and 44 deletions

View File

@ -25,4 +25,3 @@ nsIImapMessageSink.h
nsIImapExtensionSink.h
nsIImapMiscellaneousSink.h
nsIImapService.h
nsIImapFlagAndUidState.h

View File

@ -26,6 +26,7 @@ include $(DEPTH)/config/autoconf.mk
XPIDLSRCS = \
nsIImapServerSink.idl \
nsIImapIncomingServer.idl \
nsIImapFlagAndUidState.idl \
$(NULL)
EXPORTS= \
@ -37,7 +38,6 @@ EXPORTS= \
nsIImapMessageSink.h \
nsIImapExtensionSink.h \
nsIImapMiscellaneousSink.h \
nsIImapFlagAndUidState.h \
nsIImapService.h \
$(NULL)

View File

@ -21,6 +21,7 @@ MODULE= msgimap
XPIDLSRCS = \
.\nsIImapServerSink.idl \
.\nsIImapIncomingServer.idl \
.\nsIImapFlagAndUidState.idl \
$(NULL)
################################################################################
@ -36,7 +37,6 @@ EXPORTS = \
nsIImapExtensionSink.h \
nsIImapMiscellaneousSink.h \
nsIImapService.h \
nsIImapFlagAndUidState.h \
$(NULL)

View File

@ -1,36 +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.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsIImapFlagAndUidState_h___
#define nsIImapFlagAndUidState_h___
// perhaps this should be an interface, but mainly I just want to avoid linking
// it into the test app - it's a really silly little class.
class nsIImapFlagAndUidState
{
public:
NS_IMETHOD GetNumberOfMessages(PRInt32 *result) = 0;
NS_IMETHOD GetUidOfMessage(PRInt32 zeroBasedIndex, PRUint32 *result) = 0;
NS_IMETHOD GetMessageFlags(PRInt32 zeroBasedIndex, imapMessageFlagsType *resul) = 0;
NS_IMETHOD GetNumberOfRecentMessages(PRInt32 *result) = 0;
};
#endif

View File

@ -23,6 +23,8 @@
#include "prcmon.h"
#include "nspr.h"
NS_IMPL_ISUPPORTS(nsImapFlagAndUidState, nsIImapFlagAndUidState::GetIID())
NS_IMETHODIMP nsImapFlagAndUidState::GetNumberOfMessages(PRInt32 *result)
{
if (!result)
@ -47,7 +49,7 @@ NS_IMETHODIMP nsImapFlagAndUidState::GetUidOfMessage(PRInt32 zeroBasedIndex, PRU
NS_IMETHODIMP nsImapFlagAndUidState::GetMessageFlags(PRInt32 zeroBasedIndex, imapMessageFlagsType *result)
NS_IMETHODIMP nsImapFlagAndUidState::GetMessageFlags(PRInt32 zeroBasedIndex, PRUint16 *result)
{
if (!result)
return NS_ERROR_NULL_POINTER;

View File

@ -27,14 +27,18 @@ const PRInt32 kImapFlagAndUidStateSize = 100;
class nsImapFlagAndUidState : public nsIImapFlagAndUidState
{
public:
NS_DECL_ISUPPORTS
nsImapFlagAndUidState(int numberOfMessages, PRUint16 flags = 0);
nsImapFlagAndUidState(const nsImapFlagAndUidState& state, PRUint16 flags = 0);
virtual ~nsImapFlagAndUidState();
NS_IMETHOD GetNumberOfMessages(PRInt32 *result);
NS_IMETHOD GetUidOfMessage(PRInt32 zeroBasedIndex, PRUint32 *result);
NS_IMETHOD GetMessageFlags(PRInt32 zeroBasedIndex, imapMessageFlagsType *result);
NS_IMETHOD GetNumberOfRecentMessages(PRInt32 *result);
NS_DECL_NSIIMAPFLAGANDUIDSTATE
// NS_IMETHOD GetNumberOfMessages(PRInt32 *result);
// NS_IMETHOD GetUidOfMessage(PRInt32 zeroBasedIndex, PRUint32 *result);
// NS_IMETHOD GetMessageFlags(PRInt32 zeroBasedIndex, imapMessageFlagsType *result);
// NS_IMETHOD GetNumberOfRecentMessages(PRInt32 *result);
PRInt32 GetNumberOfDeletedMessages();