Back to index

lightning-sunbird  0.9+nobinonly
nsRssService.cpp File Reference
#include "nsRssService.h"
#include "nsIRssIncomingServer.h"
#include "nsCOMPtr.h"
#include "nsILocalFile.h"
#include "nsFileSpec.h"
#include "nsIFileSpec.h"
#include "nsAppDirectoryServiceDefs.h"

Go to the source code of this file.


 NS_IMPL_ISUPPORTS2 (nsRssService, nsIRssService, nsIMsgProtocolInfo) NS_IMETHODIMP nsRssService

Function Documentation

Definition at line 53 of file nsRssService.cpp.

    *aDefaultLocalPath = nsnull;
    nsCOMPtr<nsILocalFile> localFile;
    nsCOMPtr<nsIProperties> dirService(do_GetService(";1"));
    if (!dirService) return NS_ERROR_FAILURE;
    dirService->Get(NS_APP_MAIL_50_DIR, NS_GET_IID(nsILocalFile), getter_AddRefs(localFile));
    if (!localFile) return NS_ERROR_FAILURE;

    PRBool exists;
    nsresult rv = localFile->Exists(&exists);
    if (NS_SUCCEEDED(rv) && !exists)
        rv = localFile->Create(nsIFile::DIRECTORY_TYPE, 0775);
    if (NS_FAILED(rv)) return rv;
    // Make the resulting nsIFileSpec
    // TODO: Convert arg to nsILocalFile and avoid this
    nsCOMPtr<nsIFileSpec> outSpec;
    rv = NS_NewFileSpecFromIFile(localFile, getter_AddRefs(outSpec));
    if (NS_FAILED(rv)) return rv;
    NS_IF_ADDREF(*aDefaultLocalPath = outSpec);
    return NS_OK;


Here is the call graph for this function: