Massive spankage to capitalize C++ method and attribute name bindings, per
Architecture Item 6.3 (news://news.mozilla.org/37BA89CF.3823D6F9%40meer.net).
This commit is contained in:
Родитель
04484f0940
Коммит
bbe959f4d1
|
@ -45,7 +45,7 @@ nsJSEditorLog::nsJSEditorLog(nsIEditor *aEditor, nsIFileSpec *aLogFile)
|
|||
nsresult result;
|
||||
|
||||
if (mFileSpec)
|
||||
result = mFileSpec->openStreamForWriting();
|
||||
result = mFileSpec->OpenStreamForWriting();
|
||||
else
|
||||
result = NS_ERROR_NULL_POINTER;
|
||||
|
||||
|
@ -58,7 +58,7 @@ nsJSEditorLog::nsJSEditorLog(nsIEditor *aEditor, nsIFileSpec *aLogFile)
|
|||
nsJSEditorLog::~nsJSEditorLog()
|
||||
{
|
||||
if (mFileSpec)
|
||||
/* nsresult result = */ mFileSpec->closeStream();
|
||||
/* nsresult result = */ mFileSpec->CloseStream();
|
||||
}
|
||||
|
||||
#define DEBUG_JS_EDITOR_LOG_REFCNT 1
|
||||
|
@ -877,14 +877,14 @@ nsJSEditorLog::Write(const char *aBuffer)
|
|||
{
|
||||
PRInt32 retval;
|
||||
|
||||
result = mFileSpec->write(aBuffer, len, &retval);
|
||||
result = mFileSpec->Write(aBuffer, len, &retval);
|
||||
|
||||
if (NS_FAILED(result))
|
||||
return result;
|
||||
|
||||
#ifdef VERY_SLOW
|
||||
|
||||
result = mFileSpec->flush();
|
||||
result = mFileSpec->Flush();
|
||||
|
||||
if (NS_FAILED(result))
|
||||
return result;
|
||||
|
@ -916,7 +916,7 @@ nsJSEditorLog::Flush()
|
|||
nsresult result = NS_OK;
|
||||
|
||||
if (mFileSpec)
|
||||
result = mFileSpec->flush();
|
||||
result = mFileSpec->Flush();
|
||||
else
|
||||
fflush(stdout);
|
||||
|
||||
|
|
|
@ -680,7 +680,7 @@ function EditorGetScriptFileSpec()
|
|||
{
|
||||
var fs = Components.classes["component://netscape/filespec"].createInstance();
|
||||
fs = fs.QueryInterface(Components.interfaces.nsIFileSpec);
|
||||
fs.UnixStyleFilePath = "journal.js";
|
||||
fs.unixStyleFilePath = "journal.js";
|
||||
return fs;
|
||||
}
|
||||
|
||||
|
|
|
@ -822,7 +822,7 @@ XPCConvert::JSErrorToXPCException(JSContext* cx,
|
|||
if(data)
|
||||
{
|
||||
char* formattedMsg;
|
||||
if(NS_FAILED(data->toString(&formattedMsg)))
|
||||
if(NS_FAILED(data->ToString(&formattedMsg)))
|
||||
formattedMsg = nsnull;
|
||||
|
||||
result = ConstructException(NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS,
|
||||
|
|
|
@ -97,11 +97,11 @@ nsXPCException::nsXPCException()
|
|||
|
||||
nsXPCException::~nsXPCException()
|
||||
{
|
||||
reset();
|
||||
Reset();
|
||||
}
|
||||
|
||||
void
|
||||
nsXPCException::reset()
|
||||
nsXPCException::Reset()
|
||||
{
|
||||
if(mMessage)
|
||||
{
|
||||
|
@ -180,12 +180,12 @@ nsXPCException::GetData(nsISupports * *aData)
|
|||
|
||||
/* void initialize (in string aMessage, in nsresult aCode, in string aName, in nsIJSStackFrameLocation aLocation, in nsISupports aData); */
|
||||
NS_IMETHODIMP
|
||||
nsXPCException::initialize(const char *aMessage, nsresult aCode, const char *aName, nsIJSStackFrameLocation *aLocation, nsISupports *aData)
|
||||
nsXPCException::Initialize(const char *aMessage, nsresult aCode, const char *aName, nsIJSStackFrameLocation *aLocation, nsISupports *aData)
|
||||
{
|
||||
if(mInitialized)
|
||||
return NS_ERROR_ALREADY_INITIALIZED;
|
||||
|
||||
reset();
|
||||
Reset();
|
||||
|
||||
if(aMessage)
|
||||
{
|
||||
|
@ -228,7 +228,7 @@ nsXPCException::initialize(const char *aMessage, nsresult aCode, const char *aNa
|
|||
|
||||
/* string toString (); */
|
||||
NS_IMETHODIMP
|
||||
nsXPCException::toString(char **_retval)
|
||||
nsXPCException::ToString(char **_retval)
|
||||
{
|
||||
if(!_retval)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
@ -245,7 +245,7 @@ nsXPCException::toString(char **_retval)
|
|||
if(mLocation)
|
||||
{
|
||||
// we need to free this if it does not fail
|
||||
nsresult rv = mLocation->toString(&indicatedLocation);
|
||||
nsresult rv = mLocation->ToString(&indicatedLocation);
|
||||
if(NS_FAILED(rv))
|
||||
return rv;
|
||||
}
|
||||
|
@ -319,7 +319,7 @@ nsXPCException::NewException(const char *aMessage,
|
|||
location = caller;
|
||||
}
|
||||
// at this point we have non-null location with one extra addref
|
||||
rv = e->initialize(aMessage, aCode, nsnull, location, aData);
|
||||
rv = e->Initialize(aMessage, aCode, nsnull, location, aData);
|
||||
NS_RELEASE(location);
|
||||
if(NS_FAILED(rv))
|
||||
NS_RELEASE(e);
|
||||
|
@ -477,7 +477,7 @@ xpcJSErrorReport::GetError(PRBool *aError)
|
|||
|
||||
/* string toString (); */
|
||||
NS_IMETHODIMP
|
||||
xpcJSErrorReport::toString(char **_retval)
|
||||
xpcJSErrorReport::ToString(char **_retval)
|
||||
{
|
||||
static const char format0[] =
|
||||
"[%s: \"%s\" {file: \"%s\" line: %d column: %d source: \"%s\"}]";
|
||||
|
|
|
@ -55,7 +55,7 @@ nsJSID::~nsJSID()
|
|||
delete [] mName;
|
||||
}
|
||||
|
||||
void nsJSID::reset()
|
||||
void nsJSID::Reset()
|
||||
{
|
||||
mID = GetInvalidIID();
|
||||
|
||||
|
@ -68,7 +68,7 @@ void nsJSID::reset()
|
|||
}
|
||||
|
||||
PRBool
|
||||
nsJSID::setName(const char* name)
|
||||
nsJSID::SetName(const char* name)
|
||||
{
|
||||
NS_ASSERTION(!mName || mName == gNoString ,"name already set");
|
||||
NS_ASSERTION(name,"null name");
|
||||
|
@ -83,8 +83,8 @@ nsJSID::setName(const char* name)
|
|||
NS_IMETHODIMP
|
||||
nsJSID::GetName(char * *aName)
|
||||
{
|
||||
if(!nameIsSet())
|
||||
setNameToNoString();
|
||||
if(!NameIsSet())
|
||||
SetNameToNoString();
|
||||
NS_ASSERTION(mName, "name not set");
|
||||
*aName = (char*) nsAllocator::Clone(mName, strlen(mName)+1);
|
||||
return *aName ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
|
||||
|
@ -118,7 +118,7 @@ nsJSID::GetValid(PRBool *aValid)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsJSID::equals(nsIJSID *other, PRBool *_retval)
|
||||
nsJSID::Equals(nsIJSID *other, PRBool *_retval)
|
||||
{
|
||||
if(!_retval)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
@ -138,7 +138,7 @@ nsJSID::equals(nsIJSID *other, PRBool *_retval)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsJSID::initialize(const char *idString)
|
||||
nsJSID::Initialize(const char *idString)
|
||||
{
|
||||
if(!idString)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
@ -147,7 +147,7 @@ nsJSID::initialize(const char *idString)
|
|||
|
||||
if(strlen(idString) && mID.Equals(GetInvalidIID()))
|
||||
{
|
||||
reset();
|
||||
Reset();
|
||||
|
||||
if(idString[0] == '{')
|
||||
{
|
||||
|
@ -163,17 +163,17 @@ nsJSID::initialize(const char *idString)
|
|||
}
|
||||
|
||||
PRBool
|
||||
nsJSID::initWithName(const nsID& id, const char *nameString)
|
||||
nsJSID::InitWithName(const nsID& id, const char *nameString)
|
||||
{
|
||||
NS_ASSERTION(nameString, "no name");
|
||||
reset();
|
||||
Reset();
|
||||
mID = id;
|
||||
return setName(nameString);
|
||||
}
|
||||
return SetName(nameString);
|
||||
}
|
||||
|
||||
// try to use the name, if no name, then use the number
|
||||
NS_IMETHODIMP
|
||||
nsJSID::toString(char **_retval)
|
||||
nsJSID::ToString(char **_retval)
|
||||
{
|
||||
if(mName != gNoString)
|
||||
{
|
||||
|
@ -215,7 +215,7 @@ nsJSID::NewID(const char* str)
|
|||
if(idObj)
|
||||
{
|
||||
NS_ADDREF(idObj);
|
||||
if(NS_FAILED(idObj->initialize(str)))
|
||||
if(NS_FAILED(idObj->Initialize(str)))
|
||||
NS_RELEASE(idObj);
|
||||
}
|
||||
return idObj;
|
||||
|
@ -230,7 +230,7 @@ nsJSIID::nsJSIID() {NS_INIT_ISUPPORTS();}
|
|||
nsJSIID::~nsJSIID() {}
|
||||
|
||||
NS_IMETHODIMP nsJSIID::GetName(char * *aName)
|
||||
{resolveName(); return mDetails.GetName(aName);}
|
||||
{ResolveName(); return mDetails.GetName(aName);}
|
||||
|
||||
NS_IMETHODIMP nsJSIID::GetNumber(char * *aNumber)
|
||||
{return mDetails.GetNumber(aNumber);}
|
||||
|
@ -241,33 +241,33 @@ NS_IMETHODIMP nsJSIID::GetId(nsID* *aId)
|
|||
NS_IMETHODIMP nsJSIID::GetValid(PRBool *aValid)
|
||||
{return mDetails.GetValid(aValid);}
|
||||
|
||||
NS_IMETHODIMP nsJSIID::equals(nsIJSID *other, PRBool *_retval)
|
||||
{return mDetails.equals(other, _retval);}
|
||||
NS_IMETHODIMP nsJSIID::Equals(nsIJSID *other, PRBool *_retval)
|
||||
{return mDetails.Equals(other, _retval);}
|
||||
|
||||
NS_IMETHODIMP nsJSIID::initialize(const char *idString)
|
||||
{return mDetails.initialize(idString);}
|
||||
NS_IMETHODIMP nsJSIID::Initialize(const char *idString)
|
||||
{return mDetails.Initialize(idString);}
|
||||
|
||||
NS_IMETHODIMP nsJSIID::toString(char **_retval)
|
||||
{resolveName(); return mDetails.toString(_retval);}
|
||||
NS_IMETHODIMP nsJSIID::ToString(char **_retval)
|
||||
{ResolveName(); return mDetails.ToString(_retval);}
|
||||
|
||||
void
|
||||
nsJSIID::resolveName()
|
||||
nsJSIID::ResolveName()
|
||||
{
|
||||
if(!mDetails.nameIsSet())
|
||||
if(!mDetails.NameIsSet())
|
||||
{
|
||||
nsIInterfaceInfoManager* iim;
|
||||
if(nsnull != (iim = nsXPConnect::GetInterfaceInfoManager()))
|
||||
{
|
||||
char* name;
|
||||
if(NS_SUCCEEDED(iim->GetNameForIID(mDetails.getID(), &name)) && name)
|
||||
if(NS_SUCCEEDED(iim->GetNameForIID(mDetails.GetID(), &name)) && name)
|
||||
{
|
||||
mDetails.setName(name);
|
||||
mDetails.SetName(name);
|
||||
nsAllocator::Free(name);
|
||||
}
|
||||
NS_RELEASE(iim);
|
||||
}
|
||||
if(!mDetails.nameIsSet())
|
||||
mDetails.setNameToNoString();
|
||||
if(!mDetails.NameIsSet())
|
||||
mDetails.SetNameToNoString();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -289,7 +289,7 @@ nsJSIID::NewID(const char* str)
|
|||
|
||||
if(str[0] == '{')
|
||||
{
|
||||
if(NS_SUCCEEDED(idObj->initialize(str)))
|
||||
if(NS_SUCCEEDED(idObj->Initialize(str)))
|
||||
success = PR_TRUE;
|
||||
}
|
||||
else
|
||||
|
@ -300,7 +300,7 @@ nsJSIID::NewID(const char* str)
|
|||
nsID* pid;
|
||||
if(NS_SUCCEEDED(iim->GetIIDForName(str, &pid)) && pid)
|
||||
{
|
||||
success = idObj->mDetails.initWithName(*pid, str);
|
||||
success = idObj->mDetails.InitWithName(*pid, str);
|
||||
nsAllocator::Free(pid);
|
||||
}
|
||||
NS_RELEASE(iim);
|
||||
|
@ -710,7 +710,7 @@ nsJSCID::nsJSCID() {NS_INIT_ISUPPORTS();}
|
|||
nsJSCID::~nsJSCID() {}
|
||||
|
||||
NS_IMETHODIMP nsJSCID::GetName(char * *aName)
|
||||
{resolveName(); return mDetails.GetName(aName);}
|
||||
{ResolveName(); return mDetails.GetName(aName);}
|
||||
|
||||
NS_IMETHODIMP nsJSCID::GetNumber(char * *aNumber)
|
||||
{return mDetails.GetNumber(aNumber);}
|
||||
|
@ -721,20 +721,20 @@ NS_IMETHODIMP nsJSCID::GetId(nsID* *aId)
|
|||
NS_IMETHODIMP nsJSCID::GetValid(PRBool *aValid)
|
||||
{return mDetails.GetValid(aValid);}
|
||||
|
||||
NS_IMETHODIMP nsJSCID::equals(nsIJSID *other, PRBool *_retval)
|
||||
{return mDetails.equals(other, _retval);}
|
||||
NS_IMETHODIMP nsJSCID::Equals(nsIJSID *other, PRBool *_retval)
|
||||
{return mDetails.Equals(other, _retval);}
|
||||
|
||||
NS_IMETHODIMP nsJSCID::initialize(const char *idString)
|
||||
{return mDetails.initialize(idString);}
|
||||
NS_IMETHODIMP nsJSCID::Initialize(const char *idString)
|
||||
{return mDetails.Initialize(idString);}
|
||||
|
||||
NS_IMETHODIMP nsJSCID::toString(char **_retval)
|
||||
{resolveName(); return mDetails.toString(_retval);}
|
||||
NS_IMETHODIMP nsJSCID::ToString(char **_retval)
|
||||
{ResolveName(); return mDetails.ToString(_retval);}
|
||||
|
||||
void
|
||||
nsJSCID::resolveName()
|
||||
nsJSCID::ResolveName()
|
||||
{
|
||||
if(!mDetails.nameIsSet())
|
||||
mDetails.setNameToNoString();
|
||||
if(!mDetails.NameIsSet())
|
||||
mDetails.SetNameToNoString();
|
||||
}
|
||||
|
||||
//static
|
||||
|
@ -755,7 +755,7 @@ nsJSCID::NewID(const char* str)
|
|||
|
||||
if(str[0] == '{')
|
||||
{
|
||||
if(NS_SUCCEEDED(idObj->initialize(str)))
|
||||
if(NS_SUCCEEDED(idObj->Initialize(str)))
|
||||
success = PR_TRUE;
|
||||
}
|
||||
else
|
||||
|
@ -763,7 +763,7 @@ nsJSCID::NewID(const char* str)
|
|||
nsCID cid;
|
||||
if(NS_SUCCEEDED(nsComponentManager::ProgIDToCLSID(str, &cid)))
|
||||
{
|
||||
success = idObj->mDetails.initWithName(cid, str);
|
||||
success = idObj->mDetails.InitWithName(cid, str);
|
||||
}
|
||||
}
|
||||
if(!success)
|
||||
|
|
|
@ -735,12 +735,12 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIJSID
|
||||
|
||||
PRBool initWithName(const nsID& id, const char *nameString);
|
||||
PRBool setName(const char* name);
|
||||
void setNameToNoString()
|
||||
PRBool InitWithName(const nsID& id, const char *nameString);
|
||||
PRBool SetName(const char* name);
|
||||
void SetNameToNoString()
|
||||
{NS_ASSERTION(!mName, "name already set"); mName = gNoString;}
|
||||
PRBool nameIsSet() const {return nsnull != mName;}
|
||||
const nsID* getID() const {return &mID;}
|
||||
PRBool NameIsSet() const {return nsnull != mName;}
|
||||
const nsID* GetID() const {return &mID;}
|
||||
|
||||
static nsJSID* NewID(const char* str);
|
||||
|
||||
|
@ -748,7 +748,7 @@ public:
|
|||
virtual ~nsJSID();
|
||||
protected:
|
||||
|
||||
void reset();
|
||||
void Reset();
|
||||
const nsID& GetInvalidIID() const;
|
||||
|
||||
protected:
|
||||
|
@ -764,6 +764,7 @@ class nsJSIID : public nsIJSIID
|
|||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
// we manually delagate these to nsJSID
|
||||
NS_DECL_NSIJSID
|
||||
|
||||
|
@ -776,7 +777,7 @@ public:
|
|||
virtual ~nsJSIID();
|
||||
|
||||
private:
|
||||
void resolveName();
|
||||
void ResolveName();
|
||||
|
||||
private:
|
||||
nsJSID mDetails;
|
||||
|
@ -788,6 +789,7 @@ class nsJSCID : public nsIJSCID
|
|||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
// we manually delagate these to nsJSID
|
||||
NS_DECL_NSIJSID
|
||||
|
||||
|
@ -800,7 +802,7 @@ public:
|
|||
virtual ~nsJSCID();
|
||||
|
||||
private:
|
||||
void resolveName();
|
||||
void ResolveName();
|
||||
|
||||
private:
|
||||
nsJSID mDetails;
|
||||
|
@ -943,7 +945,7 @@ public:
|
|||
virtual ~nsXPCException();
|
||||
|
||||
protected:
|
||||
void reset();
|
||||
void Reset();
|
||||
private:
|
||||
char* mMessage;
|
||||
nsresult mCode;
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
NS_IMETHOD GetCaller(nsIJSStackFrameLocation * *aCaller);
|
||||
|
||||
/* string toString (); */
|
||||
NS_IMETHOD toString(char **_retval);
|
||||
NS_IMETHOD ToString(char **_retval);
|
||||
|
||||
static XPCJSStackFrame* CreateStack(JSContext* cx, XPCJSStack* stack,
|
||||
JSStackFrame* fp);
|
||||
|
@ -350,7 +350,7 @@ NS_IMETHODIMP XPCJSStackFrame::GetCaller(nsIJSStackFrameLocation * *aCaller)
|
|||
}
|
||||
|
||||
/* string toString (); */
|
||||
NS_IMETHODIMP XPCJSStackFrame::toString(char **_retval)
|
||||
NS_IMETHODIMP XPCJSStackFrame::ToString(char **_retval)
|
||||
{
|
||||
if(!_retval)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
|
|
@ -53,9 +53,9 @@ xpctestOther::xpctestOther()
|
|||
NS_ADDREF_THIS();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP xpctestOther::method3(PRInt16 i, PRInt16 j, PRInt16 k)
|
||||
NS_IMETHODIMP xpctestOther::Method3(PRInt16 i, PRInt16 j, PRInt16 k)
|
||||
{
|
||||
printf("method3 called on inherited other\n");
|
||||
printf("Method3 called on inherited other\n");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -65,22 +65,22 @@ xpctestChild::xpctestChild()
|
|||
{
|
||||
}
|
||||
|
||||
NS_IMETHODIMP xpctestChild::method1(PRInt16 i)
|
||||
NS_IMETHODIMP xpctestChild::Method1(PRInt16 i)
|
||||
{
|
||||
printf("method1 called on child\n");
|
||||
printf("Method1 called on child\n");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP xpctestChild::method1a(nsIXPCTestParent *foo)
|
||||
NS_IMETHODIMP xpctestChild::Method1a(nsIXPCTestParent *foo)
|
||||
{
|
||||
printf("method1a called on child\n");
|
||||
printf("Method1a called on child\n");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP xpctestChild::method2(PRInt16 i, PRInt16 j)
|
||||
NS_IMETHODIMP xpctestChild::Method2(PRInt16 i, PRInt16 j)
|
||||
{
|
||||
printf("method2 called on child\n");
|
||||
printf("Method2 called on child\n");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -104,14 +104,14 @@ public:
|
|||
xpctestChild();
|
||||
};
|
||||
|
||||
NS_IMETHODIMP xpctestParent::method1(PRInt16 i)
|
||||
NS_IMETHODIMP xpctestParent::Method1(PRInt16 i)
|
||||
{
|
||||
printf("method1 called on parent via child\n");
|
||||
printf("Method1 called on parent via child\n");
|
||||
return NS_OK;
|
||||
}
|
||||
NS_IMETHODIMP xpctestParent::method1a(nsIXPCTestParent *foo)
|
||||
NS_IMETHODIMP xpctestParent::Method1a(nsIXPCTestParent *foo)
|
||||
{
|
||||
printf("method1a called on parent via child\n");
|
||||
printf("Method1a called on parent via child\n");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -158,21 +158,21 @@ xpctestChild::xpctestChild()
|
|||
NS_ADDREF_THIS();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP xpctestChild::method1(PRInt16 i)
|
||||
NS_IMETHODIMP xpctestChild::Method1(PRInt16 i)
|
||||
{
|
||||
printf("method1 called on child\n");
|
||||
printf("Method1 called on child\n");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP xpctestChild::method1a(nsIXPCTestParent *foo)
|
||||
NS_IMETHODIMP xpctestChild::Method1a(nsIXPCTestParent *foo)
|
||||
{
|
||||
printf("method1a called on child\n");
|
||||
printf("Method1a called on child\n");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP xpctestChild::method2(PRInt16 i, PRInt16 j)
|
||||
NS_IMETHODIMP xpctestChild::Method2(PRInt16 i, PRInt16 j)
|
||||
{
|
||||
printf("method2 called on child\n");
|
||||
printf("Method2 called on child\n");
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -95,9 +95,9 @@ xpctestNoisy::~xpctestNoisy()
|
|||
printf("Noisy %d - Destroyed, %d total\n", mID, sCount);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP xpctestNoisy::squawk()
|
||||
NS_IMETHODIMP xpctestNoisy::Squawk()
|
||||
{
|
||||
printf("Noisy %d - squawk called\n", mID);
|
||||
printf("Noisy %d - Squawk called\n", mID);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -57,10 +57,10 @@ public:
|
|||
NS_IMETHOD SetDefaultIdentity(nsIMsgIdentity * aDefaultIdentity);
|
||||
|
||||
/* void addIdentity (in nsIMsgIdentity identity); */
|
||||
NS_IMETHOD addIdentity(nsIMsgIdentity *identity);
|
||||
NS_IMETHOD AddIdentity(nsIMsgIdentity *identity);
|
||||
|
||||
/* void removeIdentity (in nsIMsgIdentity identity); */
|
||||
NS_IMETHOD removeIdentity(nsIMsgIdentity *identity);
|
||||
NS_IMETHOD RemoveIdentity(nsIMsgIdentity *identity);
|
||||
|
||||
// nsIShutdownListener
|
||||
|
||||
|
@ -269,7 +269,7 @@ nsMsgAccount::SetDefaultIdentity(nsIMsgIdentity * aDefaultIdentity)
|
|||
|
||||
/* void addIdentity (in nsIMsgIdentity identity); */
|
||||
NS_IMETHODIMP
|
||||
nsMsgAccount::addIdentity(nsIMsgIdentity *identity)
|
||||
nsMsgAccount::AddIdentity(nsIMsgIdentity *identity)
|
||||
{
|
||||
// hack hack - need to add this to the list of identities.
|
||||
// for now just tread this as a Setxxx accessor
|
||||
|
@ -283,7 +283,7 @@ nsMsgAccount::addIdentity(nsIMsgIdentity *identity)
|
|||
|
||||
/* void removeIdentity (in nsIMsgIdentity identity); */
|
||||
NS_IMETHODIMP
|
||||
nsMsgAccount::removeIdentity(nsIMsgIdentity *identity)
|
||||
nsMsgAccount::RemoveIdentity(nsIMsgIdentity *identity)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
@ -338,7 +338,7 @@ nsMsgAccount::SetKey(char *accountKey)
|
|||
|
||||
PR_FREEIF(identityKey);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
rv = addIdentity(identity);
|
||||
rv = AddIdentity(identity);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ private:
|
|||
// add all identities in the account
|
||||
static PRBool addAccountsToArray(nsHashKey *aKey, void *aData,
|
||||
void* closure);
|
||||
static PRBool addIdentitiesToArray(nsHashKey *aKey, void *aData,
|
||||
static PRBool AddIdentitiesToArray(nsHashKey *aKey, void *aData,
|
||||
void *closure);
|
||||
|
||||
static PRBool hashTableGetAccountList(nsHashKey *aKey, void *aData,
|
||||
|
@ -287,7 +287,7 @@ nsMsgAccountManager::CreateAccountWithKey(nsIMsgIncomingServer *server,
|
|||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = account->SetIncomingServer(server);
|
||||
rv = account->addIdentity(identity);
|
||||
rv = account->AddIdentity(identity);
|
||||
}
|
||||
|
||||
account->SetKey(NS_CONST_CAST(char*, accountKey));
|
||||
|
@ -639,7 +639,7 @@ nsMsgAccountManager::GetAccounts(nsISupportsArray **_retval)
|
|||
|
||||
/* string getAccountKey (in nsIMsgAccount account); */
|
||||
NS_IMETHODIMP
|
||||
nsMsgAccountManager::getAccountKey(nsIMsgAccount *account, char **_retval)
|
||||
nsMsgAccountManager::GetAccountKey(nsIMsgAccount *account, char **_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
@ -656,7 +656,7 @@ nsMsgAccountManager::addAccountsToArray(nsHashKey *key, void *aData, void *closu
|
|||
}
|
||||
|
||||
PRBool
|
||||
nsMsgAccountManager::addIdentitiesToArray(nsHashKey *key, void *aData, void *closure)
|
||||
nsMsgAccountManager::AddIdentitiesToArray(nsHashKey *key, void *aData, void *closure)
|
||||
{
|
||||
nsISupportsArray *array = (nsISupportsArray*)closure;
|
||||
nsIMsgAccount* account = (nsIMsgAccount *)aData;
|
||||
|
@ -697,7 +697,7 @@ nsMsgAccountManager::GetAllIdentities(nsISupportsArray **_retval)
|
|||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
// convert hash table->nsISupportsArray of identities
|
||||
m_accounts->Enumerate(addIdentitiesToArray, (void *)identities);
|
||||
m_accounts->Enumerate(AddIdentitiesToArray, (void *)identities);
|
||||
|
||||
// convert nsISupportsArray->nsISupportsArray
|
||||
// when do we free the nsISupportsArray?
|
||||
|
@ -885,11 +885,11 @@ nsMsgAccountManager::createSpecialFile(nsFileSpec & dir, const char *specialFile
|
|||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
PRBool specialFileExists;
|
||||
rv = specialFile->exists(&specialFileExists);
|
||||
rv = specialFile->Exists(&specialFileExists);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
if (!specialFileExists) {
|
||||
rv = specialFile->touch();
|
||||
rv = specialFile->Touch();
|
||||
}
|
||||
|
||||
return rv;
|
||||
|
@ -1055,7 +1055,7 @@ nsMsgAccountManager::MigratePopAccounts(nsIMsgIdentity *identity)
|
|||
server->SetKey("server1");
|
||||
|
||||
account->SetIncomingServer(server);
|
||||
account->addIdentity(identity);
|
||||
account->AddIdentity(identity);
|
||||
|
||||
// adds account to the hash table.
|
||||
AddAccount(account);
|
||||
|
@ -1133,11 +1133,11 @@ nsMsgAccountManager::MigratePopAccounts(nsIMsgIdentity *identity)
|
|||
rv = NS_NewFileSpecWithSpec(dir, getter_AddRefs(mailDir));
|
||||
if (NS_FAILED(rv)) return 0;
|
||||
|
||||
rv = mailDir->exists(&dirExists);
|
||||
rv = mailDir->Exists(&dirExists);
|
||||
if (NS_FAILED(rv)) return 0;
|
||||
|
||||
if (!dirExists) {
|
||||
mailDir->createDir();
|
||||
mailDir->CreateDir();
|
||||
}
|
||||
|
||||
char *str = nsnull;
|
||||
|
@ -1149,11 +1149,11 @@ nsMsgAccountManager::MigratePopAccounts(nsIMsgIdentity *identity)
|
|||
str = nsnull;
|
||||
}
|
||||
|
||||
rv = mailDir->exists(&dirExists);
|
||||
rv = mailDir->Exists(&dirExists);
|
||||
if (NS_FAILED(rv)) return 0;
|
||||
|
||||
if (!dirExists) {
|
||||
mailDir->createDir();
|
||||
mailDir->CreateDir();
|
||||
}
|
||||
|
||||
// create the files for the special folders.
|
||||
|
@ -1320,7 +1320,7 @@ nsMsgAccountManager::MigrateImapAccount(nsIMsgIdentity *identity, const char *ho
|
|||
rv = CopyIdentity(identity,copied_identity);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
account->addIdentity(copied_identity);
|
||||
account->AddIdentity(copied_identity);
|
||||
|
||||
// adds account to the hash table.
|
||||
AddAccount(account);
|
||||
|
@ -1407,11 +1407,11 @@ nsMsgAccountManager::MigrateImapAccount(nsIMsgIdentity *identity, const char *ho
|
|||
str = nsnull;
|
||||
}
|
||||
|
||||
rv = imapMailDir->exists(&dirExists);
|
||||
rv = imapMailDir->Exists(&dirExists);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
if (!dirExists) {
|
||||
imapMailDir->createDir();
|
||||
imapMailDir->CreateDir();
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -1674,7 +1674,7 @@ nsMsgAccountManager::MigrateNewsAccount(nsIMsgIdentity *identity, const char *ho
|
|||
rv = CopyIdentity(identity,copied_identity);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
account->addIdentity(copied_identity);
|
||||
account->AddIdentity(copied_identity);
|
||||
|
||||
// adds account to the hash table.
|
||||
AddAccount(account);
|
||||
|
@ -1758,11 +1758,11 @@ nsMsgAccountManager::MigrateNewsAccount(nsIMsgIdentity *identity, const char *ho
|
|||
str = nsnull;
|
||||
}
|
||||
|
||||
rv = newsDir->exists(&dirExists);
|
||||
rv = newsDir->Exists(&dirExists);
|
||||
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
|
||||
|
||||
if (!dirExists) {
|
||||
newsDir->createDir();
|
||||
newsDir->CreateDir();
|
||||
}
|
||||
|
||||
nntpServer->SetNewsrcFilePath((char *)newsrcfile);
|
||||
|
|
|
@ -948,6 +948,7 @@ nsMsgComposeAndSend::GatherMimeAttachments()
|
|||
if (status < 0)
|
||||
goto FAIL;
|
||||
|
||||
|
||||
//
|
||||
// Ok, I think I can do the magic here and make MHTML messages with
|
||||
// attachments work. This is where we set up the subsequent parts, but
|
||||
|
@ -2997,7 +2998,7 @@ nsMsgComposeAndSend::SendMessageFile(
|
|||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
PRBool valid;
|
||||
if (NS_FAILED(sendIFileSpec->isValid(&valid)))
|
||||
if (NS_FAILED(sendIFileSpec->IsValid(&valid)))
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
if (!valid)
|
||||
|
@ -3540,7 +3541,7 @@ FAIL:
|
|||
{
|
||||
tempOutfile.close();
|
||||
if (mCopyFileSpec)
|
||||
mCopyFileSpec->closeStream();
|
||||
mCopyFileSpec->CloseStream();
|
||||
}
|
||||
|
||||
if (inputFile.is_open())
|
||||
|
|
|
@ -447,7 +447,7 @@ nsCOMPtr<nsIMsgCompFields> compFields = nsnull;
|
|||
nsCOMPtr<nsIMsgSend> pMsgSend = nsnull;
|
||||
|
||||
// If for some reason the tmp file didn't get created, we've failed here
|
||||
mTempIFileSpec->exists(&created);
|
||||
mTempIFileSpec->Exists(&created);
|
||||
if (!created)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
|
|
|
@ -1779,9 +1779,9 @@ NS_IMETHODIMP nsImapMailFolder::BeginCopy(nsIMessage *message)
|
|||
if (m_copyState->m_tmpFileSpec) // leftover file spec nuke it
|
||||
{
|
||||
PRBool isOpen = PR_FALSE;
|
||||
rv = m_copyState->m_tmpFileSpec->isStreamOpen(&isOpen);
|
||||
rv = m_copyState->m_tmpFileSpec->IsStreamOpen(&isOpen);
|
||||
if (isOpen)
|
||||
m_copyState->m_tmpFileSpec->closeStream();
|
||||
m_copyState->m_tmpFileSpec->CloseStream();
|
||||
nsFileSpec fileSpec;
|
||||
m_copyState->m_tmpFileSpec->GetFileSpec(&fileSpec);
|
||||
if (fileSpec.Valid())
|
||||
|
@ -1795,7 +1795,7 @@ NS_IMETHODIMP nsImapMailFolder::BeginCopy(nsIMessage *message)
|
|||
rv = NS_NewFileSpecWithSpec(tmpFileSpec,
|
||||
getter_AddRefs(m_copyState->m_tmpFileSpec));
|
||||
if (NS_SUCCEEDED(rv) && m_copyState->m_tmpFileSpec)
|
||||
rv = m_copyState->m_tmpFileSpec->openStreamForWriting();
|
||||
rv = m_copyState->m_tmpFileSpec->OpenStreamForWriting();
|
||||
if (!m_copyState->m_dataBuffer)
|
||||
{
|
||||
m_copyState->m_dataBuffer = (char*) PR_CALLOC(FOUR_K+1);
|
||||
|
@ -1836,7 +1836,7 @@ NS_IMETHODIMP nsImapMailFolder::CopyData(nsIInputStream *aIStream,
|
|||
if (PL_strncasecmp(start, "X-Mozilla-Status:", 17) &&
|
||||
PL_strncasecmp(start, "X-Mozilla-Status2:", 18) &&
|
||||
PL_strncmp(start, "From - ", 7))
|
||||
rv = m_copyState->m_tmpFileSpec->write(start,
|
||||
rv = m_copyState->m_tmpFileSpec->Write(start,
|
||||
end-start+2,
|
||||
&writeCount);
|
||||
start = end+2;
|
||||
|
@ -1856,8 +1856,8 @@ NS_IMETHODIMP nsImapMailFolder::EndCopy(PRBool copySucceeded)
|
|||
if (copySucceeded && m_copyState && m_copyState->m_tmpFileSpec)
|
||||
{
|
||||
nsCOMPtr<nsIUrlListener> urlListener;
|
||||
m_copyState->m_tmpFileSpec->flush();
|
||||
m_copyState->m_tmpFileSpec->closeStream();
|
||||
m_copyState->m_tmpFileSpec->Flush();
|
||||
m_copyState->m_tmpFileSpec->CloseStream();
|
||||
NS_WITH_SERVICE(nsIImapService, imapService, kCImapService, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
rv = QueryInterface(nsIUrlListener::GetIID(),
|
||||
|
@ -3598,7 +3598,7 @@ nsImapMailCopyState::~nsImapMailCopyState()
|
|||
PRBool isOpen = PR_FALSE;
|
||||
nsFileSpec fileSpec;
|
||||
if (isOpen)
|
||||
m_tmpFileSpec->closeStream();
|
||||
m_tmpFileSpec->CloseStream();
|
||||
m_tmpFileSpec->GetFileSpec(&fileSpec);
|
||||
if (fileSpec.Valid())
|
||||
fileSpec.Delete(PR_FALSE);
|
||||
|
|
|
@ -4238,7 +4238,7 @@ void nsImapProtocol::UploadMessageFromFile (nsIFileSpec* fileSpec,
|
|||
if (!dataBuffer) goto done;
|
||||
rv = fileSpec->GetFileSize(&fileSize);
|
||||
if (NS_FAILED(rv)) goto done;
|
||||
rv = fileSpec->openStreamForReading();
|
||||
rv = fileSpec->OpenStreamForReading();
|
||||
if (NS_FAILED(rv)) goto done;
|
||||
command.Append((PRInt32)fileSize);
|
||||
if (hasLiteralPlus)
|
||||
|
@ -4256,13 +4256,13 @@ void nsImapProtocol::UploadMessageFromFile (nsIFileSpec* fileSpec,
|
|||
readCount = 0;
|
||||
while(NS_SUCCEEDED(rv) && !eof && totalSize > 0)
|
||||
{
|
||||
rv = fileSpec->read(&dataBuffer, FOUR_K, &readCount);
|
||||
rv = fileSpec->Read(&dataBuffer, FOUR_K, &readCount);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
dataBuffer[readCount] = 0;
|
||||
rv = SendData(dataBuffer);
|
||||
totalSize -= readCount;
|
||||
rv = fileSpec->eof(&eof);
|
||||
rv = fileSpec->Eof(&eof);
|
||||
}
|
||||
}
|
||||
if (NS_SUCCEEDED(rv))
|
||||
|
@ -4336,9 +4336,9 @@ void nsImapProtocol::UploadMessageFromFile (nsIFileSpec* fileSpec,
|
|||
}
|
||||
done:
|
||||
PR_FREEIF(dataBuffer);
|
||||
rv = fileSpec->isStreamOpen(&isOpen);
|
||||
rv = fileSpec->IsStreamOpen(&isOpen);
|
||||
if (NS_SUCCEEDED(rv) && isOpen)
|
||||
fileSpec->closeStream();
|
||||
fileSpec->CloseStream();
|
||||
delete [] escapedName;
|
||||
}
|
||||
|
||||
|
|
|
@ -183,7 +183,7 @@ PRInt32 nsMailboxProtocol::DoneReadingMessage()
|
|||
nsresult rv = NS_OK;
|
||||
// and close the article file if it was open....
|
||||
if (m_tempMessageFile)
|
||||
rv = m_tempMessageFile->closeStream();
|
||||
rv = m_tempMessageFile->CloseStream();
|
||||
|
||||
// disply hack: run a file url on the temp file
|
||||
if (m_mailboxAction == nsIMailboxUrl::ActionDisplayMessage && m_displayConsumer)
|
||||
|
@ -264,7 +264,7 @@ nsresult nsMailboxProtocol::LoadUrl(nsIURI * aURL, nsISupports * aConsumer)
|
|||
// we don't have pluggable converters yet. We want to let mkfile do the work of
|
||||
// converting the message from RFC-822 to HTML before displaying it...
|
||||
ClearFlag(MAILBOX_MSG_PARSE_FIRST_LINE);
|
||||
m_tempMessageFile->openStreamForWriting();
|
||||
m_tempMessageFile->OpenStreamForWriting();
|
||||
m_nextState = MAILBOX_READ_MESSAGE;
|
||||
break;
|
||||
|
||||
|
@ -367,8 +367,8 @@ PRInt32 nsMailboxProtocol::ReadMessageResponse(nsIInputStream * inputStream, PRU
|
|||
{
|
||||
PRInt32 count = 0;
|
||||
if (line)
|
||||
m_tempMessageFile->write(line, PL_strlen(line), &count);
|
||||
m_tempMessageFile->write(MSG_LINEBREAK, MSG_LINEBREAK_LEN, &count);
|
||||
m_tempMessageFile->Write(line, PL_strlen(line), &count);
|
||||
m_tempMessageFile->Write(MSG_LINEBREAK, MSG_LINEBREAK_LEN, &count);
|
||||
}
|
||||
else
|
||||
SetFlag(MAILBOX_MSG_PARSE_FIRST_LINE);
|
||||
|
|
|
@ -79,7 +79,7 @@ nsNNTPNewsgroupPost::~nsNNTPNewsgroupPost()
|
|||
}
|
||||
|
||||
nsresult
|
||||
nsNNTPNewsgroupPost::isValid(PRBool *_retval)
|
||||
nsNNTPNewsgroupPost::IsValid(PRBool *_retval)
|
||||
{
|
||||
if (!_retval) return NS_OK;
|
||||
|
||||
|
@ -97,7 +97,7 @@ nsNNTPNewsgroupPost::isValid(PRBool *_retval)
|
|||
}
|
||||
|
||||
*_retval=valid;
|
||||
printf("nsNNTPNewsgroupPost::isValid() -> %s (%d is first invalid)\n",
|
||||
printf("nsNNTPNewsgroupPost::IsValid() -> %s (%d is first invalid)\n",
|
||||
*_retval ? "TRUE": "FALSE", i);
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ nsNNTPNewsgroupPost::GetFullMessage(char **message)
|
|||
{
|
||||
if (!message) return NS_ERROR_NULL_POINTER;
|
||||
PRBool valid=PR_FALSE;
|
||||
isValid(&valid);
|
||||
IsValid(&valid);
|
||||
if (!valid) return NS_ERROR_NOT_INITIALIZED;
|
||||
|
||||
int len=0;
|
||||
|
@ -162,7 +162,7 @@ nsNNTPNewsgroupPost::GetFullMessage(char **message)
|
|||
}
|
||||
|
||||
char *
|
||||
nsNNTPNewsgroupPost::appendAndAlloc(char *string,
|
||||
nsNNTPNewsgroupPost::AppendAndAlloc(char *string,
|
||||
const char *newSubstring,
|
||||
PRBool withComma)
|
||||
{
|
||||
|
@ -189,13 +189,13 @@ nsNNTPNewsgroupPost::appendAndAlloc(char *string,
|
|||
nsresult
|
||||
nsNNTPNewsgroupPost::AddNewsgroup(const char *newsgroup)
|
||||
{
|
||||
m_header[HEADER_NEWSGROUPS]=appendAndAlloc(m_header[HEADER_NEWSGROUPS], newsgroup, PR_TRUE);
|
||||
m_header[HEADER_NEWSGROUPS]=AppendAndAlloc(m_header[HEADER_NEWSGROUPS], newsgroup, PR_TRUE);
|
||||
return NS_OK;
|
||||
}
|
||||
nsresult
|
||||
nsNNTPNewsgroupPost::AddReference(const char *reference)
|
||||
{
|
||||
m_header[HEADER_REFERENCES]=appendAndAlloc(m_header[HEADER_REFERENCES], reference, PR_FALSE);
|
||||
m_header[HEADER_REFERENCES]=AppendAndAlloc(m_header[HEADER_REFERENCES], reference, PR_FALSE);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ public:
|
|||
NS_IMPL_CLASS_GETTER_STR(GetReferences, m_header[HEADER_REFERENCES]);
|
||||
|
||||
|
||||
NS_IMETHOD isValid(PRBool *_retval);
|
||||
NS_IMETHOD IsValid(PRBool *_retval);
|
||||
|
||||
NS_IMETHOD MakeControlCancel(const char *messageID);
|
||||
|
||||
|
@ -103,7 +103,7 @@ public:
|
|||
NS_IMETHOD GetPostMessageFile(nsFilePath ** aFileName);
|
||||
|
||||
// helper routines
|
||||
static char *appendAndAlloc(char *string, const char *newSubstring,
|
||||
static char *AppendAndAlloc(char *string, const char *newSubstring,
|
||||
PRBool withComma);
|
||||
private:
|
||||
nsFilePath m_fileName;
|
||||
|
|
|
@ -317,7 +317,7 @@ NS_IMETHODIMP nsPref::ReadUserPrefsFrom(nsIFileSpec* inFile)
|
|||
nsresult rv = NS_OK;
|
||||
JS_BeginRequest(gMochaContext);
|
||||
PRBool exists;
|
||||
if (!(NS_SUCCEEDED(mFileSpec->exists(&exists)) && exists)
|
||||
if (!(NS_SUCCEEDED(mFileSpec->Exists(&exists)) && exists)
|
||||
|| pref_OpenFileSpec(mFileSpec, PR_TRUE, PR_FALSE, PR_FALSE, PR_TRUE)
|
||||
!= PREF_NOERROR)
|
||||
rv = NS_ERROR_FAILURE;
|
||||
|
@ -762,8 +762,8 @@ NS_IMETHODIMP nsPref::SetFilePref(const char *pref_name,
|
|||
NS_ASSERTION(NS_SUCCEEDED(rv), "ERROR: Could not make a file spec.");
|
||||
if (!tmp)
|
||||
return NS_ERROR_FAILURE;
|
||||
tmp->fromFileSpec(value);
|
||||
tmp->createDir();
|
||||
tmp->FromFileSpec(value);
|
||||
tmp->CreateDir();
|
||||
NS_RELEASE(tmp);
|
||||
}
|
||||
char* encodedString = nsnull;
|
||||
|
@ -1159,7 +1159,7 @@ PR_IMPLEMENT(PrefResult) PREF_SavePrefFileSpecWith(
|
|||
}
|
||||
}
|
||||
PR_Free(valueArray);
|
||||
fileSpec->closeStream();
|
||||
fileSpec->CloseStream();
|
||||
return PREF_NOERROR;
|
||||
}
|
||||
|
||||
|
@ -1223,7 +1223,7 @@ extern "C" JSBool pref_InitInitialObjects()
|
|||
NS_ASSERTION(worked, "initpref.js not parsed successfully");
|
||||
// Keep this child
|
||||
|
||||
for (; Exists(i); i->next())
|
||||
for (; Exists(i); i->Next())
|
||||
{
|
||||
nsIFileSpec* child;
|
||||
PRBool shouldParse = PR_TRUE;
|
||||
|
|
|
@ -1221,11 +1221,11 @@ PrefResult pref_GetCharPref(const char *pref_name, char * return_buffer, int * l
|
|||
|
||||
if (stringVal)
|
||||
{
|
||||
if (*length == 0)
|
||||
if (*length <= 0)
|
||||
*length = PL_strlen(stringVal) + 1;
|
||||
else
|
||||
{
|
||||
PL_strncpy(return_buffer, stringVal, PR_MIN(*length - 1, (PRUint32)(PL_strlen(stringVal) + 1)));
|
||||
PL_strncpy(return_buffer, stringVal, PR_MIN((size_t)*length - 1, PL_strlen(stringVal) + 1));
|
||||
return_buffer[*length - 1] = '\0';
|
||||
}
|
||||
result = PREF_OK;
|
||||
|
|
|
@ -1221,11 +1221,11 @@ PrefResult pref_GetCharPref(const char *pref_name, char * return_buffer, int * l
|
|||
|
||||
if (stringVal)
|
||||
{
|
||||
if (*length == 0)
|
||||
if (*length <= 0)
|
||||
*length = PL_strlen(stringVal) + 1;
|
||||
else
|
||||
{
|
||||
PL_strncpy(return_buffer, stringVal, PR_MIN(*length - 1, (PRUint32)(PL_strlen(stringVal) + 1)));
|
||||
PL_strncpy(return_buffer, stringVal, PR_MIN((size_t)*length - 1, PL_strlen(stringVal) + 1));
|
||||
return_buffer[*length - 1] = '\0';
|
||||
}
|
||||
result = PREF_OK;
|
||||
|
|
|
@ -51,7 +51,7 @@ nsFileSpecWithUIImpl::~nsFileSpecWithUIImpl()
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecWithUIImpl::chooseOutputFile(
|
||||
NS_IMETHODIMP nsFileSpecWithUIImpl::ChooseOutputFile(
|
||||
const char *windowTitle,
|
||||
const char *suggestedLeafName)
|
||||
//----------------------------------------------------------------------------------------
|
||||
|
@ -74,19 +74,19 @@ NS_IMETHODIMP nsFileSpecWithUIImpl::chooseOutputFile(
|
|||
return NS_FILE_FAILURE;
|
||||
if (spec.Exists() && result != nsFileDlgResults_Replace)
|
||||
return NS_FILE_FAILURE;
|
||||
return mBaseFileSpec->setFromFileSpec(spec);
|
||||
} // nsFileSpecImpl::chooseOutputFile
|
||||
return mBaseFileSpec->SetFromFileSpec(spec);
|
||||
} // nsFileSpecImpl::ChooseOutputFile
|
||||
|
||||
NS_IMETHODIMP nsFileSpecWithUIImpl::chooseFile(const char *title, char **_retval)
|
||||
NS_IMETHODIMP nsFileSpecWithUIImpl::ChooseFile(const char *title, char **_retval)
|
||||
{
|
||||
nsresult rv = chooseInputFile(title, eAllFiles, nsnull, nsnull);
|
||||
nsresult rv = ChooseInputFile(title, eAllFiles, nsnull, nsnull);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
rv = GetURLString(_retval);
|
||||
return rv;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecWithUIImpl::chooseInputFile(
|
||||
NS_IMETHODIMP nsFileSpecWithUIImpl::ChooseInputFile(
|
||||
const char *inTitle,
|
||||
nsIFileSpecWithUI::StandardFilterMask inMask,
|
||||
const char *inExtraFilterTitle, const char *inExtraFilter)
|
||||
|
@ -156,16 +156,16 @@ NS_IMETHODIMP nsFileSpecWithUIImpl::chooseInputFile(
|
|||
fileWidget->SetFilterList(nextFilter - filters, titles, filters);
|
||||
if (fileWidget->GetFile(nsnull, inTitle, spec) != nsFileDlgResults_OK)
|
||||
rv = NS_FILE_FAILURE;
|
||||
rv = mBaseFileSpec->setFromFileSpec(spec);
|
||||
rv = mBaseFileSpec->SetFromFileSpec(spec);
|
||||
|
||||
Clean:
|
||||
delete [] titles;
|
||||
delete [] filters;
|
||||
return rv;
|
||||
} // nsFileSpecWithUIImpl::chooseInputFile
|
||||
} // nsFileSpecWithUIImpl::ChooseInputFile
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecWithUIImpl::chooseDirectory(const char *title, char **_retval)
|
||||
NS_IMETHODIMP nsFileSpecWithUIImpl::ChooseDirectory(const char *title, char **_retval)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
if (!mBaseFileSpec)
|
||||
|
|
|
@ -41,8 +41,8 @@ class nsFileSpecWithUIImpl
|
|||
// INHERITED/FORWARDED METHODS
|
||||
//------------------
|
||||
|
||||
NS_IMETHOD fromFileSpec(const nsIFileSpec *original)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->fromFileSpec(original) : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD FromFileSpec(const nsIFileSpec *original)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->FromFileSpec(original) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
NS_IMETHOD GetURLString(char * *aURLString)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->GetURLString(aURLString) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
@ -72,16 +72,16 @@ class nsFileSpecWithUIImpl
|
|||
{ return mBaseFileSpec ? mBaseFileSpec->GetNSPRPath(aNSPRPath) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* readonly attribute nsresult Error; */
|
||||
NS_IMETHOD error()
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->error() : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD Error()
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->Error() : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* boolean isValid (); */
|
||||
NS_IMETHOD isValid(PRBool *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->isValid(_retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD IsValid(PRBool *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->IsValid(_retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* boolean failed (); */
|
||||
NS_IMETHOD failed(PRBool *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->failed(_retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD Failed(PRBool *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->Failed(_retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* attribute string LeafName; */
|
||||
NS_IMETHOD GetLeafName(char * *aLeafName)
|
||||
|
@ -94,44 +94,44 @@ class nsFileSpecWithUIImpl
|
|||
{ return mBaseFileSpec ? mBaseFileSpec->GetParent(aParent) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* nsIFileSpec makeUnique (); */
|
||||
NS_IMETHOD makeUnique()
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->makeUnique() : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD MakeUnique()
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->MakeUnique() : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* nsIFileSpec makeUniqueWithSuggestedName (in string suggestedName); */
|
||||
NS_IMETHOD makeUniqueWithSuggestedName(const char* inSuggestedLeafName)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->makeUniqueWithSuggestedName(inSuggestedLeafName) : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD MakeUniqueWithSuggestedName(const char* inSuggestedLeafName)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->MakeUniqueWithSuggestedName(inSuggestedLeafName) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* readonly attribute unsigned long ModDate; */
|
||||
NS_IMETHOD GetModDate(PRUint32 *aModDate)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->GetModDate(aModDate) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* boolean modDateChanged (in unsigned long oldStamp); */
|
||||
NS_IMETHOD modDateChanged(PRUint32 oldStamp, PRBool *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->modDateChanged(oldStamp, _retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD ModDateChanged(PRUint32 oldStamp, PRBool *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->ModDateChanged(oldStamp, _retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* boolean isDirectory (); */
|
||||
NS_IMETHOD isDirectory(PRBool *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->isDirectory(_retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD IsDirectory(PRBool *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->IsDirectory(_retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* boolean isFile (); */
|
||||
NS_IMETHOD isFile(PRBool *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->isFile(_retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD IsFile(PRBool *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->IsFile(_retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* boolean exists (); */
|
||||
NS_IMETHOD exists(PRBool *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->exists(_retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD Exists(PRBool *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->Exists(_retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* boolean isHidden (); */
|
||||
NS_IMETHOD isHidden(PRBool *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->isHidden(_retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD IsHidden(PRBool *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->IsHidden(_retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* boolean isSymlink (); */
|
||||
NS_IMETHOD isSymlink(PRBool *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->isSymlink(_retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD IsSymlink(PRBool *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->IsSymlink(_retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* void resolveSymlink (); */
|
||||
NS_IMETHOD resolveSymlink()
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->resolveSymlink() : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD ResolveSymlink()
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->ResolveSymlink() : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* readonly attribute unsigned long FileSize; */
|
||||
NS_IMETHOD GetFileSize(PRUint32 *aFileSize)
|
||||
|
@ -146,48 +146,48 @@ class nsFileSpecWithUIImpl
|
|||
{ return mBaseFileSpec ? mBaseFileSpec->AppendRelativeUnixPath(relativePath) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* void createDir (); */
|
||||
NS_IMETHOD createDir()
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->createDir() : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD CreateDir()
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->CreateDir() : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* void touch (); */
|
||||
NS_IMETHOD touch ()
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->touch() : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD Touch ()
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->Touch() : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* void rename ([const] in string newLeafName); */
|
||||
NS_IMETHOD rename(const char *newLeafName)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->rename(newLeafName) : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD Rename(const char *newLeafName)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->Rename(newLeafName) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* void copyToDir ([const] in nsIFileSpec newParentDir); */
|
||||
NS_IMETHOD copyToDir(const nsIFileSpec *newParentDir)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->copyToDir(newParentDir) : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD CopyToDir(const nsIFileSpec *newParentDir)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->CopyToDir(newParentDir) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* void moveToDir ([const] in nsIFileSpec newParentDir); */
|
||||
NS_IMETHOD moveToDir(const nsIFileSpec *newParentDir)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->moveToDir(newParentDir) : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD MoveToDir(const nsIFileSpec *newParentDir)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->MoveToDir(newParentDir) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* void execute ([const] in string args); */
|
||||
NS_IMETHOD execute(const char *args)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->execute(args) : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD Execute(const char *args)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->Execute(args) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* void openStreamForReading (); */
|
||||
NS_IMETHOD openStreamForReading()
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->openStreamForReading() : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD OpenStreamForReading()
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->OpenStreamForReading() : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* void openStreamForWriting (); */
|
||||
NS_IMETHOD openStreamForWriting()
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->openStreamForWriting() : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD OpenStreamForWriting()
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->OpenStreamForWriting() : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* void openStreamForReadingAndWriting (); */
|
||||
NS_IMETHOD openStreamForReadingAndWriting()
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->openStreamForReadingAndWriting() : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD OpenStreamForReadingAndWriting()
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->OpenStreamForReadingAndWriting() : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* void close (); */
|
||||
NS_IMETHOD closeStream()
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->closeStream() : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD CloseStream()
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->CloseStream() : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* boolean isOpen (); */
|
||||
NS_IMETHOD isStreamOpen(PRBool *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->isStreamOpen(_retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD IsStreamOpen(PRBool *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->IsStreamOpen(_retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
NS_IMETHOD GetInputStream(nsIInputStream** _retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->GetInputStream(_retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
@ -202,41 +202,41 @@ class nsFileSpecWithUIImpl
|
|||
|
||||
NS_IMETHOD GetFileSpec(nsFileSpec *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->GetFileSpec(_retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD setFromFileSpec(const nsFileSpec& s)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->setFromFileSpec(s) : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD SetFromFileSpec(const nsFileSpec& s)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->SetFromFileSpec(s) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* boolean eof (); */
|
||||
NS_IMETHOD eof(PRBool *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->eof(_retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD Eof(PRBool *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->Eof(_retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
NS_IMETHOD read(char** buffer, PRInt32 requestedCount, PRInt32 *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->read(buffer, requestedCount, _retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD Read(char** buffer, PRInt32 requestedCount, PRInt32 *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->Read(buffer, requestedCount, _retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
NS_IMETHOD readLine(char** line, PRInt32 bufferSize, PRBool *wasTruncated)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->readLine(line, bufferSize, wasTruncated) : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD ReadLine(char** line, PRInt32 bufferSize, PRBool *wasTruncated)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->ReadLine(line, bufferSize, wasTruncated) : NS_ERROR_NOT_INITIALIZED; }
|
||||
// Check eof() before each call.
|
||||
// CAUTION: false result only indicates line was truncated
|
||||
// to fit buffer, or an error occurred (OTHER THAN eof).
|
||||
|
||||
|
||||
NS_IMETHOD write(const char* data, PRInt32 requestedCount, PRInt32 *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->write(data, requestedCount, _retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD Write(const char* data, PRInt32 requestedCount, PRInt32 *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->Write(data, requestedCount, _retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* void flush (); */
|
||||
NS_IMETHOD flush()
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->flush() : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD Flush()
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->Flush() : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* void seek (in long offset); */
|
||||
NS_IMETHOD seek(PRInt32 offset)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->seek(offset) : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD Seek(PRInt32 offset)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->Seek(offset) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* long tell (); */
|
||||
NS_IMETHOD tell(PRInt32 *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->tell(_retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD Tell(PRInt32 *_retval)
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->Tell(_retval) : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
/* void endline (); */
|
||||
NS_IMETHOD endline()
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->endline() : NS_ERROR_NOT_INITIALIZED; }
|
||||
NS_IMETHOD EndLine()
|
||||
{ return mBaseFileSpec ? mBaseFileSpec->EndLine() : NS_ERROR_NOT_INITIALIZED; }
|
||||
|
||||
// Data
|
||||
protected:
|
||||
|
|
|
@ -69,7 +69,7 @@ DataStruct::~DataStruct()
|
|||
if (mCacheFileName) {
|
||||
delete [] mCacheFileName;
|
||||
//nsIFileSpec * cacheFile = GetFileSpec(mCacheFileName);
|
||||
//cacheFile->remove();
|
||||
//cacheFile->Remove();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -154,7 +154,7 @@ nsIFileSpec * DataStruct::GetFileSpec(const char * aFileName)
|
|||
}
|
||||
|
||||
// now set the entire path for the nsIFileSpec
|
||||
cacheFile->setFromFileSpec(*sysCacheFile);
|
||||
cacheFile->SetFromFileSpec(*sysCacheFile);
|
||||
|
||||
// delete the temp for getting the system info
|
||||
delete sysCacheFile;
|
||||
|
|
|
@ -1975,7 +1975,7 @@ nsComponentManagerImpl::SyncComponentsInDir(RegistrationTime when, nsIFileSpec *
|
|||
PRBool isDir = PR_FALSE;
|
||||
|
||||
// Maker sure we are dealing with a directory
|
||||
rv = dirSpec->isDirectory(&isDir);
|
||||
rv = dirSpec->IsDirectory(&isDir);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
if (isDir == PR_FALSE)
|
||||
{
|
||||
|
@ -1992,14 +1992,14 @@ nsComponentManagerImpl::SyncComponentsInDir(RegistrationTime when, nsIFileSpec *
|
|||
// whip through the directory to register every file
|
||||
nsIFileSpec *dirEntry = NULL;
|
||||
PRBool more = PR_FALSE;
|
||||
rv = dirIterator->exists(&more);
|
||||
rv = dirIterator->Exists(&more);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
while (more == PR_TRUE)
|
||||
{
|
||||
rv = dirIterator->GetCurrentSpec(&dirEntry);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = dirEntry->isDirectory(&isDir);
|
||||
rv = dirEntry->IsDirectory(&isDir);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
if (isDir == PR_TRUE)
|
||||
{
|
||||
|
@ -2021,9 +2021,9 @@ nsComponentManagerImpl::SyncComponentsInDir(RegistrationTime when, nsIFileSpec *
|
|||
|
||||
NS_RELEASE(dirEntry);
|
||||
|
||||
rv = dirIterator->next();
|
||||
rv = dirIterator->Next();
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
rv = dirIterator->exists(&more);
|
||||
rv = dirIterator->Exists(&more);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
|
||||
|
@ -2052,7 +2052,7 @@ nsComponentManagerImpl::AutoRegisterComponent(RegistrationTime when, nsIFileSpec
|
|||
// Ensure we are dealing with a file as opposed to a dir
|
||||
PRBool b = PR_FALSE;
|
||||
|
||||
rv = component->isFile(&b);
|
||||
rv = component->IsFile(&b);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
if (b == PR_FALSE) return NS_ERROR_FAILURE;
|
||||
|
|
|
@ -90,7 +90,7 @@ nsDll::Init(nsIFileSpec *dllSpec)
|
|||
|
||||
// Make sure we are dealing with a file
|
||||
PRBool isFile = PR_FALSE;
|
||||
nsresult rv = m_dllSpec->isFile(&isFile);
|
||||
nsresult rv = m_dllSpec->IsFile(&isFile);
|
||||
if (NS_FAILED(rv))
|
||||
{
|
||||
m_status = DLL_INVALID_PARAM;
|
||||
|
@ -192,7 +192,7 @@ nsDll::HasChanged()
|
|||
|
||||
// If mod date has changed, then dll has changed
|
||||
PRBool modDateChanged = PR_FALSE;
|
||||
nsresult rv = m_dllSpec->modDateChanged(m_modDate, &modDateChanged);
|
||||
nsresult rv = m_dllSpec->ModDateChanged(m_modDate, &modDateChanged);
|
||||
if (NS_FAILED(rv) || modDateChanged == PR_TRUE)
|
||||
return PR_TRUE;
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ NS_IMETHODIMP nsSupportsIDImpl::SetData(nsID *aData)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsSupportsIDImpl::toString(char **_retval)
|
||||
NS_IMETHODIMP nsSupportsIDImpl::ToString(char **_retval)
|
||||
{
|
||||
char* result = nsnull;
|
||||
if(!_retval)
|
||||
|
@ -144,7 +144,7 @@ NS_IMETHODIMP nsSupportsStringImpl::SetData(char *aData)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsSupportsStringImpl::toString(char **_retval)
|
||||
NS_IMETHODIMP nsSupportsStringImpl::ToString(char **_retval)
|
||||
{
|
||||
return GetData(_retval);
|
||||
}
|
||||
|
@ -197,7 +197,7 @@ NS_IMETHODIMP nsSupportsWStringImpl::SetData(PRUnichar *aData)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsSupportsWStringImpl::toString(PRUnichar **_retval)
|
||||
NS_IMETHODIMP nsSupportsWStringImpl::ToString(PRUnichar **_retval)
|
||||
{
|
||||
return GetData(_retval);
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ NS_IMETHODIMP nsSupportsPRBoolImpl::SetData(PRBool aData)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsSupportsPRBoolImpl::toString(char **_retval)
|
||||
NS_IMETHODIMP nsSupportsPRBoolImpl::ToString(char **_retval)
|
||||
{
|
||||
if(!_retval)
|
||||
{
|
||||
|
@ -274,7 +274,7 @@ NS_IMETHODIMP nsSupportsPRUint8Impl::SetData(PRUint8 aData)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsSupportsPRUint8Impl::toString(char **_retval)
|
||||
NS_IMETHODIMP nsSupportsPRUint8Impl::ToString(char **_retval)
|
||||
{
|
||||
if(!_retval)
|
||||
{
|
||||
|
@ -321,7 +321,7 @@ NS_IMETHODIMP nsSupportsPRUint16Impl::SetData(PRUint16 aData)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsSupportsPRUint16Impl::toString(char **_retval)
|
||||
NS_IMETHODIMP nsSupportsPRUint16Impl::ToString(char **_retval)
|
||||
{
|
||||
if(!_retval)
|
||||
{
|
||||
|
@ -368,7 +368,7 @@ NS_IMETHODIMP nsSupportsPRUint32Impl::SetData(PRUint32 aData)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsSupportsPRUint32Impl::toString(char **_retval)
|
||||
NS_IMETHODIMP nsSupportsPRUint32Impl::ToString(char **_retval)
|
||||
{
|
||||
if(!_retval)
|
||||
{
|
||||
|
@ -415,7 +415,7 @@ NS_IMETHODIMP nsSupportsPRUint64Impl::SetData(PRUint64 aData)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsSupportsPRUint64Impl::toString(char **_retval)
|
||||
NS_IMETHODIMP nsSupportsPRUint64Impl::ToString(char **_retval)
|
||||
{
|
||||
if(!_retval)
|
||||
{
|
||||
|
@ -462,7 +462,7 @@ NS_IMETHODIMP nsSupportsPRTimeImpl::SetData(PRTime aData)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsSupportsPRTimeImpl::toString(char **_retval)
|
||||
NS_IMETHODIMP nsSupportsPRTimeImpl::ToString(char **_retval)
|
||||
{
|
||||
if(!_retval)
|
||||
{
|
||||
|
@ -509,7 +509,7 @@ NS_IMETHODIMP nsSupportsCharImpl::SetData(char aData)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsSupportsCharImpl::toString(char **_retval)
|
||||
NS_IMETHODIMP nsSupportsCharImpl::ToString(char **_retval)
|
||||
{
|
||||
char* result;
|
||||
if(!_retval)
|
||||
|
@ -556,7 +556,7 @@ NS_IMETHODIMP nsSupportsPRInt16Impl::SetData(PRInt16 aData)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsSupportsPRInt16Impl::toString(char **_retval)
|
||||
NS_IMETHODIMP nsSupportsPRInt16Impl::ToString(char **_retval)
|
||||
{
|
||||
if(!_retval)
|
||||
{
|
||||
|
@ -603,7 +603,7 @@ NS_IMETHODIMP nsSupportsPRInt32Impl::SetData(PRInt32 aData)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsSupportsPRInt32Impl::toString(char **_retval)
|
||||
NS_IMETHODIMP nsSupportsPRInt32Impl::ToString(char **_retval)
|
||||
{
|
||||
if(!_retval)
|
||||
{
|
||||
|
@ -650,7 +650,7 @@ NS_IMETHODIMP nsSupportsPRInt64Impl::SetData(PRInt64 aData)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsSupportsPRInt64Impl::toString(char **_retval)
|
||||
NS_IMETHODIMP nsSupportsPRInt64Impl::ToString(char **_retval)
|
||||
{
|
||||
if(!_retval)
|
||||
{
|
||||
|
@ -697,7 +697,7 @@ NS_IMETHODIMP nsSupportsFloatImpl::SetData(float aData)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsSupportsFloatImpl::toString(char **_retval)
|
||||
NS_IMETHODIMP nsSupportsFloatImpl::ToString(char **_retval)
|
||||
{
|
||||
if(!_retval)
|
||||
{
|
||||
|
@ -744,7 +744,7 @@ NS_IMETHODIMP nsSupportsDoubleImpl::SetData(double aData)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsSupportsDoubleImpl::toString(char **_retval)
|
||||
NS_IMETHODIMP nsSupportsDoubleImpl::ToString(char **_retval)
|
||||
{
|
||||
if(!_retval)
|
||||
{
|
||||
|
@ -792,7 +792,7 @@ NS_IMETHODIMP nsSupportsVoidImpl::SetData(void * aData)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsSupportsVoidImpl::toString(char **_retval)
|
||||
NS_IMETHODIMP nsSupportsVoidImpl::ToString(char **_retval)
|
||||
{
|
||||
if(!_retval)
|
||||
{
|
||||
|
|
|
@ -56,7 +56,7 @@ nsFileSpecImpl::nsFileSpecImpl(const nsFileSpec& inSpec)
|
|||
nsFileSpecImpl::~nsFileSpecImpl()
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
closeStream();
|
||||
CloseStream();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
|
@ -73,7 +73,7 @@ nsresult nsFileSpecImpl::MakeInterface(const nsFileSpec& inSpec, nsIFileSpec** r
|
|||
#define FILESPEC(ifilespec) ((nsFileSpecImpl*)ifilespec)->mFileSpec
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::fromFileSpec(const nsIFileSpec *original)
|
||||
NS_IMETHODIMP nsFileSpecImpl::FromFileSpec(const nsIFileSpec *original)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
mFileSpec = FILESPEC(original);
|
||||
|
@ -186,14 +186,14 @@ NS_IMETHODIMP nsFileSpecImpl::GetNSPRPath(char * *aNSPRPath)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::error()
|
||||
NS_IMETHODIMP nsFileSpecImpl::Error()
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
return mFileSpec.Error();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::isValid(PRBool *_retval)
|
||||
NS_IMETHODIMP nsFileSpecImpl::IsValid(PRBool *_retval)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
TEST_OUT_PTR(_retval)
|
||||
|
@ -202,7 +202,7 @@ NS_IMETHODIMP nsFileSpecImpl::isValid(PRBool *_retval)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::failed(PRBool *_retval)
|
||||
NS_IMETHODIMP nsFileSpecImpl::Failed(PRBool *_retval)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
*_retval = mFileSpec.Failed();
|
||||
|
@ -237,7 +237,7 @@ NS_IMETHODIMP nsFileSpecImpl::GetParent(nsIFileSpec * *aParent)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::makeUnique()
|
||||
NS_IMETHODIMP nsFileSpecImpl::MakeUnique()
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
mFileSpec.MakeUnique();
|
||||
|
@ -245,7 +245,7 @@ NS_IMETHODIMP nsFileSpecImpl::makeUnique()
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::makeUniqueWithSuggestedName(const char *suggestedName)
|
||||
NS_IMETHODIMP nsFileSpecImpl::MakeUniqueWithSuggestedName(const char *suggestedName)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
mFileSpec.MakeUnique(suggestedName);
|
||||
|
@ -264,7 +264,7 @@ NS_IMETHODIMP nsFileSpecImpl::GetModDate(PRUint32 *aModDate)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::modDateChanged(PRUint32 oldStamp, PRBool *_retval)
|
||||
NS_IMETHODIMP nsFileSpecImpl::ModDateChanged(PRUint32 oldStamp, PRBool *_retval)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
TEST_OUT_PTR(_retval)
|
||||
|
@ -273,7 +273,7 @@ NS_IMETHODIMP nsFileSpecImpl::modDateChanged(PRUint32 oldStamp, PRBool *_retval)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::isDirectory(PRBool *_retval)
|
||||
NS_IMETHODIMP nsFileSpecImpl::IsDirectory(PRBool *_retval)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
TEST_OUT_PTR(_retval)
|
||||
|
@ -282,7 +282,7 @@ NS_IMETHODIMP nsFileSpecImpl::isDirectory(PRBool *_retval)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::isFile(PRBool *_retval)
|
||||
NS_IMETHODIMP nsFileSpecImpl::IsFile(PRBool *_retval)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
TEST_OUT_PTR(_retval)
|
||||
|
@ -291,7 +291,7 @@ NS_IMETHODIMP nsFileSpecImpl::isFile(PRBool *_retval)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::exists(PRBool *_retval)
|
||||
NS_IMETHODIMP nsFileSpecImpl::Exists(PRBool *_retval)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
TEST_OUT_PTR(_retval)
|
||||
|
@ -300,7 +300,7 @@ NS_IMETHODIMP nsFileSpecImpl::exists(PRBool *_retval)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::isHidden(PRBool *_retval)
|
||||
NS_IMETHODIMP nsFileSpecImpl::IsHidden(PRBool *_retval)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
TEST_OUT_PTR(_retval)
|
||||
|
@ -309,7 +309,7 @@ NS_IMETHODIMP nsFileSpecImpl::isHidden(PRBool *_retval)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::isSymlink(PRBool *_retval)
|
||||
NS_IMETHODIMP nsFileSpecImpl::IsSymlink(PRBool *_retval)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
TEST_OUT_PTR(_retval)
|
||||
|
@ -318,7 +318,7 @@ NS_IMETHODIMP nsFileSpecImpl::isSymlink(PRBool *_retval)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::resolveSymlink()
|
||||
NS_IMETHODIMP nsFileSpecImpl::ResolveSymlink()
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
PRBool ignore;
|
||||
|
@ -352,19 +352,19 @@ NS_IMETHODIMP nsFileSpecImpl::AppendRelativeUnixPath(const char *relativePath)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::touch()
|
||||
NS_IMETHODIMP nsFileSpecImpl::Touch()
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
// create an empty file, like the UNIX touch command.
|
||||
nsresult rv;
|
||||
rv = openStreamForReadingAndWriting();
|
||||
rv = OpenStreamForReadingAndWriting();
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
rv = closeStream();
|
||||
rv = CloseStream();
|
||||
return rv;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::createDir()
|
||||
NS_IMETHODIMP nsFileSpecImpl::CreateDir()
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
mFileSpec.CreateDir();
|
||||
|
@ -372,35 +372,35 @@ NS_IMETHODIMP nsFileSpecImpl::createDir()
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::rename(const char *newLeafName)
|
||||
NS_IMETHODIMP nsFileSpecImpl::Rename(const char *newLeafName)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
return mFileSpec.Rename(newLeafName);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::copyToDir(const nsIFileSpec *newParentDir)
|
||||
NS_IMETHODIMP nsFileSpecImpl::CopyToDir(const nsIFileSpec *newParentDir)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
return mFileSpec.Copy(FILESPEC(newParentDir));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::moveToDir(const nsIFileSpec *newParentDir)
|
||||
NS_IMETHODIMP nsFileSpecImpl::MoveToDir(const nsIFileSpec *newParentDir)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
return mFileSpec.Move(FILESPEC(newParentDir));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::execute(const char *args)
|
||||
NS_IMETHODIMP nsFileSpecImpl::Execute(const char *args)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
return mFileSpec.Execute(args);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::openStreamForReading()
|
||||
NS_IMETHODIMP nsFileSpecImpl::OpenStreamForReading()
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
if (mInputStream || mOutputStream)
|
||||
|
@ -409,7 +409,7 @@ NS_IMETHODIMP nsFileSpecImpl::openStreamForReading()
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::openStreamForWriting()
|
||||
NS_IMETHODIMP nsFileSpecImpl::OpenStreamForWriting()
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
if (mInputStream || mOutputStream)
|
||||
|
@ -418,7 +418,7 @@ NS_IMETHODIMP nsFileSpecImpl::openStreamForWriting()
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::openStreamForReadingAndWriting()
|
||||
NS_IMETHODIMP nsFileSpecImpl::OpenStreamForReadingAndWriting()
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
if (mInputStream || mOutputStream)
|
||||
|
@ -430,7 +430,7 @@ NS_IMETHODIMP nsFileSpecImpl::openStreamForReadingAndWriting()
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::closeStream()
|
||||
NS_IMETHODIMP nsFileSpecImpl::CloseStream()
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
NS_IF_RELEASE(mInputStream);
|
||||
|
@ -439,7 +439,7 @@ NS_IMETHODIMP nsFileSpecImpl::closeStream()
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::isStreamOpen(PRBool *_retval)
|
||||
NS_IMETHODIMP nsFileSpecImpl::IsStreamOpen(PRBool *_retval)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
TEST_OUT_PTR(_retval)
|
||||
|
@ -453,7 +453,7 @@ NS_IMETHODIMP nsFileSpecImpl::GetInputStream(nsIInputStream** _retval)
|
|||
{
|
||||
TEST_OUT_PTR(_retval)
|
||||
if (!mInputStream) {
|
||||
nsresult rv = openStreamForReading();
|
||||
nsresult rv = OpenStreamForReading();
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
*_retval = mInputStream;
|
||||
|
@ -467,7 +467,7 @@ NS_IMETHODIMP nsFileSpecImpl::GetOutputStream(nsIOutputStream** _retval)
|
|||
{
|
||||
TEST_OUT_PTR(_retval)
|
||||
if (!mOutputStream) {
|
||||
nsresult rv = openStreamForWriting();
|
||||
nsresult rv = OpenStreamForWriting();
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
*_retval = mOutputStream;
|
||||
|
@ -479,11 +479,11 @@ NS_IMETHODIMP nsFileSpecImpl::GetOutputStream(nsIOutputStream** _retval)
|
|||
NS_IMETHODIMP nsFileSpecImpl::SetFileContents(char* inString)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
nsresult rv = openStreamForWriting();
|
||||
nsresult rv = OpenStreamForWriting();
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
PRInt32 count;
|
||||
rv = write(inString, PL_strlen(inString), &count);
|
||||
nsresult rv2 = closeStream();
|
||||
rv = Write(inString, PL_strlen(inString), &count);
|
||||
nsresult rv2 = CloseStream();
|
||||
return NS_FAILED(rv) ? rv : rv2;
|
||||
}
|
||||
|
||||
|
@ -493,15 +493,15 @@ NS_IMETHODIMP nsFileSpecImpl::GetFileContents(char** _retval)
|
|||
{
|
||||
TEST_OUT_PTR(_retval)
|
||||
*_retval = nsnull;
|
||||
nsresult rv = openStreamForReading();
|
||||
nsresult rv = OpenStreamForReading();
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
PRInt32 theSize;
|
||||
rv = GetFileSize((PRUint32*)&theSize);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
rv = read(_retval, theSize, &theSize);
|
||||
rv = Read(_retval, theSize, &theSize);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
(*_retval)[theSize] = 0;
|
||||
nsresult rv2 = closeStream();
|
||||
nsresult rv2 = CloseStream();
|
||||
return NS_FAILED(rv) ? rv : rv2;
|
||||
}
|
||||
|
||||
|
@ -515,7 +515,7 @@ NS_IMETHODIMP nsFileSpecImpl::GetFileSpec(nsFileSpec *aFileSpec)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::setFromFileSpec(const nsFileSpec& aFileSpec)
|
||||
NS_IMETHODIMP nsFileSpecImpl::SetFromFileSpec(const nsFileSpec& aFileSpec)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
mFileSpec = aFileSpec;
|
||||
|
@ -523,7 +523,7 @@ NS_IMETHODIMP nsFileSpecImpl::setFromFileSpec(const nsFileSpec& aFileSpec)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::eof(PRBool *_retval)
|
||||
NS_IMETHODIMP nsFileSpecImpl::Eof(PRBool *_retval)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
TEST_OUT_PTR(_retval)
|
||||
|
@ -535,13 +535,13 @@ NS_IMETHODIMP nsFileSpecImpl::eof(PRBool *_retval)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::read(char** buffer, PRInt32 requestedCount, PRInt32 *_retval)
|
||||
NS_IMETHODIMP nsFileSpecImpl::Read(char** buffer, PRInt32 requestedCount, PRInt32 *_retval)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
TEST_OUT_PTR(_retval)
|
||||
TEST_OUT_PTR(buffer)
|
||||
if (!mInputStream) {
|
||||
nsresult rv = openStreamForReading();
|
||||
nsresult rv = OpenStreamForReading();
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
if (!*buffer)
|
||||
|
@ -554,13 +554,13 @@ NS_IMETHODIMP nsFileSpecImpl::read(char** buffer, PRInt32 requestedCount, PRInt3
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::readLine(char** line, PRInt32 bufferSize, PRBool *wasTruncated)
|
||||
NS_IMETHODIMP nsFileSpecImpl::ReadLine(char** line, PRInt32 bufferSize, PRBool *wasTruncated)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
TEST_OUT_PTR(wasTruncated)
|
||||
TEST_OUT_PTR(line)
|
||||
if (!mInputStream) {
|
||||
nsresult rv = openStreamForReading();
|
||||
nsresult rv = OpenStreamForReading();
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
if (!*line)
|
||||
|
@ -573,15 +573,16 @@ NS_IMETHODIMP nsFileSpecImpl::readLine(char** line, PRInt32 bufferSize, PRBool *
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::write(const char * data, PRInt32 requestedCount, PRInt32 *_retval)
|
||||
NS_IMETHODIMP nsFileSpecImpl::Write(const char * data, PRInt32 requestedCount, PRInt32 *_retval)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
TEST_OUT_PTR(_retval)
|
||||
//if (!mOutputStream)
|
||||
// return NS_ERROR_NULL_POINTER;
|
||||
if (!mOutputStream) {
|
||||
nsresult rv=openStreamForWriting();
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
nsresult rv = OpenStreamForWriting();
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
}
|
||||
nsOutputFileStream s(mOutputStream);
|
||||
*_retval = s.write(data, requestedCount);
|
||||
|
@ -589,7 +590,7 @@ NS_IMETHODIMP nsFileSpecImpl::write(const char * data, PRInt32 requestedCount, P
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::flush()
|
||||
NS_IMETHODIMP nsFileSpecImpl::Flush()
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
if (!mOutputStream)
|
||||
|
@ -600,7 +601,7 @@ NS_IMETHODIMP nsFileSpecImpl::flush()
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::seek(PRInt32 offset)
|
||||
NS_IMETHODIMP nsFileSpecImpl::Seek(PRInt32 offset)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
nsresult result = NS_OK;
|
||||
|
@ -620,7 +621,7 @@ NS_IMETHODIMP nsFileSpecImpl::seek(PRInt32 offset)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::tell(PRInt32 *_retval)
|
||||
NS_IMETHODIMP nsFileSpecImpl::Tell(PRInt32 *_retval)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
TEST_OUT_PTR(_retval)
|
||||
|
@ -632,7 +633,7 @@ NS_IMETHODIMP nsFileSpecImpl::tell(PRInt32 *_retval)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsFileSpecImpl::endline()
|
||||
NS_IMETHODIMP nsFileSpecImpl::EndLine()
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
nsOutputFileStream s(mOutputStream);
|
||||
|
@ -669,7 +670,7 @@ NS_IMETHODIMP nsDirectoryIteratorImpl::Init(nsIFileSpec *parent, PRBool resolveS
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsDirectoryIteratorImpl::exists(PRBool *_retval)
|
||||
NS_IMETHODIMP nsDirectoryIteratorImpl::Exists(PRBool *_retval)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
TEST_OUT_PTR(_retval)
|
||||
|
@ -680,7 +681,7 @@ NS_IMETHODIMP nsDirectoryIteratorImpl::exists(PRBool *_retval)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsDirectoryIteratorImpl::next()
|
||||
NS_IMETHODIMP nsDirectoryIteratorImpl::Next()
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
if (!mDirectoryIterator)
|
||||
|
|
|
@ -38,24 +38,24 @@ class NS_COM nsFileSpecImpl
|
|||
// COM Cruft
|
||||
//----------------------
|
||||
|
||||
static NS_METHOD Create(nsISupports* outer, const nsIID& aIID, void* *aIFileSpec);
|
||||
static NS_METHOD Create(nsISupports* outer, const nsIID& aIID, void* *aIFileSpec);
|
||||
|
||||
//----------------------
|
||||
// Implementation
|
||||
//----------------------
|
||||
|
||||
nsFileSpecImpl();
|
||||
nsFileSpecImpl(const nsFileSpec& inSpec);
|
||||
virtual ~nsFileSpecImpl();
|
||||
static nsresult MakeInterface(const nsFileSpec& inSpec, nsIFileSpec** outSpec);
|
||||
nsFileSpecImpl();
|
||||
nsFileSpecImpl(const nsFileSpec& inSpec);
|
||||
virtual ~nsFileSpecImpl();
|
||||
static nsresult MakeInterface(const nsFileSpec& inSpec, nsIFileSpec** outSpec);
|
||||
|
||||
//----------------------
|
||||
// Data
|
||||
//----------------------
|
||||
|
||||
nsFileSpec mFileSpec;
|
||||
nsIInputStream* mInputStream;
|
||||
nsIOutputStream* mOutputStream;
|
||||
|
||||
nsFileSpec mFileSpec;
|
||||
nsIInputStream* mInputStream;
|
||||
nsIOutputStream* mOutputStream;
|
||||
|
||||
}; // class nsFileSpecImpl
|
||||
|
||||
|
@ -74,9 +74,9 @@ public:
|
|||
|
||||
NS_IMETHOD Init(nsIFileSpec *parent, PRBool resolveSymlink);
|
||||
|
||||
NS_IMETHOD exists(PRBool *_retval);
|
||||
NS_IMETHOD Exists(PRBool *_retval);
|
||||
|
||||
NS_IMETHOD next();
|
||||
NS_IMETHOD Next();
|
||||
|
||||
NS_IMETHOD GetCurrentSpec(nsIFileSpec * *aCurrentSpec);
|
||||
|
||||
|
@ -84,7 +84,7 @@ public:
|
|||
// COM Cruft
|
||||
//----------------------
|
||||
|
||||
static NS_METHOD Create(nsISupports* outer, const nsIID& aIID, void* *aIFileSpec);
|
||||
static NS_METHOD Create(nsISupports* outer, const nsIID& aIID, void* *aIFileSpec);
|
||||
|
||||
protected:
|
||||
|
||||
|
|
|
@ -52,9 +52,9 @@ interface nsIFileSpec : nsISupports
|
|||
void fromFileSpec([const] in nsIFileSpec original);
|
||||
|
||||
attribute string URLString;
|
||||
attribute string UnixStyleFilePath;
|
||||
attribute string PersistentDescriptorString;
|
||||
attribute string NativePath;
|
||||
attribute string unixStyleFilePath;
|
||||
attribute string persistentDescriptorString;
|
||||
attribute string nativePath;
|
||||
|
||||
readonly attribute string NSPRPath;
|
||||
|
||||
|
@ -63,37 +63,37 @@ interface nsIFileSpec : nsISupports
|
|||
boolean isValid();
|
||||
boolean failed();
|
||||
|
||||
attribute string LeafName;
|
||||
attribute string leafName;
|
||||
|
||||
readonly attribute nsIFileSpec Parent;
|
||||
readonly attribute nsIInputStream InputStream;
|
||||
readonly attribute nsIOutputStream OutputStream;
|
||||
[noscript] readonly attribute nsFileSpec FileSpec;
|
||||
readonly attribute nsIFileSpec parent;
|
||||
readonly attribute nsIInputStream inputStream;
|
||||
readonly attribute nsIOutputStream outputStream;
|
||||
[noscript] readonly attribute nsFileSpec fileSpec;
|
||||
[noscript] void setFromFileSpec([const] in nsFileSpecRef spec);
|
||||
|
||||
attribute string FileContents;
|
||||
attribute string fileContents;
|
||||
|
||||
void makeUnique();
|
||||
void makeUniqueWithSuggestedName(in string suggestedName);
|
||||
|
||||
readonly attribute unsigned long ModDate;
|
||||
readonly attribute unsigned long modDate;
|
||||
boolean modDateChanged(in unsigned long oldStamp);
|
||||
|
||||
boolean isDirectory();
|
||||
boolean isFile();
|
||||
boolean exists();
|
||||
boolean isHidden();
|
||||
boolean isHidden();
|
||||
|
||||
readonly attribute unsigned long FileSize;
|
||||
readonly attribute unsigned long DiskSpaceAvailable;
|
||||
readonly attribute unsigned long fileSize;
|
||||
readonly attribute unsigned long diskSpaceAvailable;
|
||||
|
||||
void AppendRelativeUnixPath(in string relativePath);
|
||||
void appendRelativeUnixPath(in string relativePath);
|
||||
|
||||
void createDir();
|
||||
void touch();
|
||||
|
||||
boolean isSymlink();
|
||||
void resolveSymlink();
|
||||
boolean isSymlink();
|
||||
void resolveSymlink();
|
||||
|
||||
void rename([const] in string newLeafName);
|
||||
void copyToDir([const] in nsIFileSpec newParentDir);
|
||||
|
@ -119,7 +119,7 @@ interface nsIFileSpec : nsISupports
|
|||
|
||||
void seek(in long offset);
|
||||
long tell();
|
||||
void endline();
|
||||
void endLine();
|
||||
|
||||
};
|
||||
|
||||
|
@ -136,7 +136,7 @@ interface nsIFileSpec : nsISupports
|
|||
[scriptable, uuid(d8c0a083-0868-11d3-915f-d9d889d48e3c)]
|
||||
interface nsIDirectoryIterator : nsISupports
|
||||
{
|
||||
void Init(in nsIFileSpec parent, in boolean resolveSymlink);
|
||||
void init(in nsIFileSpec parent, in boolean resolveSymlink);
|
||||
boolean exists();
|
||||
void next();
|
||||
readonly attribute nsIFileSpec currentSpec;
|
||||
|
@ -149,8 +149,8 @@ NS_COM nsresult NS_NewFileSpec(nsIFileSpec** result);
|
|||
NS_COM nsresult NS_NewDirectoryIterator(nsIDirectoryIterator** result);
|
||||
|
||||
#define NS_BOOL_ACCESSOR(_method) { PRBool yes; return NS_SUCCEEDED(f->_method(&yes)) && yes; }
|
||||
inline PRBool Exists(nsIFileSpec* f) NS_BOOL_ACCESSOR(exists)
|
||||
inline PRBool Exists(nsIDirectoryIterator* f) NS_BOOL_ACCESSOR(exists)
|
||||
inline PRBool IsDirectory(nsIFileSpec* f) NS_BOOL_ACCESSOR(isDirectory)
|
||||
inline PRBool Exists(nsIFileSpec* f) NS_BOOL_ACCESSOR(Exists)
|
||||
inline PRBool Exists(nsIDirectoryIterator* f) NS_BOOL_ACCESSOR(Exists)
|
||||
inline PRBool IsDirectory(nsIFileSpec* f) NS_BOOL_ACCESSOR(IsDirectory)
|
||||
|
||||
%}
|
||||
|
|
|
@ -36,7 +36,7 @@ write_indent(FILE *outfile) {
|
|||
static void
|
||||
write_header(gpointer key, gpointer value, gpointer user_data)
|
||||
{
|
||||
char *ident = (char *)value;
|
||||
const char *ident = (const char *)value;
|
||||
TreeState *state = (TreeState *)user_data;
|
||||
fprintf(state->file, "#include \"%s.h\"\n",
|
||||
ident);
|
||||
|
@ -45,7 +45,7 @@ write_header(gpointer key, gpointer value, gpointer user_data)
|
|||
static gboolean
|
||||
pass_1(TreeState *state)
|
||||
{
|
||||
char *define = g_basename(state->basename);
|
||||
const char *define = g_basename(state->basename);
|
||||
if (state->tree) {
|
||||
fprintf(state->file, "/*\n * DO NOT EDIT. THIS FILE IS GENERATED FROM"
|
||||
" %s.idl\n */\n", state->basename);
|
||||
|
@ -217,17 +217,17 @@ interface(TreeState *state)
|
|||
break;
|
||||
|
||||
case IDLN_CONST_DCL:
|
||||
/* ignore it here; it doesn't contribute to the macro. */
|
||||
continue;
|
||||
/* ignore it here; it doesn't contribute to the macro. */
|
||||
continue;
|
||||
|
||||
case IDLN_CODEFRAG:
|
||||
XPIDL_WARNING((iter, IDL_WARNING1,
|
||||
"%%{ .. %%} code fragment within interface "
|
||||
"ignored when generating NS_DECL_IFOO macro; "
|
||||
"if the code fragment contains method "
|
||||
"declarations, the macro probably isn't "
|
||||
"complete."));
|
||||
continue;
|
||||
XPIDL_WARNING((iter, IDL_WARNING1,
|
||||
"%%{ .. %%} code fragment within interface "
|
||||
"ignored when generating NS_DECL_IFOO macro; "
|
||||
"if the code fragment contains method "
|
||||
"declarations, the macro probably isn't "
|
||||
"complete."));
|
||||
continue;
|
||||
|
||||
default:
|
||||
IDL_tree_error(iter,
|
||||
|
@ -438,7 +438,7 @@ write_attr_accessor(IDL_tree attr_tree, FILE * outfile,
|
|||
}
|
||||
fprintf(outfile, "%cet%c%s(",
|
||||
getter ? 'G' : 'S',
|
||||
toupper(attrname[0]), attrname + 1);
|
||||
toupper(*attrname), attrname + 1);
|
||||
if (!as_call) {
|
||||
if (!write_type(ATTR_TYPE_DECL(attr_tree), outfile))
|
||||
return FALSE;
|
||||
|
@ -545,15 +545,23 @@ do_typedef(TreeState *state)
|
|||
"sequences not supported, ignored"));
|
||||
} else {
|
||||
state->tree = type;
|
||||
fputs("typedef ", state->file);
|
||||
fputs("\ntypedef ", state->file);
|
||||
if (!write_type(state->tree, state->file))
|
||||
return FALSE;
|
||||
fputs(" ", state->file);
|
||||
if (IDL_NODE_TYPE(complex = IDL_LIST(dcls).data) == IDLN_TYPE_ARRAY) {
|
||||
fprintf(state->file, "%s[%ld]",
|
||||
IDL_IDENT(IDL_TYPE_ARRAY(complex).ident).str,
|
||||
(long)IDL_INTEGER(IDL_LIST(IDL_TYPE_ARRAY(complex).size_list).
|
||||
data).value);
|
||||
IDL_tree dim = IDL_TYPE_ARRAY(complex).size_list;
|
||||
|
||||
fprintf(state->file, "%s",
|
||||
IDL_IDENT(IDL_TYPE_ARRAY(complex).ident).str);
|
||||
do {
|
||||
fputc('[', state->file);
|
||||
if (IDL_LIST(dim).data) {
|
||||
fprintf(state->file, "%ld",
|
||||
(long)IDL_INTEGER(IDL_LIST(dim).data).value);
|
||||
}
|
||||
fputc(']', state->file);
|
||||
} while ((dim = IDL_LIST(dim).next) != NULL);
|
||||
} else {
|
||||
fputs(" ", state->file);
|
||||
fputs(IDL_IDENT(IDL_LIST(dcls).data).str, state->file);
|
||||
|
@ -613,7 +621,7 @@ static gboolean
|
|||
forward_dcl(TreeState *state)
|
||||
{
|
||||
IDL_tree iface = state->tree;
|
||||
char *className = IDL_IDENT(IDL_FORWARD_DCL(iface).ident).str;
|
||||
const char *className = IDL_IDENT(IDL_FORWARD_DCL(iface).ident).str;
|
||||
if (!className)
|
||||
return FALSE;
|
||||
fprintf(state->file, "class %s; /* forward decl */\n", className);
|
||||
|
@ -632,6 +640,7 @@ write_method_signature(IDL_tree method_tree, FILE *outfile, gboolean as_call)
|
|||
gboolean no_generated_args = TRUE;
|
||||
gboolean op_notxpcom =
|
||||
(IDL_tree_property_get(op->ident, "notxpcom") != NULL);
|
||||
const char *name;
|
||||
IDL_tree iter;
|
||||
|
||||
if (!as_call) {
|
||||
|
@ -645,7 +654,8 @@ write_method_signature(IDL_tree method_tree, FILE *outfile, gboolean as_call)
|
|||
}
|
||||
fputc(' ', outfile);
|
||||
}
|
||||
fprintf(outfile, "%s(", IDL_IDENT(op->ident).str);
|
||||
name = IDL_IDENT(op->ident).str;
|
||||
fprintf(outfile, " %c%s(", toupper(*name), name + 1);
|
||||
for (iter = op->parameter_dcls; iter; iter = IDL_LIST(iter).next) {
|
||||
if (!as_call) {
|
||||
if (!write_param(IDL_LIST(iter).data, outfile))
|
||||
|
@ -729,7 +739,7 @@ static void
|
|||
write_codefrag_line(gpointer data, gpointer user_data)
|
||||
{
|
||||
TreeState *state = (TreeState *)user_data;
|
||||
char *line = (char *)data;
|
||||
const char *line = (const char *)data;
|
||||
fputs(line, state->file);
|
||||
fputc('\n', state->file);
|
||||
}
|
||||
|
@ -737,7 +747,7 @@ write_codefrag_line(gpointer data, gpointer user_data)
|
|||
static gboolean
|
||||
codefrag(TreeState *state)
|
||||
{
|
||||
char *desc = IDL_CODEFRAG(state->tree).desc;
|
||||
const char *desc = IDL_CODEFRAG(state->tree).desc;
|
||||
if (strcmp(desc, "C++")) {
|
||||
XPIDL_WARNING((state->tree, IDL_WARNING1,
|
||||
"ignoring '%%{%s' escape. "
|
||||
|
|
|
@ -2099,7 +2099,7 @@ NS_IMETHODIMP nsBrowserAppCore::OpenWindow()
|
|||
if (!fileSpec)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsresult rv = fileSpec->chooseInputFile(
|
||||
nsresult rv = fileSpec->ChooseInputFile(
|
||||
"Open File", nsIFileSpecWithUI::eAllStandardFilters, nsnull, nsnull);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
|
|
@ -49,6 +49,9 @@
|
|||
#include "nsICookieService.h"
|
||||
#endif // NECKO
|
||||
|
||||
#ifdef DEBUG
|
||||
#include "prlog.h"
|
||||
#endif
|
||||
|
||||
// Temporary stuff.
|
||||
#include "nsIDOMToolkitCore.h"
|
||||
|
@ -139,7 +142,7 @@ static PRBool CheckAndRunPrefs(nsICmdLineService* cmdLineArgs)
|
|||
nsIPrefWindow::GetIID(),
|
||||
(void **)&prefWindow);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
prefWindow->showWindow(nsString("Apprunner::main()").GetUnicode(), nsnull, nsnull);
|
||||
prefWindow->ShowWindow(nsString("Apprunner::main()").GetUnicode(), nsnull, nsnull);
|
||||
NS_IF_RELEASE(prefWindow);
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
@ -357,10 +360,10 @@ int main1(int argc, char* argv[])
|
|||
// No directory name provided. Get File Locator
|
||||
nsIFileLocator* locator = nsnull;
|
||||
rv = nsServiceManager::GetService(kFileLocatorCID, nsIFileLocator::GetIID(), (nsISupports**)&locator);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
if (!locator)
|
||||
return NS_ERROR_FAILURE;
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
if (!locator)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
// Get current profile, make the new one a sibling...
|
||||
nsIFileSpec* spec;
|
||||
|
@ -525,7 +528,7 @@ int main1(int argc, char* argv[])
|
|||
if (height) {
|
||||
PR_sscanf(height, "%d", &heightVal);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Load preferences, causing them to be initialized, and hold a reference to them.
|
||||
*/
|
||||
|
@ -586,7 +589,7 @@ int main1(int argc, char* argv[])
|
|||
nsIPrefWindow::GetIID(),
|
||||
(void **)&prefWindow);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
prefWindow->showWindow(nsString("Apprunner::main()").GetUnicode(), nsnull, nsnull);
|
||||
prefWindow->ShowWindow(nsString("Apprunner::main()").GetUnicode(), nsnull, nsnull);
|
||||
NS_IF_RELEASE(prefWindow);
|
||||
goto done;
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ NS_IMPL_ISUPPORTS( nsPrefWindow, nsIPrefWindow::GetIID())
|
|||
return (sPrefWindow != nsnull);
|
||||
}
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsPrefWindow::showWindow(
|
||||
NS_IMETHODIMP nsPrefWindow::ShowWindow(
|
||||
const PRUnichar *id,
|
||||
nsIDOMWindow *currentFrontWin,
|
||||
const PRUnichar* panelURL)
|
||||
|
@ -160,7 +160,7 @@ NS_IMETHODIMP nsPrefWindow::showWindow(
|
|||
if (mPrefs)
|
||||
{
|
||||
#ifdef NS_DEBUG
|
||||
stream << "¥¥¥ showWindow called twice! Existing pref object reused by "
|
||||
stream << "¥¥¥ ShowWindow called twice! Existing pref object reused by "
|
||||
<< nsString(id).ToCString(buf, sizeof(buf))
|
||||
<< nsEndl;
|
||||
#endif
|
||||
|
@ -213,7 +213,7 @@ NS_IMETHODIMP nsPrefWindow::showWindow(
|
|||
NS_CHROME_ALL_CHROME | NS_CHROME_OPEN_AS_DIALOG,
|
||||
cb, 504, 436);
|
||||
return rv;
|
||||
} // nsPrefWindow::showWindow()
|
||||
} // nsPrefWindow::ShowWindow()
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
static PRBool CheckAndStrip(
|
||||
|
@ -625,7 +625,7 @@ nsresult nsPrefWindow::FinalizePrefWidgets()
|
|||
} // nsPrefWindow::FinalizePrefWidgets
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsPrefWindow::changePanel(const PRUnichar* aURL)
|
||||
NS_IMETHODIMP nsPrefWindow::ChangePanel(const PRUnichar* aURL)
|
||||
// Start loading of a new prefs panel.
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
|
@ -649,7 +649,7 @@ NS_IMETHODIMP nsPrefWindow::changePanel(const PRUnichar* aURL)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsPrefWindow::panelLoaded(nsIDOMWindow* aWin)
|
||||
NS_IMETHODIMP nsPrefWindow::PanelLoaded(nsIDOMWindow* aWin)
|
||||
// Callback after loading of a new prefs panel.
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
|
@ -716,7 +716,7 @@ static nsresult Close(nsIDOMWindow*& dw)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsPrefWindow::savePrefs()
|
||||
NS_IMETHODIMP nsPrefWindow::SavePrefs()
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
FinalizePrefWidgets();
|
||||
|
@ -732,7 +732,7 @@ NS_IMETHODIMP nsPrefWindow::savePrefs()
|
|||
} // nsPrefWindow::SavePrefs
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsPrefWindow::cancelPrefs()
|
||||
NS_IMETHODIMP nsPrefWindow::CancelPrefs()
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
// Do the prefs stuff...
|
||||
|
@ -767,7 +767,7 @@ char* nsPrefWindow::GetSubstitution(nsString& formatstr)
|
|||
} // nsPrefWindow::GetSubstitution
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsPrefWindow::setSubstitutionVar(
|
||||
NS_IMETHODIMP nsPrefWindow::SetSubstitutionVar(
|
||||
PRUint32 aStringnum,
|
||||
const char* aVal)
|
||||
//----------------------------------------------------------------------------------------
|
||||
|
|
|
@ -341,7 +341,7 @@ nsXPInstallManager::OnStartRequest(nsIURI* aURL,
|
|||
const char *aContentType)
|
||||
#endif
|
||||
{
|
||||
mItem->mFile->openStreamForWriting();
|
||||
mItem->mFile->OpenStreamForWriting();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -375,7 +375,7 @@ nsXPInstallManager::OnStopRequest(nsIURI* aURL,
|
|||
rv = NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
|
||||
mItem->mFile->closeStream();
|
||||
mItem->mFile->CloseStream();
|
||||
DownloadNext();
|
||||
return rv;
|
||||
}
|
||||
|
@ -405,7 +405,7 @@ nsXPInstallManager::OnDataAvailable(nsIURI* aURL,
|
|||
|
||||
if (NS_SUCCEEDED(err))
|
||||
{
|
||||
err = mItem->mFile->write( buffer, len, &result);
|
||||
err = mItem->mFile->Write( buffer, len, &result);
|
||||
if ( NS_SUCCEEDED(err) && result != (PRInt32)len )
|
||||
{
|
||||
/* Error */
|
||||
|
|
Загрузка…
Ссылка в новой задаче