本文整理汇总了C++中IMPORT_LOG0函数的典型用法代码示例。如果您正苦于以下问题:C++ IMPORT_LOG0函数的具体用法?C++ IMPORT_LOG0怎么用?C++ IMPORT_LOG0使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IMPORT_LOG0函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: IMPORT_LOG0
/*
This is where the real work happens!
Go through the field map and set the data in a new database row
*/
nsresult nsTextAddress::ProcessLine(const nsAString &aLine, nsString &errors) {
if (!m_fieldMap) {
IMPORT_LOG0("*** Error, text import needs a field map\n");
return NS_ERROR_FAILURE;
}
nsresult rv;
// Wait until we get our first non-empty field, then create a new row,
// fill in the data, then add the row to the database.
nsCOMPtr<nsIMdbRow> newRow;
nsAutoString fieldVal;
int32_t fieldNum;
int32_t numFields = 0;
bool active;
rv = m_fieldMap->GetMapSize(&numFields);
for (int32_t i = 0; (i < numFields) && NS_SUCCEEDED(rv); i++) {
active = false;
rv = m_fieldMap->GetFieldMap(i, &fieldNum);
if (NS_SUCCEEDED(rv)) rv = m_fieldMap->GetFieldActive(i, &active);
if (NS_SUCCEEDED(rv) && active) {
if (GetField(aLine, i, fieldVal, m_delim)) {
if (!fieldVal.IsEmpty()) {
if (!newRow) {
rv = m_database->GetNewRow(getter_AddRefs(newRow));
if (NS_FAILED(rv)) {
IMPORT_LOG0("*** Error getting new address database row\n");
}
}
if (newRow) {
rv = m_fieldMap->SetFieldValue(m_database, newRow, fieldNum,
fieldVal.get());
}
}
} else
break;
} else if (active) {
IMPORT_LOG1("*** Error getting field map for index %ld\n", (long)i);
}
}
if (NS_SUCCEEDED(rv) && newRow) rv = m_database->AddCardRowToDB(newRow);
return rv;
}
开发者ID:mozilla,项目名称:releases-comm-central,代码行数:49,代码来源:nsTextAddress.cpp
示例2: NS_NewLocalFileInputStream
nsresult nsTextAddress::ReadRecordNumber(nsIFile *aSrc, nsAString &aLine,
int32_t rNum) {
nsCOMPtr<nsIInputStream> inputStream;
nsresult rv = NS_NewLocalFileInputStream(getter_AddRefs(inputStream), aSrc);
if (NS_FAILED(rv)) {
IMPORT_LOG0("*** Error opening address file for reading\n");
return rv;
}
int32_t rIndex = 0;
uint64_t bytesLeft = 0;
rv = inputStream->Available(&bytesLeft);
if (NS_FAILED(rv)) {
IMPORT_LOG0("*** Error checking address file for eof\n");
inputStream->Close();
return rv;
}
nsCOMPtr<nsIUnicharLineInputStream> lineStream;
rv = GetUnicharLineStreamForFile(aSrc, inputStream,
getter_AddRefs(lineStream));
if (NS_FAILED(rv)) {
IMPORT_LOG0("*** Error opening converter stream for importer\n");
return rv;
}
bool more = true;
while (more && (rIndex <= rNum)) {
rv = ReadRecord(lineStream, aLine, &more);
if (NS_FAILED(rv)) {
inputStream->Close();
return rv;
}
if (rIndex == rNum) {
inputStream->Close();
return NS_OK;
}
rIndex++;
}
return NS_ERROR_FAILURE;
}
开发者ID:mozilla,项目名称:releases-comm-central,代码行数:45,代码来源:nsTextAddress.cpp
示例3: PR_NewLogModule
nsTextImport::nsTextImport()
{
// Init logging module.
if (!TEXTIMPORTLOGMODULE)
TEXTIMPORTLOGMODULE = PR_NewLogModule("IMPORT");
IMPORT_LOG0( "nsTextImport Module Created\n");
nsTextStringBundle::GetStringBundle();
}
开发者ID:rn10950,项目名称:RetroZilla,代码行数:9,代码来源:nsTextImport.cpp
示例4: NS_CopyUnicodeToNative
bool OutlookSettings::DoIMAPServer(nsIMsgAccountManager *aMgr,
nsIWindowsRegKey *aKey,
const nsString &aServerName,
nsIMsgAccount **aAccount) {
nsAutoString userName;
nsresult rv;
rv = aKey->ReadStringValue(NS_LITERAL_STRING("IMAP User Name"), userName);
if (NS_FAILED(rv)) return false;
bool result = false;
// I now have a user name/server name pair, find out if it already exists?
nsAutoCString nativeUserName;
NS_CopyUnicodeToNative(userName, nativeUserName);
nsAutoCString nativeServerName;
NS_CopyUnicodeToNative(aServerName, nativeServerName);
nsCOMPtr<nsIMsgIncomingServer> in;
rv = aMgr->FindServer(nativeUserName, nativeServerName,
NS_LITERAL_CSTRING("imap"), getter_AddRefs(in));
if (NS_FAILED(rv) || (in == nullptr)) {
// Create the incoming server and an account for it?
rv = aMgr->CreateIncomingServer(nativeUserName, nativeServerName,
NS_LITERAL_CSTRING("imap"),
getter_AddRefs(in));
if (NS_SUCCEEDED(rv) && in) {
rv = in->SetType(NS_LITERAL_CSTRING("imap"));
// TODO SSL, auth method
IMPORT_LOG2("Created IMAP server named: %s, userName: %s\n",
nativeServerName.get(), nativeUserName.get());
nsAutoString prettyName;
if (NS_SUCCEEDED(GetAccountName(aKey, aServerName, prettyName)))
rv = in->SetPrettyName(prettyName);
// We have a server, create an account.
nsCOMPtr<nsIMsgAccount> account;
rv = aMgr->CreateAccount(getter_AddRefs(account));
if (NS_SUCCEEDED(rv) && account) {
rv = account->SetIncomingServer(in);
IMPORT_LOG0(
"Created an account and set the IMAP server as the incoming "
"server\n");
// Fiddle with the identities
SetIdentities(aMgr, account, aKey);
result = true;
if (aAccount) account.forget(aAccount);
}
}
} else
result = true;
return result;
}
开发者ID:mozilla,项目名称:releases-comm-central,代码行数:55,代码来源:nsOutlookSettings.cpp
示例5: IMPORT_LOG0
void WMSettings::SetIdentities(nsIMsgAccountManager *pMgr, nsIMsgAccount *pAcc,
nsIDOMDocument *xmlDoc, nsAutoString &inUserName,
int32_t authMethodIncoming, bool isNNTP)
{
// Get the relevant information for an identity
// BUG 470587. Don't set this: id->SetIdentityName(fullName);
nsresult rv;
nsAutoString value;
nsCOMPtr<nsIMsgIdentity> id;
rv = pMgr->CreateIdentity(getter_AddRefs(id));
if (id) {
IMPORT_LOG0("Created identity and added to the account\n");
if (NS_SUCCEEDED(nsWMUtils::GetValueForTag(xmlDoc,
isNNTP ?
"NNTP_Display_Name" :
"SMTP_Display_Name",
value))) {
id->SetFullName(value);
IMPORT_LOG1("\tname: %S\n", value.get());
}
if (NS_SUCCEEDED(nsWMUtils::GetValueForTag(xmlDoc,
isNNTP ?
"NNTP_Organization_Name" :
"SMTP_Organization_Name",
value))) {
id->SetOrganization(value);
}
if (NS_SUCCEEDED(nsWMUtils::GetValueForTag(xmlDoc,
isNNTP ?
"NNTP_Email_Address" :
"SMTP_Email_Address",
value))) {
id->SetEmail(NS_ConvertUTF16toUTF8(value));
IMPORT_LOG1("\temail: %S\n", value.get());
}
if (NS_SUCCEEDED(nsWMUtils::GetValueForTag(xmlDoc,
isNNTP ?
"NNTP_Reply_To_Email_Address" :
"SMTP_Reply_To_Email_Address",
value))) {
id->SetReplyTo(NS_ConvertUTF16toUTF8(value));
}
// Windows users are used to top style quoting.
id->SetReplyOnTop(isNNTP ? 0 : 1);
pAcc->AddIdentity(id);
}
if (!isNNTP) // NNTP does not use SMTP in OE or TB
SetSmtpServer(xmlDoc, id, inUserName, authMethodIncoming);
}
开发者ID:MoonchildProductions,项目名称:FossaMail,代码行数:55,代码来源:nsWMSettings.cpp
示例6: return
PRBool nsOE5File::ReadIndex( nsIInputStream *pInputStream, PRUint32 **ppIndex, PRUint32 *pSize)
{
*ppIndex = nsnull;
*pSize = 0;
char signature[4];
if (!ReadBytes( pInputStream, signature, 0, 4))
return( PR_FALSE);
for (int i = 0; i < 4; i++) {
if (signature[i] != gSig[i]) {
IMPORT_LOG0( "*** Outlook 5.0 dbx file signature doesn't match\n");
return( PR_FALSE);
}
}
PRUint32 offset = 0x00e4;
PRUint32 indexStart = 0;
if (!ReadBytes( pInputStream, &indexStart, offset, 4)) {
IMPORT_LOG0( "*** Unable to read offset to index start\n");
return( PR_FALSE);
}
PRUint32Array array;
array.count = 0;
array.alloc = kIndexGrowBy;
array.pIndex = new PRUint32[kIndexGrowBy];
PRUint32 next = ReadMsgIndex( pInputStream, indexStart, &array);
while (next) {
next = ReadMsgIndex( pInputStream, next, &array);
}
if (array.count) {
*pSize = array.count;
*ppIndex = array.pIndex;
return( PR_TRUE);
}
delete [] array.pIndex;
return( PR_FALSE);
}
开发者ID:binoc-software,项目名称:mozilla-cvs,代码行数:42,代码来源:nsOE5File.cpp
示例7: GetServerAndUserName
PRBool nsEudoraWin32::BuildIMAPAccount( nsIMsgAccountManager *accMgr, const char *pSection, const char *pIni, nsIMsgAccount **ppAccount)
{
char valBuff[kIniValueSize];
nsCString serverName;
nsCString userName;
GetServerAndUserName( pSection, pIni, serverName, userName, valBuff);
if (serverName.IsEmpty() || userName.IsEmpty())
return( PR_FALSE);
PRBool result = PR_FALSE;
nsCOMPtr<nsIMsgIncomingServer> in;
nsresult rv = accMgr->FindServer( userName, serverName, NS_LITERAL_CSTRING("imap"), getter_AddRefs(in));
if (NS_FAILED( rv) || (in == nsnull))
{
// Create the incoming server and an account for it?
rv = accMgr->CreateIncomingServer( userName, serverName, NS_LITERAL_CSTRING("imap"), getter_AddRefs(in));
if (NS_SUCCEEDED( rv) && in)
{
rv = in->SetType(NS_LITERAL_CSTRING("imap"));
// rv = in->SetHostName( serverName);
// rv = in->SetUsername( userName);
IMPORT_LOG2( "Created IMAP server named: %s, userName: %s\n", serverName.get(), userName.get());
nsString prettyName;
GetAccountName( pSection, prettyName);
IMPORT_LOG1( "\tSet pretty name to: %S\n", prettyName.get());
rv = in->SetPrettyName(prettyName);
// We have a server, create an account.
nsCOMPtr<nsIMsgAccount> account;
rv = accMgr->CreateAccount( getter_AddRefs( account));
if (NS_SUCCEEDED( rv) && account)
{
rv = account->SetIncomingServer(in);
IMPORT_LOG0( "Created an account and set the IMAP server as the incoming server\n");
// Fiddle with the identities
SetIdentities(accMgr, account, pSection, pIni, userName.get(), serverName.get(), valBuff);
result = PR_TRUE;
if (ppAccount)
account->QueryInterface( NS_GET_IID(nsIMsgAccount), (void **)ppAccount);
}
}
}
else
result = PR_TRUE;
return( result);
}
开发者ID:binoc-software,项目名称:mozilla-cvs,代码行数:54,代码来源:nsEudoraWin32.cpp
示例8: NS_ENSURE_ARG_POINTER
NS_IMETHODIMP nsEudoraFilters::Import(char16_t **aError, bool *_retval)
{
NS_ENSURE_ARG_POINTER(aError);
NS_ENSURE_ARG_POINTER(_retval);
nsresult rv;
*_retval = false;
*aError = nullptr;
// Get the settings file if it doesn't exist
if (!m_pLocation)
{
m_pLocation = do_CreateInstance (NS_LOCAL_FILE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
#if defined(XP_WIN)
if (!nsEudoraWin32::FindFiltersFile(getter_AddRefs(m_pLocation)))
m_pLocation = nullptr;
#endif
#ifdef XP_MACOSX
if (!nsEudoraMac::FindFiltersFile(getter_AddRefs(m_pLocation)))
m_pLocation = nullptr;
#endif
}
if (!m_pLocation)
{
IMPORT_LOG0("*** Error, unable to locate filters file for import.\n");
return NS_ERROR_FAILURE;
}
// Now perform actual importing task
*_retval = RealImport();
*aError = ToNewUnicode(m_errorLog);
if (*_retval)
IMPORT_LOG0("Successful import of eudora filters\n");
else
IMPORT_LOG0("*** Error, Unsuccessful import of eudora filters\n");
return NS_OK;
}
开发者ID:MoonchildProductions,项目名称:FossaMail,代码行数:41,代码来源:nsEudoraFilters.cpp
示例9: NS_NewISupportsArray
PRBool nsOEScanBoxes::GetMailboxList( nsIFile * root, nsISupportsArray **pArray)
{
nsresult rv = NS_NewISupportsArray( pArray);
if (NS_FAILED( rv)) {
IMPORT_LOG0( "FAILED to allocate the nsISupportsArray\n");
return( PR_FALSE);
}
BuildMailboxList( nsnull, root, 1, *pArray);
return( PR_TRUE);
}
开发者ID:binoc-software,项目名称:mozilla-cvs,代码行数:12,代码来源:nsOEScanBoxes.cpp
示例10: PR_NewLogModule
nsAppleMailImportModule::nsAppleMailImportModule()
{
// Init logging module.
if (!APPLEMAILLOGMODULE)
APPLEMAILLOGMODULE = PR_NewLogModule("APPLEMAILIMPORTLOG");
IMPORT_LOG0("nsAppleMailImportModule Created");
nsCOMPtr<nsIStringBundleService> bundleService(do_GetService(NS_STRINGBUNDLE_CONTRACTID));
if (bundleService)
bundleService->CreateBundle(APPLEMAIL_MSGS_URL, getter_AddRefs(mBundle));
}
开发者ID:mikeconley,项目名称:comm-central,代码行数:12,代码来源:nsAppleMailImport.cpp
示例11: NS_NewLocalFileInputStream
nsresult nsTextAddress::ReadRecordNumber(nsIFile *aSrc, nsCString &aLine, PRInt32 rNum)
{
nsCOMPtr<nsIInputStream> inputStream;
nsresult rv = NS_NewLocalFileInputStream(getter_AddRefs(inputStream), aSrc);
if (NS_FAILED(rv)) {
IMPORT_LOG0( "*** Error opening address file for reading\n");
return rv;
}
PRInt32 rIndex = 0;
PRUint32 bytesLeft = 0;
rv = inputStream->Available(&bytesLeft);
if (NS_FAILED(rv)) {
IMPORT_LOG0( "*** Error checking address file for eof\n");
inputStream->Close();
return rv;
}
nsCOMPtr<nsILineInputStream> lineStream(do_QueryInterface(inputStream, &rv));
NS_ENSURE_SUCCESS(rv, rv);
bool more = true;
while (more && (rIndex <= rNum)) {
rv = ReadRecord(lineStream, aLine, &more);
if (NS_FAILED(rv)) {
inputStream->Close();
return rv;
}
if (rIndex == rNum) {
inputStream->Close();
return NS_OK;
}
rIndex++;
}
return NS_ERROR_FAILURE;
}
开发者ID:vanto,项目名称:comm-central,代码行数:40,代码来源:nsTextAddress.cpp
示例12: getter_AddRefs
void nsImportGenericAddressBooks::GetDefaultBooks(void)
{
if (!m_pInterface || m_Books)
return;
if (!m_pLocation && !m_autoFind)
return;
nsresult rv = m_pInterface->FindAddressBooks(m_pLocation, getter_AddRefs(m_Books));
if (NS_FAILED(rv)) {
IMPORT_LOG0("*** Error: FindAddressBooks failed\n");
}
}
开发者ID:mxOBS,项目名称:deb-pkg_icedove,代码行数:13,代码来源:nsImportAddressBooks.cpp
示例13: PR_NewLogModule
nsAppleMailImportModule::nsAppleMailImportModule()
{
// Init logging module.
if (!APPLEMAILLOGMODULE)
APPLEMAILLOGMODULE = PR_NewLogModule("APPLEMAILIMPORTLOG");
IMPORT_LOG0("nsAppleMailImportModule Created");
nsCOMPtr<nsIStringBundleService> bundleService =
mozilla::services::GetStringBundleService();
if (bundleService)
bundleService->CreateBundle(APPLEMAIL_MSGS_URL, getter_AddRefs(mBundle));
}
开发者ID:SphereWeb,项目名称:releases-comm-central,代码行数:13,代码来源:nsAppleMailImport.cpp
示例14: IMPORT_LOG0
nsresult
nsWMUtils::GetRootFolder(nsIFile **aRootFolder)
{
nsCOMPtr<nsIWindowsRegKey> key;
if (NS_FAILED(nsWMUtils::FindWMKey(getter_AddRefs(key)))) {
IMPORT_LOG0("*** Error finding Windows Live Mail registry account keys\n");
return NS_ERROR_NOT_AVAILABLE;
}
// This is essential to proceed; it is the location on disk of xml-type account files;
// it is in reg_expand_sz so it will need expanding to absolute path.
nsString storeRoot;
nsresult rv = key->ReadStringValue(NS_LITERAL_STRING("Store Root"), storeRoot);
key->Close(); // Finished with windows registry key. We do not want to return before this closing
if (NS_FAILED(rv) || storeRoot.IsEmpty()) {
IMPORT_LOG0("*** Error finding Windows Live Mail Store Root\n");
return rv;
}
uint32_t size = ::ExpandEnvironmentStringsW((LPCWSTR)storeRoot.get(), nullptr, 0);
nsString expandedStoreRoot;
expandedStoreRoot.SetLength(size - 1);
if (expandedStoreRoot.Length() != size - 1)
return false;
::ExpandEnvironmentStringsW((LPCWSTR)storeRoot.get(),
(LPWSTR)expandedStoreRoot.BeginWriting(),
size);
storeRoot = expandedStoreRoot;
nsCOMPtr<nsIFile> rootFolder(do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv));
NS_ENSURE_SUCCESS(rv, rv);
rv = rootFolder->InitWithPath(storeRoot);
NS_ENSURE_SUCCESS(rv, rv);
rootFolder.forget(aRootFolder);
return NS_OK;
}
开发者ID:Type-of-Tool,项目名称:ExMail,代码行数:38,代码来源:nsWMUtils.cpp
示例15: while
nsresult nsEudoraCompose::ReadHeaders( ReadFileState *pState, SimpleBufferTonyRCopiedOnce& copy, SimpleBufferTonyRCopiedOnce& header)
{
// This should be the headers...
header.m_writeOffset = 0;
nsresult rv;
PRInt32 lineLen;
PRInt32 endLen = -1;
PRInt8 endBuffer = 0;
while ((endLen = IsEndHeaders( copy)) == -1) {
while ((lineLen = FindNextEndLine( copy)) == -1) {
copy.m_writeOffset = copy.m_bytesInBuf;
if (!header.Write( copy.m_pBuffer, copy.m_writeOffset)) {
IMPORT_LOG0( "*** ERROR, writing headers\n");
return( NS_ERROR_FAILURE);
}
if (NS_FAILED( rv = FillMailBuffer( pState, copy))) {
IMPORT_LOG0( "*** Error reading message headers\n");
return( rv);
}
if (!copy.m_bytesInBuf) {
IMPORT_LOG0( "*** Error, end of file while reading headers\n");
return( NS_ERROR_FAILURE);
}
}
copy.m_writeOffset += lineLen;
if ((copy.m_writeOffset + 4) >= copy.m_bytesInBuf) {
if (!header.Write( copy.m_pBuffer, copy.m_writeOffset)) {
IMPORT_LOG0( "*** ERROR, writing headers 2\n");
return( NS_ERROR_FAILURE);
}
if (NS_FAILED( rv = FillMailBuffer( pState, copy))) {
IMPORT_LOG0( "*** Error reading message headers 2\n");
return( rv);
}
}
}
if (!header.Write( copy.m_pBuffer, copy.m_writeOffset)) {
IMPORT_LOG0( "*** Error writing final headers\n");
return( NS_ERROR_FAILURE);
}
if (!header.Write( (const char *)&endBuffer, 1)) {
IMPORT_LOG0( "*** Error writing header trailing null\n");
return( NS_ERROR_FAILURE);
}
copy.m_writeOffset += endLen;
return( NS_OK);
}
开发者ID:binoc-software,项目名称:mozilla-cvs,代码行数:52,代码来源:nsEudoraCompose.cpp
示例16: IMPORT_LOG0
nsresult MailEwsMsgCompose::CreateComponents(void)
{
nsresult rv = NS_OK;
if (!m_pIOService) {
IMPORT_LOG0("Creating nsIOService\n");
m_pIOService = do_GetService(NS_IOSERVICE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
}
NS_IF_RELEASE(m_pMsgFields);
if (NS_SUCCEEDED(rv)) {
rv = CallCreateInstance(kMsgCompFieldsCID, &m_pMsgFields);
if (NS_SUCCEEDED(rv) && m_pMsgFields) {
IMPORT_LOG0("nsOutlookCompose - CreateComponents succeeded\n");
m_pMsgFields->SetForcePlainText(false);
return NS_OK;
}
}
return NS_ERROR_FAILURE;
}
开发者ID:stonewell,项目名称:exchange-ews-thunderbird,代码行数:24,代码来源:MailEwsMsgUtils.cpp
示例17: return
nsresult nsEudoraWin32::FoundAddressBook( nsIFile *file, const PRUnichar *pName, nsISupportsArray *pArray, nsIImportService *impSvc)
{
nsCOMPtr<nsIImportABDescriptor> desc;
nsISupports * pInterface;
nsString name;
nsresult rv;
if (pName)
name = pName;
else {
nsAutoString leaf;
rv = file->GetLeafName(leaf);
if (NS_FAILED( rv))
return( rv);
if (leaf.IsEmpty())
return( NS_ERROR_FAILURE);
nsString tStr;
leaf.Right( tStr, 4);
if (tStr.LowerCaseEqualsLiteral(".txt") || tStr.LowerCaseEqualsLiteral(".nnt"))
{
leaf.Left( tStr, leaf.Length() - 4);
leaf = tStr;
}
}
nsCOMPtr<nsILocalFile> fileLoc = do_QueryInterface(file, &rv);
NS_ENSURE_SUCCESS(rv, rv);
rv = impSvc->CreateNewABDescriptor( getter_AddRefs( desc));
if (NS_SUCCEEDED( rv))
{
PRInt64 sz = 0;
file->GetFileSize( &sz);
desc->SetPreferredName(name);
desc->SetSize((PRUint32) sz);
desc->SetAbFile(fileLoc);
rv = desc->QueryInterface( kISupportsIID, (void **) &pInterface);
pArray->AppendElement( pInterface);
pInterface->Release();
}
if (NS_FAILED( rv))
{
IMPORT_LOG0( "*** Error creating address book descriptor for eudora\n");
return( rv);
}
return( NS_OK);
}
开发者ID:binoc-software,项目名称:mozilla-cvs,代码行数:48,代码来源:nsEudoraWin32.cpp
示例18: NS_NewISupportsArray
nsresult nsComm4xMail::FindMailboxes(nsIFile *pRoot, nsISupportsArray **ppArray)
{
nsresult rv = NS_NewISupportsArray(ppArray);
if (NS_FAILED(rv)) {
IMPORT_LOG0("FAILED to allocate the nsISupportsArray\n");
return rv;
}
nsCOMPtr<nsIImportService> impSvc(do_GetService(NS_IMPORTSERVICE_CONTRACTID, &rv));
if (NS_FAILED(rv))
return rv;
m_depth = 0;
return (ScanMailDir(pRoot, *ppArray, impSvc));
}
开发者ID:binoc-software,项目名称:mozilla-cvs,代码行数:16,代码来源:nsComm4xMail.cpp
示例19: NS_NewISupportsArray
nsresult nsEudoraWin32::FindMailboxes( nsIFile *pRoot, nsISupportsArray **ppArray)
{
nsresult rv = NS_NewISupportsArray( ppArray);
if (NS_FAILED( rv))
{
IMPORT_LOG0( "FAILED to allocate the nsISupportsArray\n");
return( rv);
}
nsCOMPtr<nsIImportService> impSvc(do_GetService(NS_IMPORTSERVICE_CONTRACTID, &rv));
if (NS_FAILED( rv))
return( rv);
m_depth = 0;
m_mailImportLocation = do_QueryInterface(pRoot);
return( ScanMailDir( pRoot, *ppArray, impSvc));
}
开发者ID:binoc-software,项目名称:mozilla-cvs,代码行数:17,代码来源:nsEudoraWin32.cpp
示例20: IMPORT_LOG1
PRBool nsOEScanBoxes::GetMailboxes( nsIFile *pWhere, nsISupportsArray **pArray)
{
nsCString path;
pWhere->GetNativePath(path);
if (!path.IsEmpty()) {
IMPORT_LOG1( "Looking for mail in: %s\n", path.get());
}
else {
pWhere->GetNativeLeafName(path);
if (!path.IsEmpty())
IMPORT_LOG1( "Looking for mail in: %s\n", path.get());
else
IMPORT_LOG0( "Unable to get info about where to look for mail\n");
}
nsCOMPtr <nsIFile> location;
pWhere->Clone(getter_AddRefs(location));
// 1. Look for 5.0 folders.dbx
// 2. Look for 3.x & 4.x folders.nch
// 3. Look for 5.0 *.dbx mailboxes
// 4. Look for 3.x & 4.x *.mbx mailboxes
PRBool result;
location->AppendNative(NS_LITERAL_CSTRING("folders.dbx"));
if (Find50MailBoxes(location)) {
result = GetMailboxList( location, pArray);
}
else {
// 2. Look for 4.x mailboxes
location->AppendNative(NS_LITERAL_CSTRING("folders.nch"));
if (FindMailBoxes(location)) {
result = GetMailboxList( location, pArray);
}
else {
// 3 & 4, look for the specific mailbox files.
pWhere->Clone(getter_AddRefs(location));
ScanMailboxDir( location);
result = GetMailboxList( location, pArray);
}
}
return( result);
}
开发者ID:binoc-software,项目名称:mozilla-cvs,代码行数:45,代码来源:nsOEScanBoxes.cpp
注:本文中的IMPORT_LOG0函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论