1. small fix on nsLocalFileCommon.cpp to fix unix warrning

2. add unicode methods to nsIFile/nsILocalFile idl
3. add nsLocalFileCommon.cpp to the unix and window makefile
This commit is contained in:
ftang%netscape.com 2000-04-20 22:53:29 +00:00
Родитель 17f53749f2
Коммит 492cbadd7d
5 изменённых файлов: 14 добавлений и 1 удалений

Просмотреть файл

@ -37,6 +37,7 @@ CPPSRCS = \
nsEscape.cpp \
nsLinebreakConverter.cpp \
nsLocalFileUnix.cpp \
nsLocalFileCommon.cpp \
nsFileSpec.cpp \
nsFileSpecStreaming.cpp \
nsFileStream.cpp \

Просмотреть файл

@ -79,6 +79,7 @@ LCFLAGS = -D_IMPL_NS_COM -D_IMPL_NS_BASE -DWIN32_LEAN_AND_MEAN
CPP_OBJS = \
.\$(OBJDIR)\nsDirectoryService.obj \
.\$(OBJDIR)\nsLocalFileWin.obj \
.\$(OBJDIR)\nsLocalFileCommon.obj \
.\$(OBJDIR)\nsBinaryStream.obj \
.\$(OBJDIR)\nsEscape.obj \
.\$(OBJDIR)\nsLinebreakConverter.obj \

Просмотреть файл

@ -54,6 +54,7 @@ interface nsIFile : nsISupports
* nsIFile.
*/
void append([const] in string node);
void appendUnicode([const] in wstring node);
/**
* Normalize the pathName (e.g. removing .. and . components on Unix).
@ -87,6 +88,7 @@ interface nsIFile : nsISupports
* Accessor to the leaf name of the file itself.
*/
attribute string leafName;
attribute wstring unicodeLeafName;
/**
* copyTo
@ -111,6 +113,7 @@ interface nsIFile : nsISupports
*
*/
void copyTo(in nsIFile newParentDir, [const] in string newName);
void copyToUnicode(in nsIFile newParentDir, [const] in wstring newName);
/**
* copyToFollowingLinks
@ -119,6 +122,7 @@ interface nsIFile : nsISupports
* the name implies, follows symbolic links.
*/
void copyToFollowingLinks(in nsIFile newParentDir, [const] in string newName);
void copyToFollowingLinksUnicode(in nsIFile newParentDir, [const] in wstring newName);
/**
* moveTo
@ -145,6 +149,7 @@ interface nsIFile : nsISupports
*
*/
void moveTo(in nsIFile newParentDir, [const] in string newName);
void moveToUnicode(in nsIFile newParentDir, [const] in wstring newName);
/**
* This will try to execute this file. It will not block for
@ -202,7 +207,9 @@ interface nsIFile : nsISupports
*/
readonly attribute string target;
readonly attribute wstring unicodeTarget;
readonly attribute string path;
readonly attribute wstring unicodePath;
boolean exists();
boolean isWritable();

Просмотреть файл

@ -56,6 +56,7 @@ interface nsILocalFile : nsIFile
* path must in native.
*/
void initWithPath([const] in string filePath);
void initWithUnicodePath([const] in wstring filePath);
[noscript] PRFileDescStar openNSPRFileDesc(in long flags, in long mode);
[noscript] FILE openANSIFileDesc(in string mode);
@ -73,4 +74,7 @@ interface nsILocalFile : nsIFile
extern "C" NS_EXPORT nsresult
NS_NewLocalFile(const char* path, nsILocalFile* *result);
extern "C" NS_EXPORT nsresult
NS_NewUnicodeLocalFile(const PRUnichar* path, nsILocalFile* *result);
%}

Просмотреть файл

@ -45,6 +45,7 @@
class nsFSStringConversion {
public:
nsFSStringConversion();
virtual ~nsFSStringConversion(){};
NS_IMETHOD UCSToNewFS( const PRUnichar* aIn, char** aOut);
NS_IMETHOD FSToNewUCS( const char* aIn, PRUnichar** aOut);
@ -149,7 +150,6 @@ nsFSStringConversion::PrepareDecoder()
{
res = PrepareFSCharset();
if(NS_SUCCEEDED(res)) {
nsresult res;
NS_WITH_SERVICE(nsICharsetConverterManager,
ucmgr, NS_CHARSETCONVERTERMANAGER_PROGID, &res);
NS_ASSERTION((NS_SUCCEEDED(res) && (nsnull != ucmgr)),