зеркало из https://github.com/mozilla/pjs.git
added GetChildDiscoveryDepth, GetOnlineSubDirSeparator, SetOnlineSubDirSeparator methods
This commit is contained in:
Родитель
2bda88770a
Коммит
734e38002f
|
@ -916,14 +916,24 @@ NS_IMETHODIMP nsImapUrl::GetImapPartToFetch(char **result)
|
|||
|
||||
}
|
||||
|
||||
char nsImapUrl::GetOnlineSubDirSeparator()
|
||||
NS_IMETHODIMP nsImapUrl::GetOnlineSubDirSeparator(char* separator)
|
||||
{
|
||||
return m_onlineSubDirSeparator;
|
||||
if (separator)
|
||||
{
|
||||
*separator = m_onlineSubDirSeparator;
|
||||
return NS_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
}
|
||||
|
||||
void nsImapUrl::SetOnlineSubDirSeparator(char onlineDirSeparator)
|
||||
NS_IMETHODIMP
|
||||
nsImapUrl::SetOnlineSubDirSeparator(char onlineDirSeparator)
|
||||
{
|
||||
m_onlineSubDirSeparator = onlineDirSeparator;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
@ -935,6 +945,15 @@ NS_IMETHODIMP nsImapUrl::MessageIdsAreUids(PRBool *result)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsImapUrl::GetChildDiscoveryDepth(PRInt32* result)
|
||||
{
|
||||
NS_LOCK_INSTANCE();
|
||||
*result = m_discoveryDepth;
|
||||
NS_UNLOCK_INSTANCE();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsImapUrl::GetMsgFlags(imapMessageFlagsType *result) // kAddMsgFlags or kSubtractMsgFlags only
|
||||
{
|
||||
NS_LOCK_INSTANCE();
|
||||
|
@ -1244,7 +1263,7 @@ NS_IMETHODIMP nsImapUrl::AllocateServerPath(const char * canonicalPath, char onl
|
|||
char *rv = NULL;
|
||||
char delimiterToUse = onlineDelimiter;
|
||||
if (onlineDelimiter == kOnlineHierarchySeparatorUnknown)
|
||||
delimiterToUse = GetOnlineSubDirSeparator();
|
||||
GetOnlineSubDirSeparator(&delimiterToUse);
|
||||
NS_ASSERTION(delimiterToUse != kOnlineHierarchySeparatorUnknown, "hierarchy separator unknown");
|
||||
if (canonicalPath)
|
||||
rv = ReplaceCharsInCopiedString(canonicalPath, '/', delimiterToUse);
|
||||
|
@ -1288,7 +1307,7 @@ NS_IMETHODIMP nsImapUrl::AllocateCanonicalPath(const char *serverPath, char onli
|
|||
|
||||
if (onlineDelimiter == kOnlineHierarchySeparatorUnknown ||
|
||||
onlineDelimiter == 0)
|
||||
delimiterToUse = GetOnlineSubDirSeparator();
|
||||
GetOnlineSubDirSeparator(&delimiterToUse);
|
||||
|
||||
NS_ASSERTION (serverPath, "Oops... null serverPath");
|
||||
|
||||
|
|
|
@ -78,6 +78,9 @@ public:
|
|||
NS_IMETHOD CreateListOfMessageIdsString(nsString2 *result) ;
|
||||
NS_IMETHOD MessageIdsAreUids(PRBool *result);
|
||||
NS_IMETHOD GetMsgFlags(imapMessageFlagsType *result); // kAddMsgFlags or kSubtractMsgFlags only
|
||||
NS_IMETHOD GetChildDiscoveryDepth(PRInt32* result);
|
||||
NS_IMETHOD GetOnlineSubDirSeparator(char* separator);
|
||||
NS_IMETHOD SetOnlineSubDirSeparator(char onlineDirSeparator);
|
||||
|
||||
// for enabling or disabling mime parts on demand. Setting this to TRUE says we
|
||||
// can use mime parts on demand, if we chose.
|
||||
|
@ -149,8 +152,6 @@ protected:
|
|||
// handle the imap specific parsing
|
||||
void ParseImapPart(char *imapPartOfUrl);
|
||||
|
||||
char GetOnlineSubDirSeparator();
|
||||
void SetOnlineSubDirSeparator(char onlineDirSeparator);
|
||||
char * ReplaceCharsInCopiedString(const char *stringToCopy, char oldChar, char newChar);
|
||||
void ParseFolderPath(char **resultingCanonicalPath);
|
||||
void ParseSearchCriteriaString();
|
||||
|
|
Загрузка…
Ссылка в новой задаче