1) I don't think onlineName is appropriate for local folders. local folders
aren't online. (it makes sense for imap folders, which are actually online).
I see that dbfolderInfo uses "onlineName", so we can't change that. but
perhaps in localmailfolder.cpp, we can come up with a different name.
this code (looks copied from the imap implementation) is misleading. onlineName
is not really a UTF7 string.
some of the string converting that is going on (from CString to String and
back) has me worried for the non ASCII case.
you've made the "onlineName" attribute a string property, like it is for imap.
that works for imap, since the online name is in modified UTF7, which is 7 bit
clean and we convert it later before coming up with the PRUnichar * version of
the name. (note, for dbfolderInfo, it is a PRUnichar * property)
in nsLocalMailFolder.cpp, when the user creates a folder, folderName is a
PRUnichar *, and we convert that to a CString. if I tried to create a non
ASCII local folder name, would would happen?
we might have to take the PRUnichar *, and turn it into escaped UTF8 (which is
7bit clean), store that as the "onlineName" property, and then pulling it out
of the folder cache, turn it back into a PRUnichar *.
comments:
1) I don't think onlineName is appropriate for local folders. local folders .cpp, we can come up with a different name.
aren't online. (it makes sense for imap folders, which are actually online).
I see that dbfolderInfo uses "onlineName", so we can't change that. but
perhaps in localmailfolder
2)
+ if (NS_SUCCEEDED(rv) && (const char *) onlineName && nsCRT:: strlen( (const
char *) onlineName))
do use .get() instead of casting.
3)
to be safe, in WriteToFolderCa cheElem( ) and ReadFromFolderC acheElem( ) you might ARG_POINTER( element) ;
want NS_ENSURE_
unless the caller checks for null before calling.
4)
+ nsXPIDLCString onlineFullUtf7Name; >GetStringPrope rty("onlineName ", getter_Copies Name)); ame.get( ) && nsCRT::strlen Name.get( ))) meStr.AssignWit hConversion( onlineFullUtf7N ame.get( ));
+ rv1 = cacheElement-
(onlineFullUtf7
+ if (NS_SUCCEEDED(rv1) && onlineFullUtf7N
(onlineFullUtf7
+ currentFolderNa
this code (looks copied from the imap implementation) is misleading. onlineName
is not really a UTF7 string.
some of the string converting that is going on (from CString to String and
back) has me worried for the non ASCII case.
you've made the "onlineName" attribute a string property, like it is for imap.
that works for imap, since the online name is in modified UTF7, which is 7 bit
clean and we convert it later before coming up with the PRUnichar * version of
the name. (note, for dbfolderInfo, it is a PRUnichar * property)
in nsLocalMailFold er.cpp, when the user creates a folder, folderName is a
PRUnichar *, and we convert that to a CString. if I tried to create a non
ASCII local folder name, would would happen?
we might have to take the PRUnichar *, and turn it into escaped UTF8 (which is
7bit clean), store that as the "onlineName" property, and then pulling it out
of the folder cache, turn it back into a PRUnichar *.