Renamed more classes from Julian* to nsCal*.

Didn't rename JulianPtrArray, JulianString, JulianFormFactory.
This commit is contained in:
jsun%netscape.com 1998-09-29 22:11:18 +00:00
Родитель 3789b2b28a
Коммит c89e1d4e2d
42 изменённых файлов: 1626 добавлений и 1626 удалений

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

@ -644,19 +644,19 @@ TextOffset status_start = 0,
}
usAttendStatus.extractBetween(status_start, status_end, tempString);
if (tempString == JulianKeyword::Instance()->ms_sACCEPTED )
if (tempString == nsCalKeyword::Instance()->ms_sACCEPTED )
{
doAddHTML( Accepted_Gif_HTML );
} else
if (tempString == JulianKeyword::Instance()->ms_sDECLINED )
if (tempString == nsCalKeyword::Instance()->ms_sDECLINED )
{
doAddHTML( Declined_Gif_HTML );
} else
if (tempString == JulianKeyword::Instance()->ms_sDELEGATED )
if (tempString == nsCalKeyword::Instance()->ms_sDELEGATED )
{
doAddHTML( Delegated_Gif_HTML );
} else
if (tempString == JulianKeyword::Instance()->ms_sVCALNEEDSACTION )
if (tempString == nsCalKeyword::Instance()->ms_sVCALNEEDSACTION )
{
doAddHTML( NeedsAction_Gif_HTML );
} else
@ -1174,13 +1174,13 @@ JulianFormFactory::getJulianErrorString(int32 ErrorNum)
{
JulianString* errortext = nil;
if ((t_int32)ErrorNum == JulianLogErrorMessage::Instance()->ms_iDTEndBeforeDTStart) errortext = &error1; else
if ((t_int32)ErrorNum == JulianLogErrorMessage::Instance()->ms_iInvalidPromptValue) errortext = &error2; else
if ((t_int32)ErrorNum == JulianLogErrorMessage::Instance()->ms_iInvalidTimeStringError) errortext = &error3; else
if ((t_int32)ErrorNum == JulianLogErrorMessage::Instance()->ms_iInvalidRecurrenceError) errortext = &error4; else
if ((t_int32)ErrorNum == JulianLogErrorMessage::Instance()->ms_iInvalidPropertyValue) errortext = &error5; else
if ((t_int32)ErrorNum == JulianLogErrorMessage::Instance()->ms_iInvalidPropertyName) errortext = &error6; else
if ((t_int32)ErrorNum == JulianLogErrorMessage::Instance()->ms_iInvalidParameterName) errortext = &error7; else
if ((t_int32)ErrorNum == nsCalLogErrorMessage::Instance()->ms_iDTEndBeforeDTStart) errortext = &error1; else
if ((t_int32)ErrorNum == nsCalLogErrorMessage::Instance()->ms_iInvalidPromptValue) errortext = &error2; else
if ((t_int32)ErrorNum == nsCalLogErrorMessage::Instance()->ms_iInvalidTimeStringError) errortext = &error3; else
if ((t_int32)ErrorNum == nsCalLogErrorMessage::Instance()->ms_iInvalidRecurrenceError) errortext = &error4; else
if ((t_int32)ErrorNum == nsCalLogErrorMessage::Instance()->ms_iInvalidPropertyValue) errortext = &error5; else
if ((t_int32)ErrorNum == nsCalLogErrorMessage::Instance()->ms_iInvalidPropertyName) errortext = &error6; else
if ((t_int32)ErrorNum == nsCalLogErrorMessage::Instance()->ms_iInvalidParameterName) errortext = &error7; else
errortext = &error0;
return errortext->GetBuffer();
@ -1226,7 +1226,7 @@ JulianFormFactory::doStatus()
errors = thisICalComp ? firstCalendar->getLogVector(thisICalComp) : firstCalendar->getLogVector();
if (errors != nil)
{
JulianLogError * element;
nsCalLogError * element;
int32 error_max = MIN(5, errors->GetSize());
int32 lost_errors = errors->GetSize() - error_max;
JulianString u;
@ -1235,7 +1235,7 @@ JulianFormFactory::doStatus()
{
char* errorprefix;
element = (JulianLogError *)errors->GetAt(x);
element = (nsCalLogError *)errors->GetAt(x);
u = "";
cjst = element->getShortReturnStatusCode().toCString("");

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

@ -213,7 +213,7 @@ public:
JLog* getLog() const { return m_Log; };
/**
* Return the vector of JulianLogErrors on this ICalComponent:
* Return the vector of nsCalLogErrors on this ICalComponent:
* Return 0 if ic is not in this calendar.
* Return 0 if ic has no error vector.
* Do not deallocate returned vector. Returns a ptr to vector, not a new vector.
@ -224,7 +224,7 @@ public:
JulianPtrArray * getLogVector(ICalComponent * ic);
/**
* Return the vector of JulianLogErrors on this calendar.
* Return the vector of nsCalLogErrors on this calendar.
* Return 0 if this calendar has no error vector.
* Do not deallocate returned vector. Returns a ptr to vector, not a new vector.
*/

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

@ -236,7 +236,7 @@ void Attendee::parse(UnicodeString & propVal,
void Attendee::addParamValList(UnicodeString & paramValList, t_int32 hashCode)
{
UnicodeStringTokenizer * stMult = new UnicodeStringTokenizer(paramValList,
JulianKeyword::Instance()->ms_sCOMMA_SYMBOL);
nsCalKeyword::Instance()->ms_sCOMMA_SYMBOL);
PR_ASSERT(stMult != 0);
if (stMult != 0)
{
@ -266,11 +266,11 @@ void Attendee::addParamValList(UnicodeString & paramValList, t_int32 hashCode)
}
nsCalUtility::stripDoubleQuotes(u); // double quote property
if (JulianKeyword::Instance()->ms_ATOM_DELEGATED_TO == hashCode)
if (nsCalKeyword::Instance()->ms_ATOM_DELEGATED_TO == hashCode)
{
addDelegatedTo(u);
}
else if (JulianKeyword::Instance()->ms_ATOM_DELEGATED_FROM == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_DELEGATED_FROM == hashCode)
{
addDelegatedFrom(u);
}
@ -294,21 +294,21 @@ void Attendee::setParam(UnicodeString & paramName,
if (paramName.size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidParameterName,
JulianKeyword::Instance()->ms_sATTENDEE, paramName, 200);
nsCalLogErrorMessage::Instance()->ms_iInvalidParameterName,
nsCalKeyword::Instance()->ms_sATTENDEE, paramName, 200);
}
else
{
t_int32 hashCode = paramName.hashCode();
if (JulianKeyword::Instance()->ms_ATOM_ROLE == hashCode)
if (nsCalKeyword::Instance()->ms_ATOM_ROLE == hashCode)
{
i = stringToRole(paramVal);
if (i < 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidParameterValue,
JulianKeyword::Instance()->ms_sATTENDEE,
nsCalLogErrorMessage::Instance()->ms_iInvalidParameterValue,
nsCalKeyword::Instance()->ms_sATTENDEE,
paramName, paramVal, 200);
}
else
@ -316,21 +316,21 @@ void Attendee::setParam(UnicodeString & paramName,
if (getRole() >= 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedParameter,
JulianKeyword::Instance()->ms_sATTENDEE,
nsCalLogErrorMessage::Instance()->ms_iDuplicatedParameter,
nsCalKeyword::Instance()->ms_sATTENDEE,
paramName, 100);
}
setRole((Attendee::ROLE) i);
}
}
else if (JulianKeyword::Instance()->ms_ATOM_CUTYPE == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_CUTYPE == hashCode)
{
i = stringToType(paramVal);
if (i < 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidParameterValue,
JulianKeyword::Instance()->ms_sATTENDEE,
nsCalLogErrorMessage::Instance()->ms_iInvalidParameterValue,
nsCalKeyword::Instance()->ms_sATTENDEE,
paramName, paramVal, 200);
}
else
@ -338,21 +338,21 @@ void Attendee::setParam(UnicodeString & paramName,
if (getType() >= 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedParameter,
JulianKeyword::Instance()->ms_sATTENDEE,
nsCalLogErrorMessage::Instance()->ms_iDuplicatedParameter,
nsCalKeyword::Instance()->ms_sATTENDEE,
paramName, 100);
}
setType((Attendee::TYPE) i);
}
}
else if (JulianKeyword::Instance()->ms_ATOM_PARTSTAT == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_PARTSTAT == hashCode)
{
i = stringToStatus(paramVal);
if (i < 0 || !isValidStatus(m_ComponentType, (Attendee::STATUS) i))
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidParameterValue,
JulianKeyword::Instance()->ms_sATTENDEE,
nsCalLogErrorMessage::Instance()->ms_iInvalidParameterValue,
nsCalKeyword::Instance()->ms_sATTENDEE,
paramName, paramVal, 200);
}
else
@ -360,21 +360,21 @@ void Attendee::setParam(UnicodeString & paramName,
if (getStatus() >= 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedParameter,
JulianKeyword::Instance()->ms_sATTENDEE,
nsCalLogErrorMessage::Instance()->ms_iDuplicatedParameter,
nsCalKeyword::Instance()->ms_sATTENDEE,
paramName, 100);
}
setStatus((Attendee::STATUS) i);
}
}
else if (JulianKeyword::Instance()->ms_ATOM_EXPECT == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_EXPECT == hashCode)
{
i = stringToExpect(paramVal);
if (i < 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidParameterValue,
JulianKeyword::Instance()->ms_sATTENDEE,
nsCalLogErrorMessage::Instance()->ms_iInvalidParameterValue,
nsCalKeyword::Instance()->ms_sATTENDEE,
paramName, paramVal, 200);
}
else
@ -382,21 +382,21 @@ void Attendee::setParam(UnicodeString & paramName,
if (getExpect() >= 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedParameter,
JulianKeyword::Instance()->ms_sATTENDEE,
nsCalLogErrorMessage::Instance()->ms_iDuplicatedParameter,
nsCalKeyword::Instance()->ms_sATTENDEE,
paramName, 100);
}
setExpect((Attendee::EXPECT) i);
}
}
else if (JulianKeyword::Instance()->ms_ATOM_RSVP == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_RSVP == hashCode)
{
i = stringToRSVP(paramVal);
if (i < 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidParameterValue,
JulianKeyword::Instance()->ms_sATTENDEE,
nsCalLogErrorMessage::Instance()->ms_iInvalidParameterValue,
nsCalKeyword::Instance()->ms_sATTENDEE,
paramName, paramVal, 200);
}
else
@ -404,74 +404,74 @@ void Attendee::setParam(UnicodeString & paramName,
if (getRSVP() >= 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedParameter,
JulianKeyword::Instance()->ms_sATTENDEE,
nsCalLogErrorMessage::Instance()->ms_iDuplicatedParameter,
nsCalKeyword::Instance()->ms_sATTENDEE,
paramName, 100);
}
setRSVP((Attendee::RSVP) i);
}
}
else if (JulianKeyword::Instance()->ms_ATOM_DELEGATED_TO == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_DELEGATED_TO == hashCode)
{
addParamValList(paramVal, hashCode);
}
else if (JulianKeyword::Instance()->ms_ATOM_DELEGATED_FROM == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_DELEGATED_FROM == hashCode)
{
addParamValList(paramVal, hashCode);
}
else if (JulianKeyword::Instance()->ms_ATOM_MEMBER == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_MEMBER == hashCode)
{
addParamValList(paramVal, hashCode);
}
// Newer properties 3-23-98 (cn, sent-by (double-quote), dir (double-quote))
else if (JulianKeyword::Instance()->ms_ATOM_CN == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_CN == hashCode)
{
if (getCN().size() != 0)
{
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iDuplicatedParameter,
JulianKeyword::Instance()->ms_sATTENDEE, paramName, 100);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iDuplicatedParameter,
nsCalKeyword::Instance()->ms_sATTENDEE, paramName, 100);
}
setCN(paramVal);
}
else if (JulianKeyword::Instance()->ms_ATOM_LANGUAGE == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_LANGUAGE == hashCode)
{
if (getLanguage().size() != 0)
{
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iDuplicatedParameter,
JulianKeyword::Instance()->ms_sATTENDEE, paramName, 100);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iDuplicatedParameter,
nsCalKeyword::Instance()->ms_sATTENDEE, paramName, 100);
}
setLanguage(paramVal);
}
else if (JulianKeyword::Instance()->ms_ATOM_SENTBY == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_SENTBY == hashCode)
{
if (getSentBy().size() != 0)
{
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iDuplicatedParameter,
JulianKeyword::Instance()->ms_sATTENDEE, paramName, 100);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iDuplicatedParameter,
nsCalKeyword::Instance()->ms_sATTENDEE, paramName, 100);
}
nsCalUtility::stripDoubleQuotes(paramVal); // double quote property
setSentBy(paramVal);
}
else if (JulianKeyword::Instance()->ms_ATOM_DIR == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_DIR == hashCode)
{
if (getDir().size() != 0)
{
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iDuplicatedParameter,
JulianKeyword::Instance()->ms_sATTENDEE, paramName, 100);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iDuplicatedParameter,
nsCalKeyword::Instance()->ms_sATTENDEE, paramName, 100);
}
nsCalUtility::stripDoubleQuotes(paramVal); // double quote property
setDir(paramVal);
}
else if (ICalProperty::IsXToken(paramName))
{
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iXTokenParamIgnored,
JulianKeyword::Instance()->ms_sATTENDEE, paramName, 100);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iXTokenParamIgnored,
nsCalKeyword::Instance()->ms_sATTENDEE, paramName, 100);
}
else
{
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iInvalidParameterName,
JulianKeyword::Instance()->ms_sATTENDEE, paramName, 200);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iInvalidParameterName,
nsCalKeyword::Instance()->ms_sATTENDEE, paramName, 200);
}
}
}
@ -490,7 +490,7 @@ UnicodeString & Attendee::toICALString(UnicodeString & out)
if (getStatus() != STATUS_NEEDSACTION)
{
#if 0
//if (sStatus.compareIgnoreCase(JulianKeyword::Instance()->ms_sNEEDSACTION) != 0) {
//if (sStatus.compareIgnoreCase(nsCalKeyword::Instance()->ms_sNEEDSACTION) != 0) {
/*
if (vsDelegatedTo != NULL && vsDelegatedTo.contains(sName))
return formatDoneDelegateFromOnly();
@ -530,7 +530,7 @@ UnicodeString & Attendee::toICALString(UnicodeString & sProp,
UnicodeString & Attendee::toString(UnicodeString & out)
{
out = toString(JulianFormatString::Instance()->ms_AttendeeStrDefaultFmt, out);
out = toString(nsCalFormatString::Instance()->ms_AttendeeStrDefaultFmt, out);
return out;
}
@ -540,7 +540,7 @@ UnicodeString & Attendee::toString(UnicodeString & strFmt,
UnicodeString & out)
{
if (strFmt.size() == 0 &&
JulianFormatString::Instance()->ms_AttendeeStrDefaultFmt.size() > 0)
nsCalFormatString::Instance()->ms_AttendeeStrDefaultFmt.size() > 0)
{
// if empty format string, use default
return toString(out);
@ -642,7 +642,7 @@ t_bool Attendee::isValid()
return FALSE;
// change to URL, must have "MAILTO:" in front
mailto = m_sName.extractBetween(0, 7, mailto);
if (mailto.compareIgnoreCase(JulianKeyword::Instance()->ms_sMAILTO_COLON) != 0)
if (mailto.compareIgnoreCase(nsCalKeyword::Instance()->ms_sMAILTO_COLON) != 0)
return FALSE;
else
return TRUE;
@ -683,7 +683,7 @@ UnicodeString Attendee::format(UnicodeString strFmt)
{
UnicodeString s, info;
t_int32 i,j;
s += JulianKeyword::Instance()->ms_sATTENDEE;
s += nsCalKeyword::Instance()->ms_sATTENDEE;
for ( i = 0; i < strFmt.size(); )
{
@ -728,57 +728,57 @@ UnicodeString Attendee::formatChar(t_int32 c)
// ALWAYS MUST BE LAST OF PARAMS
s = ":"; //ms_sCOLON_SYMBOL;
s += getName();
s += JulianKeyword::Instance()->ms_sLINEBREAK;
s += nsCalKeyword::Instance()->ms_sLINEBREAK;
return s;
}
case ms_cAttendeeRole:
s = roleToString(getRole(), s);
return ICalProperty::parameterToCalString(
JulianKeyword::Instance()->ms_sROLE, s, u);
nsCalKeyword::Instance()->ms_sROLE, s, u);
case ms_cAttendeeStatus:
s = statusToString(getStatus(), s);
return ICalProperty::parameterToCalString(
JulianKeyword::Instance()->ms_sPARTSTAT, s, u);
nsCalKeyword::Instance()->ms_sPARTSTAT, s, u);
case ms_cAttendeeRSVP:
s = rsvpToString(getRSVP(), s);
return ICalProperty::parameterToCalString(
JulianKeyword::Instance()->ms_sRSVP, s, u);
nsCalKeyword::Instance()->ms_sRSVP, s, u);
case ms_cAttendeeType:
s = typeToString(getType(), s);
return ICalProperty::parameterToCalString(
JulianKeyword::Instance()->ms_sCUTYPE, s, u);
nsCalKeyword::Instance()->ms_sCUTYPE, s, u);
case ms_cAttendeeExpect:
s = expectToString(getExpect(), s);
return ICalProperty::parameterToCalString(
JulianKeyword::Instance()->ms_sEXPECT, s, u);
nsCalKeyword::Instance()->ms_sEXPECT, s, u);
case ms_cAttendeeDelegatedTo:
xp = getDelegatedTo();
return printMailToVector(
JulianKeyword::Instance()->ms_sDELEGATED_TO, xp, u);
nsCalKeyword::Instance()->ms_sDELEGATED_TO, xp, u);
case ms_cAttendeeDelegatedFrom:
xp = getDelegatedFrom();
return printMailToVector(
JulianKeyword::Instance()->ms_sDELEGATED_FROM, xp, u);
nsCalKeyword::Instance()->ms_sDELEGATED_FROM, xp, u);
case ms_cAttendeeMember:
xp = getMember();
return printMailToVector(
JulianKeyword::Instance()->ms_sMEMBER, xp, u);
nsCalKeyword::Instance()->ms_sMEMBER, xp, u);
case ms_cAttendeeDir:
s = m_Dir;
s = nsCalUtility::addDoubleQuotes(s);
return ICalProperty::parameterToCalString(
JulianKeyword::Instance()->ms_sDIR, s, u);
nsCalKeyword::Instance()->ms_sDIR, s, u);
case ms_cAttendeeSentBy:
s = m_SentBy;
s = nsCalUtility::addDoubleQuotes(s);
return ICalProperty::parameterToCalString(
JulianKeyword::Instance()->ms_sSENTBY, s, u);
nsCalKeyword::Instance()->ms_sSENTBY, s, u);
case ms_cAttendeeCN:
return ICalProperty::parameterToCalString(
JulianKeyword::Instance()->ms_sCN, m_CN, u);
nsCalKeyword::Instance()->ms_sCN, m_CN, u);
case ms_cAttendeeLanguage:
return ICalProperty::parameterToCalString(
JulianKeyword::Instance()->ms_sLANGUAGE, m_Language, u);
nsCalKeyword::Instance()->ms_sLANGUAGE, m_Language, u);
default:
return "";
}
@ -817,21 +817,21 @@ Attendee::printMailToVector(UnicodeString & propName, JulianPtrArray * mailto,
UnicodeString Attendee::formatDoneAction()
{
return format(JulianFormatString::Instance()->ms_sAttendeeDoneActionMessage);
return format(nsCalFormatString::Instance()->ms_sAttendeeDoneActionMessage);
}
//---------------------------------------------------------------------
#if 0
UnicodeString Attendee::formatDoneDelegateToOnly()
{
return format(JulianFormatString::Instance()->ms_sAttendeeDoneDelegateToOnly);
return format(nsCalFormatString::Instance()->ms_sAttendeeDoneDelegateToOnly);
}
//---------------------------------------------------------------------
UnicodeString Attendee::formatDoneDelegateFromOnly()
{
return format(JulianFormatString::Instance()->ms_sAttendeeDoneDelegateFromOnly);
return format(nsCalFormatString::Instance()->ms_sAttendeeDoneDelegateFromOnly);
}
#endif
//---------------------------------------------------------------------
@ -839,21 +839,21 @@ UnicodeString Attendee::formatDoneDelegateFromOnly()
// no need for %S, assumed to be NEEDS-ACTION
UnicodeString Attendee::formatNeedsAction()
{
return format(JulianFormatString::Instance()->ms_sAttendeeNeedsActionMessage);
return format(nsCalFormatString::Instance()->ms_sAttendeeNeedsActionMessage);
}
//---------------------------------------------------------------------
#if 0
UnicodeString Attendee::formatDelegateToOnly()
{
return format(JulianFormatString::Instance()->ms_sAttendeeNeedsActionDelegateToOnly);
return format(nsCalFormatString::Instance()->ms_sAttendeeNeedsActionDelegateToOnly);
}
//---------------------------------------------------------------------
UnicodeString Attendee::formatDelegateFromOnly()
{
return format(JulianFormatString::Instance()->ms_sAttendeeNeedsActionDelegateFromOnly);
return format(nsCalFormatString::Instance()->ms_sAttendeeNeedsActionDelegateFromOnly);
}
#endif
//---------------------------------------------------------------------
@ -949,16 +949,16 @@ Attendee::stringToRole(UnicodeString & sRole)
#if 0
/* Old keywords */
if (JulianKeyword::Instance()->ms_ATOM_ATTENDEE == hashCode) return ROLE_ATTENDEE;
else if (JulianKeyword::Instance()->ms_ATOM_ORGANIZER == hashCode) return ROLE_ORGANIZER;
else if (JulianKeyword::Instance()->ms_ATOM_OWNER == hashCode) return ROLE_OWNER;
else if (JulianKeyword::Instance()->ms_ATOM_DELEGATE == hashCode) return ROLE_DELEGATE;
if (nsCalKeyword::Instance()->ms_ATOM_ATTENDEE == hashCode) return ROLE_ATTENDEE;
else if (nsCalKeyword::Instance()->ms_ATOM_ORGANIZER == hashCode) return ROLE_ORGANIZER;
else if (nsCalKeyword::Instance()->ms_ATOM_OWNER == hashCode) return ROLE_OWNER;
else if (nsCalKeyword::Instance()->ms_ATOM_DELEGATE == hashCode) return ROLE_DELEGATE;
#endif
if (JulianKeyword::Instance()->ms_ATOM_CHAIR == hashCode) return ROLE_CHAIR;
else if (JulianKeyword::Instance()->ms_ATOM_REQ_PARTICIPANT == hashCode) return ROLE_REQ_PARTICIPANT;
else if (JulianKeyword::Instance()->ms_ATOM_OPT_PARTICIPANT == hashCode) return ROLE_OPT_PARTICIPANT;
else if (JulianKeyword::Instance()->ms_ATOM_NON_PARTICIPANT == hashCode) return ROLE_NON_PARTICIPANT;
if (nsCalKeyword::Instance()->ms_ATOM_CHAIR == hashCode) return ROLE_CHAIR;
else if (nsCalKeyword::Instance()->ms_ATOM_REQ_PARTICIPANT == hashCode) return ROLE_REQ_PARTICIPANT;
else if (nsCalKeyword::Instance()->ms_ATOM_OPT_PARTICIPANT == hashCode) return ROLE_OPT_PARTICIPANT;
else if (nsCalKeyword::Instance()->ms_ATOM_NON_PARTICIPANT == hashCode) return ROLE_NON_PARTICIPANT;
else if (ICalProperty::IsXToken(sRole)) return ROLE_XPARAMVAL;
else return ROLE_INVALID;
}
@ -971,11 +971,11 @@ Attendee::stringToType(UnicodeString & sType)
sType.toUpper();
t_int32 hashCode = sType.hashCode();
if (JulianKeyword::Instance()->ms_ATOM_INDIVIDUAL == hashCode) return TYPE_INDIVIDUAL;
else if (JulianKeyword::Instance()->ms_ATOM_GROUP == hashCode) return TYPE_GROUP;
else if (JulianKeyword::Instance()->ms_ATOM_RESOURCE == hashCode) return TYPE_RESOURCE;
else if (JulianKeyword::Instance()->ms_ATOM_ROOM == hashCode) return TYPE_ROOM;
else if (JulianKeyword::Instance()->ms_ATOM_UNKNOWN == hashCode) return TYPE_UNKNOWN;
if (nsCalKeyword::Instance()->ms_ATOM_INDIVIDUAL == hashCode) return TYPE_INDIVIDUAL;
else if (nsCalKeyword::Instance()->ms_ATOM_GROUP == hashCode) return TYPE_GROUP;
else if (nsCalKeyword::Instance()->ms_ATOM_RESOURCE == hashCode) return TYPE_RESOURCE;
else if (nsCalKeyword::Instance()->ms_ATOM_ROOM == hashCode) return TYPE_ROOM;
else if (nsCalKeyword::Instance()->ms_ATOM_UNKNOWN == hashCode) return TYPE_UNKNOWN;
else if (ICalProperty::IsXToken(sType)) return TYPE_XPARAMVAL;
else return TYPE_INVALID;
}
@ -988,15 +988,15 @@ Attendee::stringToStatus(UnicodeString & sStatus)
sStatus.toUpper();
t_int32 hashCode = sStatus.hashCode();
if (JulianKeyword::Instance()->ms_ATOM_NEEDSACTION == hashCode) return STATUS_NEEDSACTION;
else if (JulianKeyword::Instance()->ms_ATOM_VCALNEEDSACTION == hashCode) return STATUS_NEEDSACTION;
if (nsCalKeyword::Instance()->ms_ATOM_NEEDSACTION == hashCode) return STATUS_NEEDSACTION;
else if (nsCalKeyword::Instance()->ms_ATOM_VCALNEEDSACTION == hashCode) return STATUS_NEEDSACTION;
else if (JulianKeyword::Instance()->ms_ATOM_ACCEPTED == hashCode) return STATUS_ACCEPTED;
else if (JulianKeyword::Instance()->ms_ATOM_DECLINED == hashCode) return STATUS_DECLINED;
else if (JulianKeyword::Instance()->ms_ATOM_TENTATIVE == hashCode) return STATUS_TENTATIVE;
else if (JulianKeyword::Instance()->ms_ATOM_COMPLETED == hashCode) return STATUS_COMPLETED;
else if (JulianKeyword::Instance()->ms_ATOM_INPROCESS == hashCode) return STATUS_INPROCESS;
else if (JulianKeyword::Instance()->ms_ATOM_DELEGATED == hashCode) return STATUS_DELEGATED;
else if (nsCalKeyword::Instance()->ms_ATOM_ACCEPTED == hashCode) return STATUS_ACCEPTED;
else if (nsCalKeyword::Instance()->ms_ATOM_DECLINED == hashCode) return STATUS_DECLINED;
else if (nsCalKeyword::Instance()->ms_ATOM_TENTATIVE == hashCode) return STATUS_TENTATIVE;
else if (nsCalKeyword::Instance()->ms_ATOM_COMPLETED == hashCode) return STATUS_COMPLETED;
else if (nsCalKeyword::Instance()->ms_ATOM_INPROCESS == hashCode) return STATUS_INPROCESS;
else if (nsCalKeyword::Instance()->ms_ATOM_DELEGATED == hashCode) return STATUS_DELEGATED;
else if (ICalProperty::IsXToken(sStatus)) return STATUS_XPARAMVAL;
else return STATUS_INVALID;
}
@ -1009,8 +1009,8 @@ Attendee::stringToRSVP(UnicodeString & sRSVP)
sRSVP.toUpper();
t_int32 hashCode = sRSVP.hashCode();
if (JulianKeyword::Instance()->ms_ATOM_FALSE == hashCode) return RSVP_FALSE;
else if (JulianKeyword::Instance()->ms_ATOM_TRUE == hashCode) return RSVP_TRUE;
if (nsCalKeyword::Instance()->ms_ATOM_FALSE == hashCode) return RSVP_FALSE;
else if (nsCalKeyword::Instance()->ms_ATOM_TRUE == hashCode) return RSVP_TRUE;
else return RSVP_INVALID;
}
@ -1022,9 +1022,9 @@ Attendee::stringToExpect(UnicodeString & sExpect)
sExpect.toUpper();
t_int32 hashCode = sExpect.hashCode();
if (JulianKeyword::Instance()->ms_ATOM_FYI == hashCode) return EXPECT_FYI;
else if (JulianKeyword::Instance()->ms_ATOM_REQUIRE == hashCode) return EXPECT_REQUIRE;
else if (JulianKeyword::Instance()->ms_ATOM_REQUEST == hashCode) return EXPECT_REQUEST;
if (nsCalKeyword::Instance()->ms_ATOM_FYI == hashCode) return EXPECT_FYI;
else if (nsCalKeyword::Instance()->ms_ATOM_REQUIRE == hashCode) return EXPECT_REQUIRE;
else if (nsCalKeyword::Instance()->ms_ATOM_REQUEST == hashCode) return EXPECT_REQUEST;
else return EXPECT_INVALID;
}
@ -1038,20 +1038,20 @@ Attendee::roleToString(Attendee::ROLE role, UnicodeString & out)
#if 0
/* Old Keywords */
case ROLE_ATTENDEE: out = JulianKeyword::Instance()->ms_sATTENDEE; break;
case ROLE_ORGANIZER: out = JulianKeyword::Instance()->ms_sORGANIZER; break;
case ROLE_OWNER: out = JulianKeyword::Instance()->ms_sOWNER; break;
case ROLE_DELEGATE: out = JulianKeyword::Instance()->ms_sDELEGATE; break;
case ROLE_ATTENDEE: out = nsCalKeyword::Instance()->ms_sATTENDEE; break;
case ROLE_ORGANIZER: out = nsCalKeyword::Instance()->ms_sORGANIZER; break;
case ROLE_OWNER: out = nsCalKeyword::Instance()->ms_sOWNER; break;
case ROLE_DELEGATE: out = nsCalKeyword::Instance()->ms_sDELEGATE; break;
#endif
case ROLE_CHAIR: out = JulianKeyword::Instance()->ms_sCHAIR; break;
case ROLE_REQ_PARTICIPANT: out = JulianKeyword::Instance()->ms_sREQ_PARTICIPANT; break;
case ROLE_OPT_PARTICIPANT: out = JulianKeyword::Instance()->ms_sOPT_PARTICIPANT; break;
case ROLE_NON_PARTICIPANT: out = JulianKeyword::Instance()->ms_sNON_PARTICIPANT; break;
case ROLE_XPARAMVAL: out = JulianKeyword::Instance()->ms_sXPARAMVAL; break;
case ROLE_CHAIR: out = nsCalKeyword::Instance()->ms_sCHAIR; break;
case ROLE_REQ_PARTICIPANT: out = nsCalKeyword::Instance()->ms_sREQ_PARTICIPANT; break;
case ROLE_OPT_PARTICIPANT: out = nsCalKeyword::Instance()->ms_sOPT_PARTICIPANT; break;
case ROLE_NON_PARTICIPANT: out = nsCalKeyword::Instance()->ms_sNON_PARTICIPANT; break;
case ROLE_XPARAMVAL: out = nsCalKeyword::Instance()->ms_sXPARAMVAL; break;
default:
// default return req participant
out = JulianKeyword::Instance()->ms_sREQ_PARTICIPANT;
out = nsCalKeyword::Instance()->ms_sREQ_PARTICIPANT;
break;
}
return out;
@ -1064,15 +1064,15 @@ Attendee::typeToString(Attendee::TYPE type, UnicodeString & out)
{
switch(type)
{
case TYPE_INDIVIDUAL: out = JulianKeyword::Instance()->ms_sINDIVIDUAL; break;
case TYPE_GROUP: out = JulianKeyword::Instance()->ms_sGROUP; break;
case TYPE_RESOURCE: out = JulianKeyword::Instance()->ms_sRESOURCE; break;
case TYPE_ROOM: out = JulianKeyword::Instance()->ms_sROOM; break;
case TYPE_UNKNOWN: out = JulianKeyword::Instance()->ms_sUNKNOWN; break;
case TYPE_XPARAMVAL: out = JulianKeyword::Instance()->ms_sXPARAMVAL; break;
case TYPE_INDIVIDUAL: out = nsCalKeyword::Instance()->ms_sINDIVIDUAL; break;
case TYPE_GROUP: out = nsCalKeyword::Instance()->ms_sGROUP; break;
case TYPE_RESOURCE: out = nsCalKeyword::Instance()->ms_sRESOURCE; break;
case TYPE_ROOM: out = nsCalKeyword::Instance()->ms_sROOM; break;
case TYPE_UNKNOWN: out = nsCalKeyword::Instance()->ms_sUNKNOWN; break;
case TYPE_XPARAMVAL: out = nsCalKeyword::Instance()->ms_sXPARAMVAL; break;
default:
// default return individual
out = JulianKeyword::Instance()->ms_sINDIVIDUAL;
out = nsCalKeyword::Instance()->ms_sINDIVIDUAL;
break;
}
return out;
@ -1085,17 +1085,17 @@ Attendee::statusToString(Attendee::STATUS status, UnicodeString & out)
{
switch(status)
{
case STATUS_NEEDSACTION: out = JulianKeyword::Instance()->ms_sNEEDSACTION; break;
case STATUS_ACCEPTED: out = JulianKeyword::Instance()->ms_sACCEPTED; break;
case STATUS_DECLINED: out = JulianKeyword::Instance()->ms_sDECLINED; break;
case STATUS_TENTATIVE: out = JulianKeyword::Instance()->ms_sTENTATIVE; break;
case STATUS_COMPLETED: out = JulianKeyword::Instance()->ms_sCOMPLETED; break;
case STATUS_DELEGATED: out = JulianKeyword::Instance()->ms_sDELEGATED; break;
case STATUS_INPROCESS: out = JulianKeyword::Instance()->ms_sINPROCESS; break;
case STATUS_XPARAMVAL: out = JulianKeyword::Instance()->ms_sXPARAMVAL; break;
case STATUS_NEEDSACTION: out = nsCalKeyword::Instance()->ms_sNEEDSACTION; break;
case STATUS_ACCEPTED: out = nsCalKeyword::Instance()->ms_sACCEPTED; break;
case STATUS_DECLINED: out = nsCalKeyword::Instance()->ms_sDECLINED; break;
case STATUS_TENTATIVE: out = nsCalKeyword::Instance()->ms_sTENTATIVE; break;
case STATUS_COMPLETED: out = nsCalKeyword::Instance()->ms_sCOMPLETED; break;
case STATUS_DELEGATED: out = nsCalKeyword::Instance()->ms_sDELEGATED; break;
case STATUS_INPROCESS: out = nsCalKeyword::Instance()->ms_sINPROCESS; break;
case STATUS_XPARAMVAL: out = nsCalKeyword::Instance()->ms_sXPARAMVAL; break;
default:
// default return needs-action
out = JulianKeyword::Instance()->ms_sNEEDSACTION;
out = nsCalKeyword::Instance()->ms_sNEEDSACTION;
break;
}
return out;
@ -1108,11 +1108,11 @@ Attendee::rsvpToString(Attendee::RSVP rsvp, UnicodeString & out)
{
switch(rsvp)
{
case RSVP_FALSE: out = JulianKeyword::Instance()->ms_sFALSE; break;
case RSVP_TRUE: out = JulianKeyword::Instance()->ms_sTRUE; break;
case RSVP_FALSE: out = nsCalKeyword::Instance()->ms_sFALSE; break;
case RSVP_TRUE: out = nsCalKeyword::Instance()->ms_sTRUE; break;
default:
// default return false
out = JulianKeyword::Instance()->ms_sFALSE;
out = nsCalKeyword::Instance()->ms_sFALSE;
break;
}
return out;
@ -1125,12 +1125,12 @@ Attendee::expectToString(Attendee::EXPECT expect, UnicodeString & out)
{
switch(expect)
{
case EXPECT_FYI: out = JulianKeyword::Instance()->ms_sFYI; break;
case EXPECT_REQUIRE: out = JulianKeyword::Instance()->ms_sREQUIRE; break;
case EXPECT_REQUEST: out = JulianKeyword::Instance()->ms_sREQUEST; break;
case EXPECT_FYI: out = nsCalKeyword::Instance()->ms_sFYI; break;
case EXPECT_REQUIRE: out = nsCalKeyword::Instance()->ms_sREQUIRE; break;
case EXPECT_REQUEST: out = nsCalKeyword::Instance()->ms_sREQUEST; break;
default:
// default return fyi
out = JulianKeyword::Instance()->ms_sFYI;
out = nsCalKeyword::Instance()->ms_sFYI;
break;
}
return out;

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

@ -168,12 +168,12 @@ DateTimeProperty::toICALString(UnicodeString & sProp,
// don't print the TZID and VALUE parameters
// thus it will only print in Z time and VALUE assumed to be DATETIME
if ((u.compareIgnoreCase(JulianKeyword::Instance()->ms_sTZID) != 0) &&
(u.compareIgnoreCase(JulianKeyword::Instance()->ms_sVALUE) != 0))
if ((u.compareIgnoreCase(nsCalKeyword::Instance()->ms_sTZID) != 0) &&
(u.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVALUE) != 0))
out += aName->toICALString(u);
}
out += ':'; out += sVal; out += JulianKeyword::Instance()->ms_sLINEBREAK;
out += ':'; out += sVal; out += nsCalKeyword::Instance()->ms_sLINEBREAK;
}
//if (FALSE) TRACE("out = %s\r\n", out.toCString(""));
return out;

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

@ -39,9 +39,9 @@ const t_int32 Freebusy::ms_iDEFAULT_STATUS= FB_STATUS_BUSY;
#endif
//UnicodeString Freebusy::m_strDefaultFmt = "\tTYPE= ^T STATUS = ^S ^P\r\n";
//const UnicodeString Freebusy::JulianKeyword::Instance()->ms_sDEFAULT_TYPE = JulianKeyword::Instance()->ms_sBUSY;
//const UnicodeString Freebusy::JulianKeyword::Instance()->ms_sDEFAULT_STATUS = JulianKeyword::Instance()->ms_sBUSY;
//static UnicodeString s_sComma = JulianKeyword::Instance()->ms_sCOMMA_SYMBOL;
//const UnicodeString Freebusy::nsCalKeyword::Instance()->ms_sDEFAULT_TYPE = nsCalKeyword::Instance()->ms_sBUSY;
//const UnicodeString Freebusy::nsCalKeyword::Instance()->ms_sDEFAULT_STATUS = nsCalKeyword::Instance()->ms_sBUSY;
//static UnicodeString s_sComma = nsCalKeyword::Instance()->ms_sCOMMA_SYMBOL;
//---------------------------------------------------------------------
@ -50,12 +50,12 @@ Freebusy::stringToType(UnicodeString & sType)
{
t_int32 hashCode = sType.hashCode();
if (JulianKeyword::Instance()->ms_ATOM_BUSY == hashCode) return FB_TYPE_BUSY;
else if (JulianKeyword::Instance()->ms_ATOM_FREE == hashCode) return FB_TYPE_FREE;
if (nsCalKeyword::Instance()->ms_ATOM_BUSY == hashCode) return FB_TYPE_BUSY;
else if (nsCalKeyword::Instance()->ms_ATOM_FREE == hashCode) return FB_TYPE_FREE;
// added 4-28-98
else if (JulianKeyword::Instance()->ms_ATOM_BUSY_UNAVAILABLE == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_BUSY_UNAVAILABLE == hashCode)
return FB_TYPE_BUSY_UNAVAILABLE;
else if (JulianKeyword::Instance()->ms_ATOM_BUSY_TENTATIVE == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_BUSY_TENTATIVE == hashCode)
return FB_TYPE_BUSY_TENTATIVE;
else if (ICalProperty::IsXToken(sType))
return FB_TYPE_XPARAMVAL;
@ -69,15 +69,15 @@ Freebusy::typeToString(Freebusy::FB_TYPE type, UnicodeString & out)
{
switch(type)
{
case FB_TYPE_BUSY: out = JulianKeyword::Instance()->ms_sBUSY; break;
case FB_TYPE_FREE: out = JulianKeyword::Instance()->ms_sFREE; break;
case FB_TYPE_BUSY: out = nsCalKeyword::Instance()->ms_sBUSY; break;
case FB_TYPE_FREE: out = nsCalKeyword::Instance()->ms_sFREE; break;
// added 4-28-98
case FB_TYPE_BUSY_UNAVAILABLE: out = JulianKeyword::Instance()->ms_sBUSY_UNAVAILABLE; break;
case FB_TYPE_BUSY_TENTATIVE: out = JulianKeyword::Instance()->ms_sBUSY_TENTATIVE; break;
case FB_TYPE_XPARAMVAL: out = JulianKeyword::Instance()->ms_sXPARAMVAL; break;
case FB_TYPE_BUSY_UNAVAILABLE: out = nsCalKeyword::Instance()->ms_sBUSY_UNAVAILABLE; break;
case FB_TYPE_BUSY_TENTATIVE: out = nsCalKeyword::Instance()->ms_sBUSY_TENTATIVE; break;
case FB_TYPE_XPARAMVAL: out = nsCalKeyword::Instance()->ms_sXPARAMVAL; break;
default:
// return default BUSY
out = JulianKeyword::Instance()->ms_sBUSY;
out = nsCalKeyword::Instance()->ms_sBUSY;
break;
}
return out;
@ -90,9 +90,9 @@ Freebusy::stringToStatus(UnicodeString & sStatus)
{
t_int32 hashCode = sStatus.hashCode();
if (JulianKeyword::Instance()->ms_ATOM_BUSY == hashCode) return FB_STATUS_BUSY;
else if (JulianKeyword::Instance()->ms_ATOM_UNAVAILABLE == hashCode) return FB_STATUS_UNAVAILABLE;
else if (JulianKeyword::Instance()->ms_ATOM_TENTATIVE == hashCode) return FB_STATUS_TENTATIVE;
if (nsCalKeyword::Instance()->ms_ATOM_BUSY == hashCode) return FB_STATUS_BUSY;
else if (nsCalKeyword::Instance()->ms_ATOM_UNAVAILABLE == hashCode) return FB_STATUS_UNAVAILABLE;
else if (nsCalKeyword::Instance()->ms_ATOM_TENTATIVE == hashCode) return FB_STATUS_TENTATIVE;
else return FB_STATUS_INVALID;
}
@ -103,12 +103,12 @@ Freebusy::statusToString(Freebusy::FB_STATUS status, UnicodeString & out)
{
switch(status)
{
case FB_STATUS_BUSY: out = JulianKeyword::Instance()->ms_sBUSY; break;
case FB_STATUS_UNAVAILABLE: out = JulianKeyword::Instance()->ms_sUNAVAILABLE; break;
case FB_STATUS_TENTATIVE: out = JulianKeyword::Instance()->ms_sTENTATIVE; break;
case FB_STATUS_BUSY: out = nsCalKeyword::Instance()->ms_sBUSY; break;
case FB_STATUS_UNAVAILABLE: out = nsCalKeyword::Instance()->ms_sUNAVAILABLE; break;
case FB_STATUS_TENTATIVE: out = nsCalKeyword::Instance()->ms_sTENTATIVE; break;
default:
// return default BUSY
out = JulianKeyword::Instance()->ms_sBUSY;
out = nsCalKeyword::Instance()->ms_sBUSY;
break;
}
return out;
@ -130,7 +130,7 @@ void Freebusy::parsePeriod(UnicodeString & s, JulianPtrArray * vTimeZones)
{
}
stMult = new UnicodeStringTokenizer(s,
JulianKeyword::Instance()->ms_sCOMMA_SYMBOL);
nsCalKeyword::Instance()->ms_sCOMMA_SYMBOL);
PR_ASSERT(stMult != 0);
if (stMult != 0)
{
@ -147,8 +147,8 @@ void Freebusy::parsePeriod(UnicodeString & s, JulianPtrArray * vTimeZones)
{
if (!p->isValid())
{
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iFreebusyPeriodInvalid,
JulianKeyword::Instance()->ms_sFREEBUSY, sPeriod, 200);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iFreebusyPeriodInvalid,
nsCalKeyword::Instance()->ms_sFREEBUSY, sPeriod, 200);
}
else
{
@ -168,47 +168,47 @@ void Freebusy::setParam(UnicodeString & paramName, UnicodeString & paramVal)
t_int32 i;
if (paramName.size() == 0)
{
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iInvalidParameterName,
JulianKeyword::Instance()->ms_sFREEBUSY, paramName, 200);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iInvalidParameterName,
nsCalKeyword::Instance()->ms_sFREEBUSY, paramName, 200);
}
else
{
t_int32 hashCode = paramName.hashCode();
if (JulianKeyword::Instance()->ms_ATOM_FBTYPE == hashCode)
if (nsCalKeyword::Instance()->ms_ATOM_FBTYPE == hashCode)
{
i = Freebusy::stringToType(paramVal);
if (i < 0)
{
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iInvalidParameterValue,
JulianKeyword::Instance()->ms_sFREEBUSY, paramName, paramVal, 200);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iInvalidParameterValue,
nsCalKeyword::Instance()->ms_sFREEBUSY, paramName, paramVal, 200);
}
else
{
if (getType() >= 0)
{
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iDuplicatedParameter,
JulianKeyword::Instance()->ms_sFREEBUSY, paramName, 100);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iDuplicatedParameter,
nsCalKeyword::Instance()->ms_sFREEBUSY, paramName, 100);
}
setType((Freebusy::FB_TYPE) i);
}
}
#if 0
else if (JulianKeyword::Instance()->ms_ATOM_BSTAT == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_BSTAT == hashCode)
{
i = Freebusy::stringToStatus(paramVal);
if (i < 0)
{
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iInvalidParameterValue,
JulianKeyword::Instance()->ms_sFREEBUSY, paramName, paramVal, 200);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iInvalidParameterValue,
nsCalKeyword::Instance()->ms_sFREEBUSY, paramName, paramVal, 200);
}
else
{
if (getStatus() >= 0)
{
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iDuplicatedParameter,
JulianKeyword::Instance()->ms_sFREEBUSY, paramName, 100);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iDuplicatedParameter,
nsCalKeyword::Instance()->ms_sFREEBUSY, paramName, 100);
}
setStatus((Freebusy::FB_STATUS) i);
}
@ -216,14 +216,14 @@ void Freebusy::setParam(UnicodeString & paramName, UnicodeString & paramVal)
#endif
else if (ICalProperty::IsXToken(paramName))
{
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iXTokenParamIgnored,
JulianKeyword::Instance()->ms_sFREEBUSY, paramName, 100);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iXTokenParamIgnored,
nsCalKeyword::Instance()->ms_sFREEBUSY, paramName, 100);
}
else
{
// NOTE: what about optional parameters?? THERE ARE NONE.
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iInvalidParameterName,
JulianKeyword::Instance()->ms_sFREEBUSY, paramName, 200);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iInvalidParameterName,
nsCalKeyword::Instance()->ms_sFREEBUSY, paramName, 200);
}
}
}
@ -507,7 +507,7 @@ t_bool Freebusy::isValid()
UnicodeString & Freebusy::toString(UnicodeString & out)
{
out = toString(JulianFormatString::Instance()->ms_FreebusyStrDefaultFmt, out);
out = toString(nsCalFormatString::Instance()->ms_FreebusyStrDefaultFmt, out);
return out;
}
@ -516,7 +516,7 @@ UnicodeString & Freebusy::toString(UnicodeString & out)
UnicodeString &
Freebusy::toString(UnicodeString & strFmt, UnicodeString & out)
{
if (strFmt.size() == 0 && JulianFormatString::Instance()->ms_FreebusyStrDefaultFmt.size() > 0)
if (strFmt.size() == 0 && nsCalFormatString::Instance()->ms_FreebusyStrDefaultFmt.size() > 0)
{
// if empty string, use default
return toString(out);
@ -610,12 +610,12 @@ UnicodeString & Freebusy::toICALString(UnicodeString & out)
UnicodeString s, u;
t_int32 i;
out = JulianKeyword::Instance()->ms_sFREEBUSY;
out = nsCalKeyword::Instance()->ms_sFREEBUSY;
s = typeToString(getType(), s);
out += ICalProperty::parameterToCalString(JulianKeyword::Instance()->ms_sFBTYPE, s, u);
out += ICalProperty::parameterToCalString(nsCalKeyword::Instance()->ms_sFBTYPE, s, u);
#if 0
s = statusToString(getStatus(), s);
out += ICalProperty::parameterToCalString(JulianKeyword::Instance()->ms_sBSTAT, s, u);
out += ICalProperty::parameterToCalString(nsCalKeyword::Instance()->ms_sBSTAT, s, u);
#endif
out += ":";
if (m_vPeriod != 0)
@ -627,13 +627,13 @@ UnicodeString & Freebusy::toICALString(UnicodeString & out)
if (i < m_vPeriod->GetSize() -1)
{
out += p->toICALString();
out += JulianKeyword::Instance()->ms_sCOMMA_SYMBOL;
out += nsCalKeyword::Instance()->ms_sCOMMA_SYMBOL;
}
else
out += p->toICALString();
}
}
out += JulianKeyword::Instance()->ms_sLINEBREAK;
out += nsCalKeyword::Instance()->ms_sLINEBREAK;
out = ICalProperty::multiLineFormat(out);
return out;
}

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

@ -38,86 +38,86 @@ JulianFunctionTable * JulianFunctionTable::m_Instance = 0;
JulianFunctionTable::JulianFunctionTable()
{
alarmStoreTable[0].set(JulianKeyword::Instance()->ms_ATOM_ACTION.hashCode(), &VAlarm::storeAction);
alarmStoreTable[1].set(JulianKeyword::Instance()->ms_ATOM_ACTION.hashCode(), &VAlarm::storeAction);
alarmStoreTable[2].set(JulianKeyword::Instance()->ms_ATOM_ATTACH.hashCode(), &VAlarm::storeAttach);
alarmStoreTable[3].set(JulianKeyword::Instance()->ms_ATOM_ATTENDEE.hashCode(), &VAlarm::storeAttendee);
alarmStoreTable[4].set(JulianKeyword::Instance()->ms_ATOM_DESCRIPTION.hashCode(), &VAlarm::storeDescription);
alarmStoreTable[5].set(JulianKeyword::Instance()->ms_ATOM_DURATION.hashCode(), &VAlarm::storeDuration);
alarmStoreTable[6].set(JulianKeyword::Instance()->ms_ATOM_REPEAT.hashCode(), &VAlarm::storeRepeat);
alarmStoreTable[7].set(JulianKeyword::Instance()->ms_ATOM_SUMMARY.hashCode(), &VAlarm::storeSummary);
alarmStoreTable[8].set(JulianKeyword::Instance()->ms_ATOM_TRIGGER.hashCode(), &VAlarm::storeTrigger);
alarmStoreTable[0].set(nsCalKeyword::Instance()->ms_ATOM_ACTION.hashCode(), &VAlarm::storeAction);
alarmStoreTable[1].set(nsCalKeyword::Instance()->ms_ATOM_ACTION.hashCode(), &VAlarm::storeAction);
alarmStoreTable[2].set(nsCalKeyword::Instance()->ms_ATOM_ATTACH.hashCode(), &VAlarm::storeAttach);
alarmStoreTable[3].set(nsCalKeyword::Instance()->ms_ATOM_ATTENDEE.hashCode(), &VAlarm::storeAttendee);
alarmStoreTable[4].set(nsCalKeyword::Instance()->ms_ATOM_DESCRIPTION.hashCode(), &VAlarm::storeDescription);
alarmStoreTable[5].set(nsCalKeyword::Instance()->ms_ATOM_DURATION.hashCode(), &VAlarm::storeDuration);
alarmStoreTable[6].set(nsCalKeyword::Instance()->ms_ATOM_REPEAT.hashCode(), &VAlarm::storeRepeat);
alarmStoreTable[7].set(nsCalKeyword::Instance()->ms_ATOM_SUMMARY.hashCode(), &VAlarm::storeSummary);
alarmStoreTable[8].set(nsCalKeyword::Instance()->ms_ATOM_TRIGGER.hashCode(), &VAlarm::storeTrigger);
alarmStoreTable[9].set(0,0);
tbeStoreTable[0].set(JulianKeyword::Instance()->ms_ATOM_ATTACH.hashCode(), &TimeBasedEvent::storeAttach);
tbeStoreTable[1].set(JulianKeyword::Instance()->ms_ATOM_ATTENDEE.hashCode(), &TimeBasedEvent::storeAttendees);
tbeStoreTable[2].set(JulianKeyword::Instance()->ms_ATOM_CATEGORIES.hashCode(), &TimeBasedEvent::storeCategories);
tbeStoreTable[3].set(JulianKeyword::Instance()->ms_ATOM_CLASS.hashCode(), &TimeBasedEvent::storeClass);
tbeStoreTable[4].set(JulianKeyword::Instance()->ms_ATOM_COMMENT.hashCode(), &TimeBasedEvent::storeComment);
tbeStoreTable[5].set(JulianKeyword::Instance()->ms_ATOM_CONTACT.hashCode(), &TimeBasedEvent::storeContact);
tbeStoreTable[6].set(JulianKeyword::Instance()->ms_ATOM_CREATED.hashCode(), &TimeBasedEvent::storeCreated);
tbeStoreTable[7].set(JulianKeyword::Instance()->ms_ATOM_DESCRIPTION.hashCode(), &TimeBasedEvent::storeDescription);
tbeStoreTable[8].set(JulianKeyword::Instance()->ms_ATOM_DTSTART.hashCode(), &TimeBasedEvent::storeDTStart);
tbeStoreTable[9].set(JulianKeyword::Instance()->ms_ATOM_DTSTAMP.hashCode(), &TimeBasedEvent::storeDTStamp);
tbeStoreTable[10].set(JulianKeyword::Instance()->ms_ATOM_EXDATE.hashCode(), &TimeBasedEvent::storeExDate);
tbeStoreTable[11].set(JulianKeyword::Instance()->ms_ATOM_EXRULE.hashCode(), &TimeBasedEvent::storeExRule);
tbeStoreTable[12].set(JulianKeyword::Instance()->ms_ATOM_LASTMODIFIED.hashCode(), &TimeBasedEvent::storeLastModified);
tbeStoreTable[13].set(JulianKeyword::Instance()->ms_ATOM_ORGANIZER.hashCode(), &TimeBasedEvent::storeOrganizer);
tbeStoreTable[14].set(JulianKeyword::Instance()->ms_ATOM_RDATE.hashCode(), &TimeBasedEvent::storeRDate);
tbeStoreTable[15].set(JulianKeyword::Instance()->ms_ATOM_RRULE.hashCode(), &TimeBasedEvent::storeRRule);
tbeStoreTable[16].set(JulianKeyword::Instance()->ms_ATOM_RECURRENCEID.hashCode(), &TimeBasedEvent::storeRecurrenceID);
tbeStoreTable[17].set(JulianKeyword::Instance()->ms_ATOM_RELATEDTO.hashCode(), &TimeBasedEvent::storeRelatedTo);
tbeStoreTable[18].set(JulianKeyword::Instance()->ms_ATOM_REQUESTSTATUS.hashCode(), &TimeBasedEvent::storeRequestStatus);
tbeStoreTable[19].set(JulianKeyword::Instance()->ms_ATOM_SEQUENCE.hashCode(), &TimeBasedEvent::storeSequence);
tbeStoreTable[20].set(JulianKeyword::Instance()->ms_ATOM_STATUS.hashCode(), &TimeBasedEvent::storeStatus);
tbeStoreTable[21].set(JulianKeyword::Instance()->ms_ATOM_SUMMARY.hashCode(), &TimeBasedEvent::storeSummary);
tbeStoreTable[22].set(JulianKeyword::Instance()->ms_ATOM_UID.hashCode(), &TimeBasedEvent::storeUID);
tbeStoreTable[23].set(JulianKeyword::Instance()->ms_ATOM_URL.hashCode(), &TimeBasedEvent::storeURL);
tbeStoreTable[0].set(nsCalKeyword::Instance()->ms_ATOM_ATTACH.hashCode(), &TimeBasedEvent::storeAttach);
tbeStoreTable[1].set(nsCalKeyword::Instance()->ms_ATOM_ATTENDEE.hashCode(), &TimeBasedEvent::storeAttendees);
tbeStoreTable[2].set(nsCalKeyword::Instance()->ms_ATOM_CATEGORIES.hashCode(), &TimeBasedEvent::storeCategories);
tbeStoreTable[3].set(nsCalKeyword::Instance()->ms_ATOM_CLASS.hashCode(), &TimeBasedEvent::storeClass);
tbeStoreTable[4].set(nsCalKeyword::Instance()->ms_ATOM_COMMENT.hashCode(), &TimeBasedEvent::storeComment);
tbeStoreTable[5].set(nsCalKeyword::Instance()->ms_ATOM_CONTACT.hashCode(), &TimeBasedEvent::storeContact);
tbeStoreTable[6].set(nsCalKeyword::Instance()->ms_ATOM_CREATED.hashCode(), &TimeBasedEvent::storeCreated);
tbeStoreTable[7].set(nsCalKeyword::Instance()->ms_ATOM_DESCRIPTION.hashCode(), &TimeBasedEvent::storeDescription);
tbeStoreTable[8].set(nsCalKeyword::Instance()->ms_ATOM_DTSTART.hashCode(), &TimeBasedEvent::storeDTStart);
tbeStoreTable[9].set(nsCalKeyword::Instance()->ms_ATOM_DTSTAMP.hashCode(), &TimeBasedEvent::storeDTStamp);
tbeStoreTable[10].set(nsCalKeyword::Instance()->ms_ATOM_EXDATE.hashCode(), &TimeBasedEvent::storeExDate);
tbeStoreTable[11].set(nsCalKeyword::Instance()->ms_ATOM_EXRULE.hashCode(), &TimeBasedEvent::storeExRule);
tbeStoreTable[12].set(nsCalKeyword::Instance()->ms_ATOM_LASTMODIFIED.hashCode(), &TimeBasedEvent::storeLastModified);
tbeStoreTable[13].set(nsCalKeyword::Instance()->ms_ATOM_ORGANIZER.hashCode(), &TimeBasedEvent::storeOrganizer);
tbeStoreTable[14].set(nsCalKeyword::Instance()->ms_ATOM_RDATE.hashCode(), &TimeBasedEvent::storeRDate);
tbeStoreTable[15].set(nsCalKeyword::Instance()->ms_ATOM_RRULE.hashCode(), &TimeBasedEvent::storeRRule);
tbeStoreTable[16].set(nsCalKeyword::Instance()->ms_ATOM_RECURRENCEID.hashCode(), &TimeBasedEvent::storeRecurrenceID);
tbeStoreTable[17].set(nsCalKeyword::Instance()->ms_ATOM_RELATEDTO.hashCode(), &TimeBasedEvent::storeRelatedTo);
tbeStoreTable[18].set(nsCalKeyword::Instance()->ms_ATOM_REQUESTSTATUS.hashCode(), &TimeBasedEvent::storeRequestStatus);
tbeStoreTable[19].set(nsCalKeyword::Instance()->ms_ATOM_SEQUENCE.hashCode(), &TimeBasedEvent::storeSequence);
tbeStoreTable[20].set(nsCalKeyword::Instance()->ms_ATOM_STATUS.hashCode(), &TimeBasedEvent::storeStatus);
tbeStoreTable[21].set(nsCalKeyword::Instance()->ms_ATOM_SUMMARY.hashCode(), &TimeBasedEvent::storeSummary);
tbeStoreTable[22].set(nsCalKeyword::Instance()->ms_ATOM_UID.hashCode(), &TimeBasedEvent::storeUID);
tbeStoreTable[23].set(nsCalKeyword::Instance()->ms_ATOM_URL.hashCode(), &TimeBasedEvent::storeURL);
tbeStoreTable[24].set(0,0);
tzStoreTable[0].set(JulianKeyword::Instance()->ms_ATOM_COMMENT.hashCode(), &TZPart::storeComment);
tzStoreTable[1].set(JulianKeyword::Instance()->ms_ATOM_DTSTART.hashCode(), &TZPart::storeDTStart);
tzStoreTable[2].set(JulianKeyword::Instance()->ms_ATOM_RDATE.hashCode(), &TZPart::storeRDate);
tzStoreTable[3].set(JulianKeyword::Instance()->ms_ATOM_RRULE.hashCode(), &TZPart::storeRRule);
tzStoreTable[4].set(JulianKeyword::Instance()->ms_ATOM_TZNAME.hashCode(), &TZPart::storeTZName);
tzStoreTable[5].set(JulianKeyword::Instance()->ms_ATOM_TZOFFSETTO.hashCode(), &TZPart::storeTZOffsetTo);
tzStoreTable[6].set(JulianKeyword::Instance()->ms_ATOM_TZOFFSETFROM.hashCode(), &TZPart::storeTZOffsetFrom);
tzStoreTable[0].set(nsCalKeyword::Instance()->ms_ATOM_COMMENT.hashCode(), &TZPart::storeComment);
tzStoreTable[1].set(nsCalKeyword::Instance()->ms_ATOM_DTSTART.hashCode(), &TZPart::storeDTStart);
tzStoreTable[2].set(nsCalKeyword::Instance()->ms_ATOM_RDATE.hashCode(), &TZPart::storeRDate);
tzStoreTable[3].set(nsCalKeyword::Instance()->ms_ATOM_RRULE.hashCode(), &TZPart::storeRRule);
tzStoreTable[4].set(nsCalKeyword::Instance()->ms_ATOM_TZNAME.hashCode(), &TZPart::storeTZName);
tzStoreTable[5].set(nsCalKeyword::Instance()->ms_ATOM_TZOFFSETTO.hashCode(), &TZPart::storeTZOffsetTo);
tzStoreTable[6].set(nsCalKeyword::Instance()->ms_ATOM_TZOFFSETFROM.hashCode(), &TZPart::storeTZOffsetFrom);
tzStoreTable[7].set(0,0);
veStoreTable[0].set(JulianKeyword::Instance()->ms_ATOM_DTEND.hashCode(), &VEvent::storeDTEnd);
veStoreTable[1].set(JulianKeyword::Instance()->ms_ATOM_DURATION.hashCode(), &VEvent::storeDuration);
veStoreTable[2].set(JulianKeyword::Instance()->ms_ATOM_GEO.hashCode(), &VEvent::storeGEO);
veStoreTable[3].set(JulianKeyword::Instance()->ms_ATOM_LOCATION.hashCode(), &VEvent::storeLocation);
veStoreTable[4].set(JulianKeyword::Instance()->ms_ATOM_PRIORITY.hashCode(), &VEvent::storePriority);
veStoreTable[5].set(JulianKeyword::Instance()->ms_ATOM_RESOURCES.hashCode(), &VEvent::storeResources);
veStoreTable[6].set(JulianKeyword::Instance()->ms_ATOM_TRANSP.hashCode(), &VEvent::storeTransp);
veStoreTable[0].set(nsCalKeyword::Instance()->ms_ATOM_DTEND.hashCode(), &VEvent::storeDTEnd);
veStoreTable[1].set(nsCalKeyword::Instance()->ms_ATOM_DURATION.hashCode(), &VEvent::storeDuration);
veStoreTable[2].set(nsCalKeyword::Instance()->ms_ATOM_GEO.hashCode(), &VEvent::storeGEO);
veStoreTable[3].set(nsCalKeyword::Instance()->ms_ATOM_LOCATION.hashCode(), &VEvent::storeLocation);
veStoreTable[4].set(nsCalKeyword::Instance()->ms_ATOM_PRIORITY.hashCode(), &VEvent::storePriority);
veStoreTable[5].set(nsCalKeyword::Instance()->ms_ATOM_RESOURCES.hashCode(), &VEvent::storeResources);
veStoreTable[6].set(nsCalKeyword::Instance()->ms_ATOM_TRANSP.hashCode(), &VEvent::storeTransp);
veStoreTable[7].set(0,0);
vfStoreTable[0].set(JulianKeyword::Instance()->ms_ATOM_ATTENDEE.hashCode(), &VFreebusy::storeAttendees);
vfStoreTable[1].set(JulianKeyword::Instance()->ms_ATOM_COMMENT.hashCode(), &VFreebusy::storeComment);
vfStoreTable[2].set(JulianKeyword::Instance()->ms_ATOM_CONTACT.hashCode(), &VFreebusy::storeContact);
/*vfStoreTable[3].set(JulianKeyword::Instance()->ms_ATOM_CREATED.hashCode(), &VFreebusy::storeCreated);*/
vfStoreTable[3].set(JulianKeyword::Instance()->ms_ATOM_DURATION.hashCode(), &VFreebusy::storeDuration);
vfStoreTable[4].set(JulianKeyword::Instance()->ms_ATOM_DTEND.hashCode(), &VFreebusy::storeDTEnd);
vfStoreTable[5].set(JulianKeyword::Instance()->ms_ATOM_DTSTART.hashCode(), &VFreebusy::storeDTStart);
vfStoreTable[6].set(JulianKeyword::Instance()->ms_ATOM_DTSTAMP.hashCode(), &VFreebusy::storeDTStamp);
vfStoreTable[7].set(JulianKeyword::Instance()->ms_ATOM_FREEBUSY.hashCode(), &VFreebusy::storeFreebusy);
vfStoreTable[8].set(JulianKeyword::Instance()->ms_ATOM_LASTMODIFIED.hashCode(), &VFreebusy::storeLastModified);
vfStoreTable[9].set(JulianKeyword::Instance()->ms_ATOM_ORGANIZER.hashCode(), &VFreebusy::storeOrganizer);
vfStoreTable[10].set(JulianKeyword::Instance()->ms_ATOM_REQUESTSTATUS.hashCode(), &VFreebusy::storeRequestStatus);
vfStoreTable[11].set(JulianKeyword::Instance()->ms_ATOM_SEQUENCE.hashCode(), &VFreebusy::storeSequence);
vfStoreTable[12].set(JulianKeyword::Instance()->ms_ATOM_UID.hashCode(), &VFreebusy::storeUID);
vfStoreTable[13].set(JulianKeyword::Instance()->ms_ATOM_URL.hashCode(), &VFreebusy::storeURL);
vfStoreTable[0].set(nsCalKeyword::Instance()->ms_ATOM_ATTENDEE.hashCode(), &VFreebusy::storeAttendees);
vfStoreTable[1].set(nsCalKeyword::Instance()->ms_ATOM_COMMENT.hashCode(), &VFreebusy::storeComment);
vfStoreTable[2].set(nsCalKeyword::Instance()->ms_ATOM_CONTACT.hashCode(), &VFreebusy::storeContact);
/*vfStoreTable[3].set(nsCalKeyword::Instance()->ms_ATOM_CREATED.hashCode(), &VFreebusy::storeCreated);*/
vfStoreTable[3].set(nsCalKeyword::Instance()->ms_ATOM_DURATION.hashCode(), &VFreebusy::storeDuration);
vfStoreTable[4].set(nsCalKeyword::Instance()->ms_ATOM_DTEND.hashCode(), &VFreebusy::storeDTEnd);
vfStoreTable[5].set(nsCalKeyword::Instance()->ms_ATOM_DTSTART.hashCode(), &VFreebusy::storeDTStart);
vfStoreTable[6].set(nsCalKeyword::Instance()->ms_ATOM_DTSTAMP.hashCode(), &VFreebusy::storeDTStamp);
vfStoreTable[7].set(nsCalKeyword::Instance()->ms_ATOM_FREEBUSY.hashCode(), &VFreebusy::storeFreebusy);
vfStoreTable[8].set(nsCalKeyword::Instance()->ms_ATOM_LASTMODIFIED.hashCode(), &VFreebusy::storeLastModified);
vfStoreTable[9].set(nsCalKeyword::Instance()->ms_ATOM_ORGANIZER.hashCode(), &VFreebusy::storeOrganizer);
vfStoreTable[10].set(nsCalKeyword::Instance()->ms_ATOM_REQUESTSTATUS.hashCode(), &VFreebusy::storeRequestStatus);
vfStoreTable[11].set(nsCalKeyword::Instance()->ms_ATOM_SEQUENCE.hashCode(), &VFreebusy::storeSequence);
vfStoreTable[12].set(nsCalKeyword::Instance()->ms_ATOM_UID.hashCode(), &VFreebusy::storeUID);
vfStoreTable[13].set(nsCalKeyword::Instance()->ms_ATOM_URL.hashCode(), &VFreebusy::storeURL);
vfStoreTable[14].set(0,0);
vtStoreTable[0].set(JulianKeyword::Instance()->ms_ATOM_COMPLETED.hashCode(), &VTodo::storeCompleted);
vtStoreTable[1].set(JulianKeyword::Instance()->ms_ATOM_DUE.hashCode(), &VTodo::storeDue);
vtStoreTable[2].set(JulianKeyword::Instance()->ms_ATOM_DURATION.hashCode(), &VTodo::storeDuration);
vtStoreTable[3].set(JulianKeyword::Instance()->ms_ATOM_GEO.hashCode(), &VTodo::storeGEO);
vtStoreTable[4].set(JulianKeyword::Instance()->ms_ATOM_LOCATION.hashCode(), &VTodo::storeLocation);
vtStoreTable[5].set(JulianKeyword::Instance()->ms_ATOM_PERCENTCOMPLETE.hashCode(), &VTodo::storePercentComplete);
vtStoreTable[6].set(JulianKeyword::Instance()->ms_ATOM_PRIORITY.hashCode(), &VTodo::storePriority);
vtStoreTable[7].set(JulianKeyword::Instance()->ms_ATOM_RESOURCES.hashCode(), &VTodo::storeResources);
vtStoreTable[0].set(nsCalKeyword::Instance()->ms_ATOM_COMPLETED.hashCode(), &VTodo::storeCompleted);
vtStoreTable[1].set(nsCalKeyword::Instance()->ms_ATOM_DUE.hashCode(), &VTodo::storeDue);
vtStoreTable[2].set(nsCalKeyword::Instance()->ms_ATOM_DURATION.hashCode(), &VTodo::storeDuration);
vtStoreTable[3].set(nsCalKeyword::Instance()->ms_ATOM_GEO.hashCode(), &VTodo::storeGEO);
vtStoreTable[4].set(nsCalKeyword::Instance()->ms_ATOM_LOCATION.hashCode(), &VTodo::storeLocation);
vtStoreTable[5].set(nsCalKeyword::Instance()->ms_ATOM_PERCENTCOMPLETE.hashCode(), &VTodo::storePercentComplete);
vtStoreTable[6].set(nsCalKeyword::Instance()->ms_ATOM_PRIORITY.hashCode(), &VTodo::storePriority);
vtStoreTable[7].set(nsCalKeyword::Instance()->ms_ATOM_RESOURCES.hashCode(), &VTodo::storeResources);
vtStoreTable[8].set(0,0);
}

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

@ -109,9 +109,9 @@ ICalComponent::format(UnicodeString & sComponentName,
t_bool delegateRequest)
{
UnicodeString s, into;
s = JulianKeyword::Instance()->ms_sBEGIN_WITH_COLON;
s = nsCalKeyword::Instance()->ms_sBEGIN_WITH_COLON;
s += sComponentName;
s += JulianKeyword::Instance()->ms_sLINEBREAK;
s += nsCalKeyword::Instance()->ms_sLINEBREAK;
t_int32 i,j;
@ -157,9 +157,9 @@ ICalComponent::format(UnicodeString & sComponentName,
break;
}
}
s += JulianKeyword::Instance()->ms_sEND_WITH_COLON;
s += nsCalKeyword::Instance()->ms_sEND_WITH_COLON;
s += sComponentName;
s += JulianKeyword::Instance()->ms_sLINEBREAK;
s += nsCalKeyword::Instance()->ms_sLINEBREAK;
return s;
}// end
@ -170,13 +170,13 @@ ICalComponent::componentToString(ICAL_COMPONENT ic)
{
switch (ic)
{
case ICAL_COMPONENT_VEVENT: return JulianKeyword::Instance()->ms_sVEVENT;
case ICAL_COMPONENT_VTODO: return JulianKeyword::Instance()->ms_sVTODO;
case ICAL_COMPONENT_VJOURNAL: return JulianKeyword::Instance()->ms_sVJOURNAL;
case ICAL_COMPONENT_VFREEBUSY: return JulianKeyword::Instance()->ms_sVFREEBUSY;
case ICAL_COMPONENT_VTIMEZONE: return JulianKeyword::Instance()->ms_sVTIMEZONE;
case ICAL_COMPONENT_VALARM: return JulianKeyword::Instance()->ms_sVALARM;
case ICAL_COMPONENT_TZPART: return JulianKeyword::Instance()->ms_sTZPART;
case ICAL_COMPONENT_VEVENT: return nsCalKeyword::Instance()->ms_sVEVENT;
case ICAL_COMPONENT_VTODO: return nsCalKeyword::Instance()->ms_sVTODO;
case ICAL_COMPONENT_VJOURNAL: return nsCalKeyword::Instance()->ms_sVJOURNAL;
case ICAL_COMPONENT_VFREEBUSY: return nsCalKeyword::Instance()->ms_sVFREEBUSY;
case ICAL_COMPONENT_VTIMEZONE: return nsCalKeyword::Instance()->ms_sVTIMEZONE;
case ICAL_COMPONENT_VALARM: return nsCalKeyword::Instance()->ms_sVALARM;
case ICAL_COMPONENT_TZPART: return nsCalKeyword::Instance()->ms_sTZPART;
default:
return "";
}
@ -191,13 +191,13 @@ ICalComponent::stringToComponent(UnicodeString & s, t_bool & error)
t_int32 hashCode = s.hashCode();
error = FALSE;
if (JulianKeyword::Instance()->ms_ATOM_VEVENT == hashCode) return ICAL_COMPONENT_VEVENT;
else if (JulianKeyword::Instance()->ms_ATOM_VTODO == hashCode) return ICAL_COMPONENT_VTODO;
else if (JulianKeyword::Instance()->ms_ATOM_VJOURNAL == hashCode) return ICAL_COMPONENT_VJOURNAL;
else if (JulianKeyword::Instance()->ms_ATOM_VFREEBUSY == hashCode) return ICAL_COMPONENT_VFREEBUSY;
else if (JulianKeyword::Instance()->ms_ATOM_VTIMEZONE == hashCode) return ICAL_COMPONENT_VTIMEZONE;
else if (JulianKeyword::Instance()->ms_ATOM_VALARM == hashCode) return ICAL_COMPONENT_VALARM;
else if (JulianKeyword::Instance()->ms_ATOM_TZPART == hashCode) return ICAL_COMPONENT_TZPART;
if (nsCalKeyword::Instance()->ms_ATOM_VEVENT == hashCode) return ICAL_COMPONENT_VEVENT;
else if (nsCalKeyword::Instance()->ms_ATOM_VTODO == hashCode) return ICAL_COMPONENT_VTODO;
else if (nsCalKeyword::Instance()->ms_ATOM_VJOURNAL == hashCode) return ICAL_COMPONENT_VJOURNAL;
else if (nsCalKeyword::Instance()->ms_ATOM_VFREEBUSY == hashCode) return ICAL_COMPONENT_VFREEBUSY;
else if (nsCalKeyword::Instance()->ms_ATOM_VTIMEZONE == hashCode) return ICAL_COMPONENT_VTIMEZONE;
else if (nsCalKeyword::Instance()->ms_ATOM_VALARM == hashCode) return ICAL_COMPONENT_VALARM;
else if (nsCalKeyword::Instance()->ms_ATOM_TZPART == hashCode) return ICAL_COMPONENT_TZPART;
else
{
error = TRUE;
@ -215,51 +215,51 @@ t_bool ICalComponent::propertyNameToKeyLetter(UnicodeString & propertyName,
t_bool retStatus = TRUE;
outLetter = ' ';
if (JulianKeyword::Instance()->ms_ATOM_ATTENDEE == hashCode) outLetter = ms_cAttendees;
else if (JulianKeyword::Instance()->ms_ATOM_ATTACH == hashCode) outLetter = ms_cAttach;
else if (JulianKeyword::Instance()->ms_ATOM_CATEGORIES == hashCode) outLetter = ms_cCategories;
else if (JulianKeyword::Instance()->ms_ATOM_CLASS == hashCode) outLetter = ms_cClass;
else if (JulianKeyword::Instance()->ms_ATOM_COMMENT == hashCode) outLetter = ms_cComment;
else if (JulianKeyword::Instance()->ms_ATOM_COMPLETED == hashCode) outLetter = ms_cCompleted;
else if (JulianKeyword::Instance()->ms_ATOM_CONTACT == hashCode) outLetter = ms_cContact;
else if (JulianKeyword::Instance()->ms_ATOM_CREATED == hashCode) outLetter = ms_cCreated;
else if (JulianKeyword::Instance()->ms_ATOM_DTEND == hashCode) outLetter = ms_cDTEnd;
else if (JulianKeyword::Instance()->ms_ATOM_DTSTART == hashCode) outLetter = ms_cDTStart;
else if (JulianKeyword::Instance()->ms_ATOM_DTSTAMP == hashCode) outLetter = ms_cDTStamp;
else if (JulianKeyword::Instance()->ms_ATOM_DESCRIPTION == hashCode) outLetter = ms_cDescription;
else if (JulianKeyword::Instance()->ms_ATOM_DUE == hashCode) outLetter = ms_cDue;
else if (JulianKeyword::Instance()->ms_ATOM_DURATION == hashCode) outLetter = ms_cDuration;
else if (JulianKeyword::Instance()->ms_ATOM_EXDATE == hashCode) outLetter = ms_cExDate;
else if (JulianKeyword::Instance()->ms_ATOM_EXRULE == hashCode) outLetter = ms_cExRule;
else if (JulianKeyword::Instance()->ms_ATOM_FREEBUSY == hashCode) outLetter = ms_cFreebusy;
else if (JulianKeyword::Instance()->ms_ATOM_GEO == hashCode) outLetter = ms_cGEO;
else if (JulianKeyword::Instance()->ms_ATOM_LASTMODIFIED == hashCode) outLetter = ms_cLastModified;
else if (JulianKeyword::Instance()->ms_ATOM_LOCATION == hashCode) outLetter = ms_cLocation;
else if (JulianKeyword::Instance()->ms_ATOM_ORGANIZER == hashCode) outLetter = ms_cOrganizer;
else if (JulianKeyword::Instance()->ms_ATOM_PERCENTCOMPLETE == hashCode) outLetter = ms_cPercentComplete;
else if (JulianKeyword::Instance()->ms_ATOM_PRIORITY == hashCode) outLetter = ms_cPriority;
else if (JulianKeyword::Instance()->ms_ATOM_RDATE == hashCode) outLetter = ms_cRDate;
else if (JulianKeyword::Instance()->ms_ATOM_RRULE == hashCode) outLetter = ms_cRRule;
else if (JulianKeyword::Instance()->ms_ATOM_RECURRENCEID == hashCode) outLetter = ms_cRecurrenceID;
else if (JulianKeyword::Instance()->ms_ATOM_RELATEDTO == hashCode) outLetter = ms_cRelatedTo;
else if (JulianKeyword::Instance()->ms_ATOM_REPEAT == hashCode) outLetter = ms_cRepeat;
else if (JulianKeyword::Instance()->ms_ATOM_REQUESTSTATUS == hashCode) outLetter = ms_cRequestStatus;
else if (JulianKeyword::Instance()->ms_ATOM_RESOURCES == hashCode) outLetter = ms_cResources;
else if (JulianKeyword::Instance()->ms_ATOM_SEQUENCE == hashCode) outLetter = ms_cSequence;
else if (JulianKeyword::Instance()->ms_ATOM_STATUS == hashCode) outLetter = ms_cStatus;
else if (JulianKeyword::Instance()->ms_ATOM_SUMMARY == hashCode) outLetter = ms_cSummary;
else if (JulianKeyword::Instance()->ms_ATOM_TRANSP == hashCode) outLetter = ms_cTransp;
//else if (JulianKeyword::Instance()->ms_ATOM_TRIGGER == hashCode) outLetter = ms_cTrigger;
else if (JulianKeyword::Instance()->ms_ATOM_UID == hashCode) outLetter = ms_cUID;
else if (JulianKeyword::Instance()->ms_ATOM_URL == hashCode) outLetter = ms_cURL;
//else if (JulianKeyword::Instance()->ms_ATOM_TZOFFSET == hashCode) outLetter = ms_cTZOffset;
else if (JulianKeyword::Instance()->ms_ATOM_TZOFFSETTO == hashCode) outLetter = ms_cTZOffsetTo;
else if (JulianKeyword::Instance()->ms_ATOM_TZOFFSETFROM == hashCode) outLetter = ms_cTZOffsetFrom;
else if (JulianKeyword::Instance()->ms_ATOM_TZNAME == hashCode) outLetter = ms_cTZName;
//else if (JulianKeyword::Instance()->ms_ATOM_DAYLIGHT == hashCode) outLetter = ms_cDayLight;
//else if (JulianKeyword::Instance()->ms_ATOM_STANDARD == hashCode) outLetter = ms_cStandard;
else if (JulianKeyword::Instance()->ms_ATOM_TZURL == hashCode) outLetter = ms_cTZURL;
else if (JulianKeyword::Instance()->ms_ATOM_TZID == hashCode) outLetter = ms_cTZID;
if (nsCalKeyword::Instance()->ms_ATOM_ATTENDEE == hashCode) outLetter = ms_cAttendees;
else if (nsCalKeyword::Instance()->ms_ATOM_ATTACH == hashCode) outLetter = ms_cAttach;
else if (nsCalKeyword::Instance()->ms_ATOM_CATEGORIES == hashCode) outLetter = ms_cCategories;
else if (nsCalKeyword::Instance()->ms_ATOM_CLASS == hashCode) outLetter = ms_cClass;
else if (nsCalKeyword::Instance()->ms_ATOM_COMMENT == hashCode) outLetter = ms_cComment;
else if (nsCalKeyword::Instance()->ms_ATOM_COMPLETED == hashCode) outLetter = ms_cCompleted;
else if (nsCalKeyword::Instance()->ms_ATOM_CONTACT == hashCode) outLetter = ms_cContact;
else if (nsCalKeyword::Instance()->ms_ATOM_CREATED == hashCode) outLetter = ms_cCreated;
else if (nsCalKeyword::Instance()->ms_ATOM_DTEND == hashCode) outLetter = ms_cDTEnd;
else if (nsCalKeyword::Instance()->ms_ATOM_DTSTART == hashCode) outLetter = ms_cDTStart;
else if (nsCalKeyword::Instance()->ms_ATOM_DTSTAMP == hashCode) outLetter = ms_cDTStamp;
else if (nsCalKeyword::Instance()->ms_ATOM_DESCRIPTION == hashCode) outLetter = ms_cDescription;
else if (nsCalKeyword::Instance()->ms_ATOM_DUE == hashCode) outLetter = ms_cDue;
else if (nsCalKeyword::Instance()->ms_ATOM_DURATION == hashCode) outLetter = ms_cDuration;
else if (nsCalKeyword::Instance()->ms_ATOM_EXDATE == hashCode) outLetter = ms_cExDate;
else if (nsCalKeyword::Instance()->ms_ATOM_EXRULE == hashCode) outLetter = ms_cExRule;
else if (nsCalKeyword::Instance()->ms_ATOM_FREEBUSY == hashCode) outLetter = ms_cFreebusy;
else if (nsCalKeyword::Instance()->ms_ATOM_GEO == hashCode) outLetter = ms_cGEO;
else if (nsCalKeyword::Instance()->ms_ATOM_LASTMODIFIED == hashCode) outLetter = ms_cLastModified;
else if (nsCalKeyword::Instance()->ms_ATOM_LOCATION == hashCode) outLetter = ms_cLocation;
else if (nsCalKeyword::Instance()->ms_ATOM_ORGANIZER == hashCode) outLetter = ms_cOrganizer;
else if (nsCalKeyword::Instance()->ms_ATOM_PERCENTCOMPLETE == hashCode) outLetter = ms_cPercentComplete;
else if (nsCalKeyword::Instance()->ms_ATOM_PRIORITY == hashCode) outLetter = ms_cPriority;
else if (nsCalKeyword::Instance()->ms_ATOM_RDATE == hashCode) outLetter = ms_cRDate;
else if (nsCalKeyword::Instance()->ms_ATOM_RRULE == hashCode) outLetter = ms_cRRule;
else if (nsCalKeyword::Instance()->ms_ATOM_RECURRENCEID == hashCode) outLetter = ms_cRecurrenceID;
else if (nsCalKeyword::Instance()->ms_ATOM_RELATEDTO == hashCode) outLetter = ms_cRelatedTo;
else if (nsCalKeyword::Instance()->ms_ATOM_REPEAT == hashCode) outLetter = ms_cRepeat;
else if (nsCalKeyword::Instance()->ms_ATOM_REQUESTSTATUS == hashCode) outLetter = ms_cRequestStatus;
else if (nsCalKeyword::Instance()->ms_ATOM_RESOURCES == hashCode) outLetter = ms_cResources;
else if (nsCalKeyword::Instance()->ms_ATOM_SEQUENCE == hashCode) outLetter = ms_cSequence;
else if (nsCalKeyword::Instance()->ms_ATOM_STATUS == hashCode) outLetter = ms_cStatus;
else if (nsCalKeyword::Instance()->ms_ATOM_SUMMARY == hashCode) outLetter = ms_cSummary;
else if (nsCalKeyword::Instance()->ms_ATOM_TRANSP == hashCode) outLetter = ms_cTransp;
//else if (nsCalKeyword::Instance()->ms_ATOM_TRIGGER == hashCode) outLetter = ms_cTrigger;
else if (nsCalKeyword::Instance()->ms_ATOM_UID == hashCode) outLetter = ms_cUID;
else if (nsCalKeyword::Instance()->ms_ATOM_URL == hashCode) outLetter = ms_cURL;
//else if (nsCalKeyword::Instance()->ms_ATOM_TZOFFSET == hashCode) outLetter = ms_cTZOffset;
else if (nsCalKeyword::Instance()->ms_ATOM_TZOFFSETTO == hashCode) outLetter = ms_cTZOffsetTo;
else if (nsCalKeyword::Instance()->ms_ATOM_TZOFFSETFROM == hashCode) outLetter = ms_cTZOffsetFrom;
else if (nsCalKeyword::Instance()->ms_ATOM_TZNAME == hashCode) outLetter = ms_cTZName;
//else if (nsCalKeyword::Instance()->ms_ATOM_DAYLIGHT == hashCode) outLetter = ms_cDayLight;
//else if (nsCalKeyword::Instance()->ms_ATOM_STANDARD == hashCode) outLetter = ms_cStandard;
else if (nsCalKeyword::Instance()->ms_ATOM_TZURL == hashCode) outLetter = ms_cTZURL;
else if (nsCalKeyword::Instance()->ms_ATOM_TZID == hashCode) outLetter = ms_cTZID;
else
{
retStatus = FALSE;

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

@ -91,7 +91,7 @@ ICalParameter::getParameterValue(UnicodeString & retValue) const
UnicodeString &
ICalParameter::toICALString(UnicodeString & result) const
{
result = JulianKeyword::Instance()->ms_sSEMICOLON_SYMBOL;
result = nsCalKeyword::Instance()->ms_sSEMICOLON_SYMBOL;
result += m_ParameterName;
result += '=';
result += m_ParameterValue;

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

@ -45,27 +45,27 @@ ICalComponentFactory::Make(UnicodeString & name, JLog * initLog)
t_int32 hashCode = name.hashCode();
if (JulianKeyword::Instance()->ms_ATOM_VEVENT == hashCode)
if (nsCalKeyword::Instance()->ms_ATOM_VEVENT == hashCode)
{
ret = (ICalComponent *) new VEvent(initLog);
PR_ASSERT(ret != 0);
}
else if (JulianKeyword::Instance()->ms_ATOM_VTODO == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_VTODO == hashCode)
{
ret = (ICalComponent *) new VTodo(initLog);
PR_ASSERT(ret != 0);
}
else if (JulianKeyword::Instance()->ms_ATOM_VJOURNAL == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_VJOURNAL == hashCode)
{
ret = (ICalComponent *) new VJournal(initLog);
PR_ASSERT(ret != 0);
}
else if (JulianKeyword::Instance()->ms_ATOM_VFREEBUSY == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_VFREEBUSY == hashCode)
{
ret = (ICalComponent *) new VFreebusy(initLog);
PR_ASSERT(ret != 0);
}
else if (JulianKeyword::Instance()->ms_ATOM_VTIMEZONE == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_VTIMEZONE == hashCode)
{
ret = (ICalComponent *) new VTimeZone(initLog);
PR_ASSERT(ret != 0);

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

@ -65,15 +65,15 @@ JulianParser::JulianParser(ICalCAPIReader * reader,
nsCalUtility::MimeEncoding
JulianParser::stringToEncodingType(UnicodeString & propVal)
{
if (propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_s7bit) == 0)
if (propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_s7bit) == 0)
{
return nsCalUtility::MimeEncoding_7bit;
}
else if (propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sQUOTED_PRINTABLE) == 0)
else if (propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sQUOTED_PRINTABLE) == 0)
{
return nsCalUtility::MimeEncoding_QuotedPrintable;
}
else if (propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sBase64) == 0)
else if (propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sBase64) == 0)
{
return nsCalUtility::MimeEncoding_Base64;
}
@ -145,8 +145,8 @@ void JulianParser::ParseCalendars(ICalReader * reader,
if (TRUE) TRACE("\t--Parser: propName = --%s--, propVal = --%s--,paramSize = %d\r\n",
propName.toCString(""), propVal.toCString(""), parameters->GetSize());
#endif
if ((propName.compareIgnoreCase(JulianKeyword::Instance()->ms_sBEGIN) == 0) &&
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVCALENDAR) == 0))
if ((propName.compareIgnoreCase(nsCalKeyword::Instance()->ms_sBEGIN) == 0) &&
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVCALENDAR) == 0))
{
// parse an NSCalendar, add it to outCalendars
NSCalendar * cal = new NSCalendar(log);
@ -155,7 +155,7 @@ void JulianParser::ParseCalendars(ICalReader * reader,
outCalendars->Add(cal);
}
else if (propName.compareIgnoreCase(
JulianKeyword::Instance()->ms_sCONTENT_TRANSFER_ENCODING) == 0)
nsCalKeyword::Instance()->ms_sCONTENT_TRANSFER_ENCODING) == 0)
{
ICalProperty::Trim(propVal);
encoding = stringToEncodingType(propVal);

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

@ -243,8 +243,8 @@ NSCalendar::export(const char * filename, t_bool & status)
UnicodeString sResult, out;
status = TRUE;
sResult = JulianKeyword::Instance()->ms_sBEGIN_VCALENDAR;
sResult += JulianKeyword::Instance()->ms_sLINEBREAK;
sResult = nsCalKeyword::Instance()->ms_sBEGIN_VCALENDAR;
sResult += nsCalKeyword::Instance()->ms_sLINEBREAK;
ucc = sResult.toCString("");
if (ucc != 0)
{
@ -283,8 +283,8 @@ NSCalendar::export(const char * filename, t_bool & status)
status |= printComponentVectorToFile(getJournals(), f);
status |= printComponentVectorToFile(getVFreebusy(), f);
sResult = JulianKeyword::Instance()->ms_sEND_VCALENDAR;
sResult += JulianKeyword::Instance()->ms_sLINEBREAK;
sResult = nsCalKeyword::Instance()->ms_sEND_VCALENDAR;
sResult += nsCalKeyword::Instance()->ms_sLINEBREAK;
ucc = sResult.toCString("");
if (ucc != 0)
{
@ -383,8 +383,8 @@ NSCalendar::parse(ICalReader * brFile,
}
// break for "END:" line
else if ((propName.compareIgnoreCase(JulianKeyword::Instance()->ms_sEND) == 0) &&
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVCALENDAR) == 0))
else if ((propName.compareIgnoreCase(nsCalKeyword::Instance()->ms_sEND) == 0) &&
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVCALENDAR) == 0))
{
ICalProperty::deleteICalParameterVector(parameters);
parameters->RemoveAll();
@ -397,7 +397,7 @@ NSCalendar::parse(ICalReader * brFile,
}
else
{
if (propName.compareIgnoreCase(JulianKeyword::Instance()->ms_sBEGIN) == 0)
if (propName.compareIgnoreCase(nsCalKeyword::Instance()->ms_sBEGIN) == 0)
{
ICalProperty::deleteICalParameterVector(parameters);
parameters->RemoveAll();
@ -445,7 +445,7 @@ NSCalendar::parse(ICalReader * brFile,
else
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidComponent, 300);
nsCalLogErrorMessage::Instance()->ms_iInvalidComponent, 300);
delete ic; ic = 0;
}
}
@ -464,7 +464,7 @@ NSCalendar::parse(ICalReader * brFile,
else
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidComponent, 300);
nsCalLogErrorMessage::Instance()->ms_iInvalidComponent, 300);
delete ic; ic = 0;
}
}
@ -487,7 +487,7 @@ NSCalendar::parse(ICalReader * brFile,
else
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidComponent, 300);
nsCalLogErrorMessage::Instance()->ms_iInvalidComponent, 300);
delete ic; ic = 0;
}
}
@ -505,7 +505,7 @@ NSCalendar::parse(ICalReader * brFile,
else
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidComponent, 300);
nsCalLogErrorMessage::Instance()->ms_iInvalidComponent, 300);
delete ic; ic = 0;
}
}
@ -527,7 +527,7 @@ NSCalendar::parse(ICalReader * brFile,
else
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidComponent, 300);
nsCalLogErrorMessage::Instance()->ms_iInvalidComponent, 300);
delete ic; ic = 0;
}
}
@ -540,7 +540,7 @@ NSCalendar::parse(ICalReader * brFile,
bUpdatedComponent = addComponentWithType(ic, ic->GetType());
if (m_Log)
{
m_Log->setCurrentEventLogComponentType((JulianLogErrorVector::ECompType) ic->GetType());
m_Log->setCurrentEventLogComponentType((nsCalLogErrorVector::ECompType) ic->GetType());
m_Log->setCurrentEventLogValidity(TRUE);
uid = "";
#if 0
@ -580,9 +580,9 @@ NSCalendar::parse(ICalReader * brFile,
{
if (m_Log)
{
//m_Log->setCurrentEventLogComponentType((JulianLogErrorVector::ECompType) ic->GetType());
//m_Log->setCurrentEventLogComponentType((nsCalLogErrorVector::ECompType) ic->GetType());
// make invalid event errors go to NSCALENDAR
m_Log->setCurrentEventLogComponentType(JulianLogErrorVector::ECompType_NSCALENDAR);
m_Log->setCurrentEventLogComponentType(nsCalLogErrorVector::ECompType_NSCALENDAR);
m_Log->setCurrentEventLogValidity(FALSE);
uid = "";
#if 0
@ -614,7 +614,7 @@ NSCalendar::parse(ICalReader * brFile,
#endif
}
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidComponent, 300);
nsCalLogErrorMessage::Instance()->ms_iInvalidComponent, 300);
#if 0
if (m_Log)
{
@ -634,7 +634,7 @@ NSCalendar::parse(ICalReader * brFile,
delete ic; ic = 0;
}
#endif // #else
if (sOK.compareIgnoreCase(JulianKeyword::Instance()->ms_sOK) == 0)
if (sOK.compareIgnoreCase(nsCalKeyword::Instance()->ms_sOK) == 0)
bNextComponent = FALSE;
else
{
@ -659,13 +659,13 @@ NSCalendar::parse(ICalReader * brFile,
if (m_Log)
{
m_Log->addEventErrorEntry();
//m_Log->setCurrentEventLogComponentType(JulianLogErrorVector::ECompType_XCOMPONENT);
//m_Log->setCurrentEventLogComponentType(nsCalLogErrorVector::ECompType_XCOMPONENT);
// make x-toekn errors go to NSCALENDAR
m_Log->setCurrentEventLogComponentType(JulianLogErrorVector::ECompType_NSCALENDAR);
m_Log->setCurrentEventLogComponentType(nsCalLogErrorVector::ECompType_NSCALENDAR);
}
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iXTokenComponentIgnored,
JulianKeyword::Instance()->ms_sNSCALENDAR, sName, 200);
nsCalLogErrorMessage::Instance()->ms_iXTokenComponentIgnored,
nsCalKeyword::Instance()->ms_sNSCALENDAR, sName, 200);
// Ignore all lines between BEGIN:X-COMPONENT and END:X-COMPONENT
while (TRUE)
@ -677,23 +677,23 @@ NSCalendar::parse(ICalReader * brFile,
ICalProperty::deleteICalParameterVector(parameters);
parameters->RemoveAll();
if ((propName.compareIgnoreCase(JulianKeyword::Instance()->ms_sEND) == 0) &&
if ((propName.compareIgnoreCase(nsCalKeyword::Instance()->ms_sEND) == 0) &&
(propVal.compareIgnoreCase(sName) == 0))
{
// correct end of X-Component parsing
break;
}
else if (
((propName.compareIgnoreCase(JulianKeyword::Instance()->ms_sEND) == 0) &&
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVCALENDAR) == 0)) ||
((propName.compareIgnoreCase(nsCalKeyword::Instance()->ms_sEND) == 0) &&
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVCALENDAR) == 0)) ||
((propName.compareIgnoreCase(JulianKeyword::Instance()->ms_sBEGIN) == 0) &&
((propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVCALENDAR) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVEVENT) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVTODO) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVJOURNAL) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVFREEBUSY) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVTIMEZONE) == 0) ||
((propName.compareIgnoreCase(nsCalKeyword::Instance()->ms_sBEGIN) == 0) &&
((propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVCALENDAR) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVEVENT) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVTODO) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVJOURNAL) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVFREEBUSY) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVTIMEZONE) == 0) ||
(ICalProperty::IsXToken(propVal)))))
{
@ -702,10 +702,10 @@ NSCalendar::parse(ICalReader * brFile,
// or BEGIN:X-token
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iAbruptEndOfParsing,
JulianKeyword::Instance()->ms_sNSCALENDAR, strLine, 300);
nsCalLogErrorMessage::Instance()->ms_iAbruptEndOfParsing,
nsCalKeyword::Instance()->ms_sNSCALENDAR, strLine, 300);
sOK = propName;
sOK += JulianKeyword::Instance()->ms_sCOLON_SYMBOL;
sOK += nsCalKeyword::Instance()->ms_sCOLON_SYMBOL;
sOK += propVal;
bNextComponent = TRUE;
sName = propVal;
@ -723,7 +723,7 @@ NSCalendar::parse(ICalReader * brFile,
}
else
{
if (m_Log) m_Log->setCurrentEventLogComponentType(JulianLogErrorVector::ECompType_NSCALENDAR);
if (m_Log) m_Log->setCurrentEventLogComponentType(nsCalLogErrorVector::ECompType_NSCALENDAR);
storeData(strLine, propName, propVal, parameters);
ICalProperty::deleteICalParameterVector(parameters);
@ -746,67 +746,67 @@ t_bool NSCalendar::storeData(UnicodeString & strLine, UnicodeString & propName,
t_int32 i;
t_int32 hashCode = propName.hashCode();
if (JulianKeyword::Instance()->ms_ATOM_VERSION == hashCode)
if (nsCalKeyword::Instance()->ms_ATOM_VERSION == hashCode)
{
// no parameters
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVCALENDAR, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVCALENDAR, strLine, 100);
}
setVersion(propVal, parameters);
return TRUE;
}
else if (JulianKeyword::Instance()->ms_ATOM_PRODID == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_PRODID == hashCode)
{
// no parameters
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVCALENDAR, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVCALENDAR, strLine, 100);
}
setProdid(propVal, parameters);
return TRUE;
}
else if (JulianKeyword::Instance()->ms_ATOM_CALSCALE == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_CALSCALE == hashCode)
{
// no parameters
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVCALENDAR, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVCALENDAR, strLine, 100);
}
// if propVal != CALSCALE, just log,
// will set to GREGORIAN later.
if (JulianKeyword::Instance()->ms_ATOM_GREGORIAN != propVal.hashCode())
if (nsCalKeyword::Instance()->ms_ATOM_GREGORIAN != propVal.hashCode())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidPropertyValue,
JulianKeyword::Instance()->ms_sVCALENDAR,
nsCalLogErrorMessage::Instance()->ms_iInvalidPropertyValue,
nsCalKeyword::Instance()->ms_sVCALENDAR,
propName, propVal, 200);
}
setCalScale(propVal, parameters);
return TRUE;
}
else if (JulianKeyword::Instance()->ms_ATOM_METHOD == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_METHOD == hashCode)
{
// no parameters
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVCALENDAR, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVCALENDAR, strLine, 100);
}
i = stringToMethod(propVal);
if (i < 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidPropertyValue,
JulianKeyword::Instance()->ms_sVCALENDAR,
nsCalLogErrorMessage::Instance()->ms_iInvalidPropertyValue,
nsCalKeyword::Instance()->ms_sVCALENDAR,
propName, propVal, 200);
}
else
@ -814,8 +814,8 @@ t_bool NSCalendar::storeData(UnicodeString & strLine, UnicodeString & propName,
if (getMethod() >= 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVCALENDAR,
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVCALENDAR,
propName, propVal, 100);
}
setMethod((NSCalendar::METHOD) i);
@ -829,26 +829,26 @@ t_bool NSCalendar::storeData(UnicodeString & strLine, UnicodeString & propName,
return TRUE;
}
#if 0
else if (JulianKeyword::Instance()->ms_ATOM_SOURCE == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_SOURCE == hashCode)
{
// no parameters
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVCALENDAR, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVCALENDAR, strLine, 100);
}
setSource(propVal, parameters);
return TRUE;
}
else if (JulianKeyword::Instance()->ms_ATOM_NAME == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_NAME == hashCode)
{
// no parameters
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVCALENDAR, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVCALENDAR, strLine, 100);
}
setName(propVal, parameters);
return TRUE;
@ -857,8 +857,8 @@ t_bool NSCalendar::storeData(UnicodeString & strLine, UnicodeString & propName,
else
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidPropertyName,
JulianKeyword::Instance()->ms_sVCALENDAR,
nsCalLogErrorMessage::Instance()->ms_iInvalidPropertyName,
nsCalKeyword::Instance()->ms_sVCALENDAR,
propName, 200);
return FALSE;
@ -952,7 +952,7 @@ NSCalendar::getLogVector(ICalComponent * ic)
if (vvError != 0)
{
t_int32 i = 0;
JulianLogErrorVector * lev = 0;
nsCalLogErrorVector * lev = 0;
UnicodeString uid;
#if 0
UnicodeString rid;
@ -982,8 +982,8 @@ NSCalendar::getLogVector(ICalComponent * ic)
for (i = 0; i < vvError->GetSize(); i++)
{
lev = (JulianLogErrorVector *) vvError->GetAt(i);
if ((lev->GetComponentType() == (JulianLogErrorVector::ECompType) ic->GetType()) &&
lev = (nsCalLogErrorVector *) vvError->GetAt(i);
if ((lev->GetComponentType() == (nsCalLogErrorVector::ECompType) ic->GetType()) &&
(lev->GetUID() == uid)
#if 0
&& (lev->GetRecurrenceID() == rid)
@ -1008,11 +1008,11 @@ NSCalendar::getLogVector()
if (vvError != 0)
{
t_int32 i = 0;
JulianLogErrorVector * lev = 0;
nsCalLogErrorVector * lev = 0;
for (i = 0; i < vvError->GetSize(); i++)
{
lev = (JulianLogErrorVector *) vvError->GetAt(i);
if (lev->GetComponentType() == JulianLogErrorVector::ECompType_NSCALENDAR)
lev = (nsCalLogErrorVector *) vvError->GetAt(i);
if (lev->GetComponentType() == nsCalLogErrorVector::ECompType_NSCALENDAR)
return (lev->GetErrors());
}
}
@ -1025,24 +1025,24 @@ NSCalendar::getLogVector()
UnicodeString NSCalendar::toString()
{
UnicodeString sResult, s, out;
s = JulianKeyword::Instance()->ms_sPRODID;
s = nsCalKeyword::Instance()->ms_sPRODID;
sResult += ICalProperty::propertyToICALString(s, getProdidProperty(), out);
s = JulianKeyword::Instance()->ms_sCALSCALE;
s = nsCalKeyword::Instance()->ms_sCALSCALE;
sResult += ICalProperty::propertyToICALString(s, getCalScaleProperty(), out);
s = JulianKeyword::Instance()->ms_sVERSION;
s = nsCalKeyword::Instance()->ms_sVERSION;
sResult += ICalProperty::propertyToICALString(s, getVersionProperty(), out);
#if 0
s = JulianKeyword::Instance()->ms_sNAME;
s = nsCalKeyword::Instance()->ms_sNAME;
sResult += ICalProperty::propertyToICALString(s, getNameProperty(), out);
s = JulianKeyword::Instance()->ms_sSOURCE;
s = nsCalKeyword::Instance()->ms_sSOURCE;
sResult += ICalProperty::propertyToICALString(s, getSourceProperty(), out);
#endif
// print method
sResult += JulianKeyword::Instance()->ms_sMETHOD;
sResult += JulianKeyword::Instance()->ms_sCOLON_SYMBOL;
sResult += nsCalKeyword::Instance()->ms_sMETHOD;
sResult += nsCalKeyword::Instance()->ms_sCOLON_SYMBOL;
sResult += methodToString(getMethod(), out);
sResult += JulianKeyword::Instance()->ms_sLINEBREAK;
sResult += nsCalKeyword::Instance()->ms_sLINEBREAK;
//sResult += ICalProperty::propertyToICALString(s, getMethodProperty(), sResult);
return sResult;
@ -1055,23 +1055,23 @@ NSCalendar::createCalendarHeader(UnicodeString & sResult)
{
UnicodeString s, out;
sResult = "";
s = JulianKeyword::Instance()->ms_sPRODID;
s = nsCalKeyword::Instance()->ms_sPRODID;
sResult += ICalProperty::propertyToICALString(s, getProdidProperty(), out);
s = JulianKeyword::Instance()->ms_sCALSCALE;
s = nsCalKeyword::Instance()->ms_sCALSCALE;
sResult += ICalProperty::propertyToICALString(s, getCalScaleProperty(), out);
s = JulianKeyword::Instance()->ms_sVERSION;
s = nsCalKeyword::Instance()->ms_sVERSION;
sResult += ICalProperty::propertyToICALString(s, getVersionProperty(), out);
#if 0
s = JulianKeyword::Instance()->ms_sNAME;
s = nsCalKeyword::Instance()->ms_sNAME;
sResult += ICalProperty::propertyToICALString(s, getNameProperty(), out);
s = JulianKeyword::Instance()->ms_sSOURCE;
s = nsCalKeyword::Instance()->ms_sSOURCE;
sResult += ICalProperty::propertyToICALString(s, getSourceProperty(), out);
#endif
// print method enum
sResult += JulianKeyword::Instance()->ms_sMETHOD;
sResult += JulianKeyword::Instance()->ms_sCOLON_SYMBOL;
sResult += nsCalKeyword::Instance()->ms_sMETHOD;
sResult += nsCalKeyword::Instance()->ms_sCOLON_SYMBOL;
sResult += methodToString(getMethod(), out);
sResult += JulianKeyword::Instance()->ms_sLINEBREAK;
sResult += nsCalKeyword::Instance()->ms_sLINEBREAK;
//sResult += ICalProperty::propertyToICALString(s, getMethodProperty(), out);
return sResult;
@ -1082,8 +1082,8 @@ NSCalendar::createCalendarHeader(UnicodeString & sResult)
UnicodeString NSCalendar::toICALString()
{
UnicodeString sResult, out;
sResult = JulianKeyword::Instance()->ms_sBEGIN_VCALENDAR;
sResult += JulianKeyword::Instance()->ms_sLINEBREAK;
sResult = nsCalKeyword::Instance()->ms_sBEGIN_VCALENDAR;
sResult += nsCalKeyword::Instance()->ms_sLINEBREAK;
sResult += createCalendarHeader(out);
sResult += ICalProperty::vectorToICALString(getXTokens(), out);
//if (FALSE) TRACE("out = %s", out.toCString(""));
@ -1094,8 +1094,8 @@ UnicodeString NSCalendar::toICALString()
sResult += printComponentVector(getVFreebusy(), out);
sResult += printComponentVector(getTodos(), out);
sResult += printComponentVector(getJournals(), out);
sResult += JulianKeyword::Instance()->ms_sEND_VCALENDAR;
sResult += JulianKeyword::Instance()->ms_sLINEBREAK;
sResult += nsCalKeyword::Instance()->ms_sEND_VCALENDAR;
sResult += nsCalKeyword::Instance()->ms_sLINEBREAK;
return sResult;
}
//---------------------------------------------------------------------
@ -1390,7 +1390,7 @@ NSCalendar::createVFreebusyHelper(Freebusy * f, DateTime start,
ev = (VEvent *) v->GetAt(i);
// must be opaque
if (ev->getTransp() == JulianKeyword::Instance()->ms_sOPAQUE)
if (ev->getTransp() == nsCalKeyword::Instance()->ms_sOPAQUE)
{
startP = ev->getDTStart();
endP = ((ev->isAllDayEvent()) ? start : ev->getDTEnd());
@ -1599,7 +1599,7 @@ NSCalendar::debugPrintComponentVector(JulianPtrArray * components,
out += num;
out += ")\t";
out += ic->toString();
out += JulianKeyword::Instance()->ms_sLINEBREAK;
out += nsCalKeyword::Instance()->ms_sLINEBREAK;
}
}
else
@ -1958,14 +1958,14 @@ NSCalendar::stringToMethod(UnicodeString & method)
{
t_int32 hashCode = method.hashCode();
if (JulianKeyword::Instance()->ms_ATOM_PUBLISH == hashCode) return METHOD_PUBLISH;
else if (JulianKeyword::Instance()->ms_ATOM_REQUEST == hashCode) return METHOD_REQUEST;
else if (JulianKeyword::Instance()->ms_ATOM_REPLY == hashCode) return METHOD_REPLY;
else if (JulianKeyword::Instance()->ms_ATOM_CANCEL == hashCode) return METHOD_CANCEL;
else if (JulianKeyword::Instance()->ms_ATOM_REFRESH == hashCode) return METHOD_REFRESH;
else if (JulianKeyword::Instance()->ms_ATOM_COUNTER == hashCode) return METHOD_COUNTER;
else if (JulianKeyword::Instance()->ms_ATOM_DECLINECOUNTER == hashCode) return METHOD_DECLINECOUNTER;
else if (JulianKeyword::Instance()->ms_ATOM_ADD == hashCode) return METHOD_ADD;
if (nsCalKeyword::Instance()->ms_ATOM_PUBLISH == hashCode) return METHOD_PUBLISH;
else if (nsCalKeyword::Instance()->ms_ATOM_REQUEST == hashCode) return METHOD_REQUEST;
else if (nsCalKeyword::Instance()->ms_ATOM_REPLY == hashCode) return METHOD_REPLY;
else if (nsCalKeyword::Instance()->ms_ATOM_CANCEL == hashCode) return METHOD_CANCEL;
else if (nsCalKeyword::Instance()->ms_ATOM_REFRESH == hashCode) return METHOD_REFRESH;
else if (nsCalKeyword::Instance()->ms_ATOM_COUNTER == hashCode) return METHOD_COUNTER;
else if (nsCalKeyword::Instance()->ms_ATOM_DECLINECOUNTER == hashCode) return METHOD_DECLINECOUNTER;
else if (nsCalKeyword::Instance()->ms_ATOM_ADD == hashCode) return METHOD_ADD;
else return METHOD_INVALID;
}
@ -2027,14 +2027,14 @@ UnicodeString & NSCalendar::methodToString(NSCalendar::METHOD method, UnicodeStr
{
switch(method)
{
case METHOD_PUBLISH: out = JulianKeyword::Instance()->ms_sPUBLISH; break;
case METHOD_REQUEST: out = JulianKeyword::Instance()->ms_sREQUEST; break;
case METHOD_REPLY: out = JulianKeyword::Instance()->ms_sREPLY; break;
case METHOD_CANCEL: out = JulianKeyword::Instance()->ms_sCANCEL; break;
case METHOD_REFRESH: out = JulianKeyword::Instance()->ms_sREFRESH; break;
case METHOD_COUNTER: out = JulianKeyword::Instance()->ms_sCOUNTER; break;
case METHOD_DECLINECOUNTER: out = JulianKeyword::Instance()->ms_sDECLINECOUNTER; break;
case METHOD_ADD: out = JulianKeyword::Instance()->ms_sADD; break;
case METHOD_PUBLISH: out = nsCalKeyword::Instance()->ms_sPUBLISH; break;
case METHOD_REQUEST: out = nsCalKeyword::Instance()->ms_sREQUEST; break;
case METHOD_REPLY: out = nsCalKeyword::Instance()->ms_sREPLY; break;
case METHOD_CANCEL: out = nsCalKeyword::Instance()->ms_sCANCEL; break;
case METHOD_REFRESH: out = nsCalKeyword::Instance()->ms_sREFRESH; break;
case METHOD_COUNTER: out = nsCalKeyword::Instance()->ms_sCOUNTER; break;
case METHOD_DECLINECOUNTER: out = nsCalKeyword::Instance()->ms_sDECLINECOUNTER; break;
case METHOD_ADD: out = nsCalKeyword::Instance()->ms_sADD; break;
default:
// TODO: Log and error??
out = "";

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

@ -107,60 +107,60 @@ void nsCalOrganizer::setParam(UnicodeString & paramName,
if (paramName.size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidParameterName,
JulianKeyword::Instance()->ms_sORGANIZER, paramName, 200);
nsCalLogErrorMessage::Instance()->ms_iInvalidParameterName,
nsCalKeyword::Instance()->ms_sORGANIZER, paramName, 200);
}
else
{
t_int32 hashCode = paramName.hashCode();
if (JulianKeyword::Instance()->ms_ATOM_CN == hashCode)
if (nsCalKeyword::Instance()->ms_ATOM_CN == hashCode)
{
if (getCN().size() != 0)
{
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iDuplicatedParameter,
JulianKeyword::Instance()->ms_sORGANIZER, paramName, 100);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iDuplicatedParameter,
nsCalKeyword::Instance()->ms_sORGANIZER, paramName, 100);
}
setCN(paramVal);
}
else if (JulianKeyword::Instance()->ms_ATOM_LANGUAGE == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_LANGUAGE == hashCode)
{
if (getLanguage().size() != 0)
{
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iDuplicatedParameter,
JulianKeyword::Instance()->ms_sORGANIZER, paramName, 100);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iDuplicatedParameter,
nsCalKeyword::Instance()->ms_sORGANIZER, paramName, 100);
}
setLanguage(paramVal);
}
else if (JulianKeyword::Instance()->ms_ATOM_SENTBY == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_SENTBY == hashCode)
{
if (getSentBy().size() != 0)
{
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iDuplicatedParameter,
JulianKeyword::Instance()->ms_sORGANIZER, paramName, 100);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iDuplicatedParameter,
nsCalKeyword::Instance()->ms_sORGANIZER, paramName, 100);
}
nsCalUtility::stripDoubleQuotes(paramVal); // double quote property
setSentBy(paramVal);
}
else if (JulianKeyword::Instance()->ms_ATOM_DIR == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_DIR == hashCode)
{
if (getDir().size() != 0)
{
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iDuplicatedParameter,
JulianKeyword::Instance()->ms_sORGANIZER, paramName, 100);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iDuplicatedParameter,
nsCalKeyword::Instance()->ms_sORGANIZER, paramName, 100);
}
nsCalUtility::stripDoubleQuotes(paramVal); // double quote property
setDir(paramVal);
}
else if (ICalProperty::IsXToken(paramName))
{
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iXTokenParamIgnored,
JulianKeyword::Instance()->ms_sORGANIZER, paramName, 100);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iXTokenParamIgnored,
nsCalKeyword::Instance()->ms_sORGANIZER, paramName, 100);
}
else
{
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iInvalidParameterName,
JulianKeyword::Instance()->ms_sORGANIZER, paramName, 200);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iInvalidParameterName,
nsCalKeyword::Instance()->ms_sORGANIZER, paramName, 200);
}
}
}
@ -183,12 +183,12 @@ UnicodeString & nsCalOrganizer::toICALString(UnicodeString & sProp,
UnicodeString u;
if (m_CN.size() > 0)
{
out += ';'; out += JulianKeyword::Instance()->ms_sCN;
out += ';'; out += nsCalKeyword::Instance()->ms_sCN;
out += '='; out += m_CN;
}
if (m_Language.size() > 0)
{
out += ';'; out += JulianKeyword::Instance()->ms_sLANGUAGE;
out += ';'; out += nsCalKeyword::Instance()->ms_sLANGUAGE;
out += '='; out += m_Language;
}
if (m_SentBy.size() > 0)
@ -196,7 +196,7 @@ UnicodeString & nsCalOrganizer::toICALString(UnicodeString & sProp,
// double quote sent-by, dir
u = m_SentBy;
u = nsCalUtility::addDoubleQuotes(u);
out += ';'; out += JulianKeyword::Instance()->ms_sSENTBY;
out += ';'; out += nsCalKeyword::Instance()->ms_sSENTBY;
out += '='; out += u;
}
if (m_Dir.size() > 0)
@ -204,12 +204,12 @@ UnicodeString & nsCalOrganizer::toICALString(UnicodeString & sProp,
// double quote sent-by, dir
u = m_Dir;
u = nsCalUtility::addDoubleQuotes(u);
out += ';'; out += JulianKeyword::Instance()->ms_sDIR;
out += ';'; out += nsCalKeyword::Instance()->ms_sDIR;
out += '='; out += u;
}
out += ':';
out += m_Name;
out += JulianKeyword::Instance()->ms_sLINEBREAK;
out += nsCalKeyword::Instance()->ms_sLINEBREAK;
return out;
}
@ -217,7 +217,7 @@ UnicodeString & nsCalOrganizer::toICALString(UnicodeString & sProp,
UnicodeString & nsCalOrganizer::toString(UnicodeString & out)
{
out = toString(JulianFormatString::Instance()->ms_OrganizerStrDefaultFmt, out);
out = toString(nsCalFormatString::Instance()->ms_OrganizerStrDefaultFmt, out);
return out;
}
@ -227,7 +227,7 @@ UnicodeString & nsCalOrganizer::toString(UnicodeString & strFmt,
UnicodeString & out)
{
if (strFmt.size() == 0 &&
JulianFormatString::Instance()->ms_OrganizerStrDefaultFmt.size() > 0)
nsCalFormatString::Instance()->ms_OrganizerStrDefaultFmt.size() > 0)
{
// if empty string, use default
return toString(out);
@ -318,7 +318,7 @@ t_bool nsCalOrganizer::isValid()
return FALSE;
// change to URL, must have "MAILTO:" in front
mailto = getName().extractBetween(0, 7, mailto);
if (mailto.compareIgnoreCase(JulianKeyword::Instance()->ms_sMAILTO_COLON) != 0)
if (mailto.compareIgnoreCase(nsCalKeyword::Instance()->ms_sMAILTO_COLON) != 0)
return FALSE;
else
return TRUE;

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

@ -63,7 +63,7 @@ ICalProperty::propertyToICALString(UnicodeString & sProp,
aName = (ICalParameter *) parameters->GetAt(i);
retVal += aName->toICALString(u);
}
retVal += ':'; retVal += sVal; retVal += JulianKeyword::Instance()->ms_sLINEBREAK;
retVal += ':'; retVal += sVal; retVal += nsCalKeyword::Instance()->ms_sLINEBREAK;
}
//if (FALSE) TRACE("retVal = %s\r\n", retVal.toCString(""));
return retVal;
@ -132,7 +132,7 @@ t_bool ICalProperty::CheckParamsWithValueRangeCheck(JulianPtrArray * parameters,
return FALSE;
}
if (JulianKeyword::Instance()->ms_ATOM_VALUE == u.hashCode())
if (nsCalKeyword::Instance()->ms_ATOM_VALUE == u.hashCode())
{
u = ip->getParameterValue(u);
if (!nsCalUtility::checkRange(u.hashCode(), validValueRange,
@ -143,36 +143,36 @@ t_bool ICalProperty::CheckParamsWithValueRangeCheck(JulianPtrArray * parameters,
}
}
else if (JulianKeyword::Instance()->ms_ATOM_ENCODING == u.hashCode())
else if (nsCalKeyword::Instance()->ms_ATOM_ENCODING == u.hashCode())
{
u = ip->getParameterValue(u);
if (!nsCalUtility::checkRange(u.hashCode(),
JulianAtomRange::Instance()->ms_asEncodingRange,
JulianAtomRange::Instance()->ms_iEncodingRangeSize))
nsCalAtomRange::Instance()->ms_asEncodingRange,
nsCalAtomRange::Instance()->ms_iEncodingRangeSize))
{
if (!ICalProperty::IsXToken(u))
return FALSE;
}
}
else if (JulianKeyword::Instance()->ms_ATOM_RELTYPE == u.hashCode())
else if (nsCalKeyword::Instance()->ms_ATOM_RELTYPE == u.hashCode())
{
u = ip->getParameterValue(u);
if (!nsCalUtility::checkRange(u.hashCode(),
JulianAtomRange::Instance()->ms_asRelTypeRange,
JulianAtomRange::Instance()->ms_iRelTypeRangeSize))
nsCalAtomRange::Instance()->ms_asRelTypeRange,
nsCalAtomRange::Instance()->ms_iRelTypeRangeSize))
{
if (!ICalProperty::IsXToken(u))
return FALSE;
}
}
else if (JulianKeyword::Instance()->ms_ATOM_RELATED == u.hashCode())
else if (nsCalKeyword::Instance()->ms_ATOM_RELATED == u.hashCode())
{
u = ip->getParameterValue(u);
if (!nsCalUtility::checkRange(u.hashCode(),
JulianAtomRange::Instance()->ms_asRelatedRange,
JulianAtomRange::Instance()->ms_iRelatedRangeSize))
nsCalAtomRange::Instance()->ms_asRelatedRange,
nsCalAtomRange::Instance()->ms_iRelatedRangeSize))
{
return FALSE;
}
@ -191,8 +191,8 @@ t_bool ICalProperty::checkParam(UnicodeString & propName,
t_int32 hashCode = propName.hashCode();
if (nsCalUtility::checkRange(hashCode,
JulianAtomRange::Instance()->ms_asIrregularProperties,
JulianAtomRange::Instance()->ms_iIrregularPropertiesSize))
nsCalAtomRange::Instance()->ms_asIrregularProperties,
nsCalAtomRange::Instance()->ms_iIrregularPropertiesSize))
{
// if special property, then don't check parameters
return FALSE;
@ -207,8 +207,8 @@ t_bool ICalProperty::checkParam(UnicodeString & propName,
// not a valid parameter for th
if (!nsCalUtility::checkRange(pNHC,
JulianAtomRange::Instance()->ms_asParameterRange,
JulianAtomRange::Instance()->ms_iParameterRangeSize))
nsCalAtomRange::Instance()->ms_asParameterRange,
nsCalAtomRange::Instance()->ms_iParameterRangeSize))
return TRUE;
else
@ -217,19 +217,19 @@ t_bool ICalProperty::checkParam(UnicodeString & propName,
// check parameter name ranges here
// TODO: For now check only VALUE, ENCODING,
// TODO: Check LANGUAGE later
if (JulianKeyword::Instance()->ms_ATOM_VALUE == pNHC)
if (nsCalKeyword::Instance()->ms_ATOM_VALUE == pNHC)
{
if ((!nsCalUtility::checkRange(pVHC,
JulianAtomRange::Instance()->ms_asValueRange,
JulianAtomRange::Instance()->ms_iValueRangeSize))
nsCalAtomRange::Instance()->ms_asValueRange,
nsCalAtomRange::Instance()->ms_iValueRangeSize))
&& (!IsXToken(paramVal)))
return TRUE;
}
else if (JulianKeyword::Instance()->ms_ATOM_ENCODING == pNHC)
else if (nsCalKeyword::Instance()->ms_ATOM_ENCODING == pNHC)
{
if ((!nsCalUtility::checkRange(pVHC,
JulianAtomRange::Instance()->ms_asEncodingRange,
JulianAtomRange::Instance()->ms_iEncodingRangeSize)) && (!IsXToken(paramVal)))
nsCalAtomRange::Instance()->ms_asEncodingRange,
nsCalAtomRange::Instance()->ms_iEncodingRangeSize)) && (!IsXToken(paramVal)))
return TRUE;
}
return FALSE;
@ -326,7 +326,7 @@ void ICalProperty::parsePropertyLine(UnicodeString & strLine,
{
// NOTE: TODO: This assumes semicolons can't exist between DQUOTE
UnicodeStringTokenizer * st = new UnicodeStringTokenizer(u,
JulianKeyword::Instance()->ms_sSEMICOLON_SYMBOL);
nsCalKeyword::Instance()->ms_sSEMICOLON_SYMBOL);
PR_ASSERT(st != 0);
PR_ASSERT(parameters != 0);
@ -568,7 +568,7 @@ ICalProperty::parameterToCalString(UnicodeString sParam,
out = "";
if (sVal.size() > 0)
{
out = JulianKeyword::Instance()->ms_sSEMICOLON_SYMBOL;
out = nsCalKeyword::Instance()->ms_sSEMICOLON_SYMBOL;
out += sParam;
out += '=';
out += sVal;
@ -667,7 +667,7 @@ ICalProperty::vectorToICALString(JulianPtrArray * strings, UnicodeString & retVa
for (i = 0; i < strings->GetSize(); i++)
{
u = *((UnicodeString *) strings->GetAt(i));
u += JulianKeyword::Instance()->ms_sLINEBREAK;
u += nsCalKeyword::Instance()->ms_sLINEBREAK;
retVal += multiLineFormat(u);
}
}
@ -691,12 +691,12 @@ ICalProperty::multiLineFormat(UnicodeString & s)
sResult = s.extractBetween(0, ms_iMAX_LINE_LENGTH, sResult);
t = s.extractBetween(ms_iMAX_LINE_LENGTH, size, t);
t.insert(0, JulianKeyword::Instance()->ms_sLINEBREAKSPACE);
t.insert(0, nsCalKeyword::Instance()->ms_sLINEBREAKSPACE);
sResult += multiLineFormat(t);
// end recursion
size = sResult.size();
if (sResult.endsWith(JulianKeyword::Instance()->ms_sLINEFEEDSPACE))
if (sResult.endsWith(nsCalKeyword::Instance()->ms_sLINEFEEDSPACE))
sResult.removeBetween(size - 1, size);
s = sResult;
return s;

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

@ -69,7 +69,7 @@
//#define DEBUG 1
//---------------------------------------------------------------------
//static UnicodeString s_sSemiColonSymbol = ";";
//static UnicodeString JulianKeyword::Instance()->ms_sCOMMA_SYMBOL = ",";
//static UnicodeString nsCalKeyword::Instance()->ms_sCOMMA_SYMBOL = ",";
/*
* This is a hack so I could get it compiled on unix. We need
@ -330,7 +330,7 @@ Recurrence::parsePropertyLine(UnicodeString & strLine,
u = strLine.extractBetween(iColon + 1, strLine.size(), u);
UnicodeStringTokenizer * st =
new UnicodeStringTokenizer(u, JulianKeyword::Instance()->ms_sSEMICOLON_SYMBOL);
new UnicodeStringTokenizer(u, nsCalKeyword::Instance()->ms_sSEMICOLON_SYMBOL);
PR_ASSERT(st != 0);
@ -409,7 +409,7 @@ Recurrence::parse(UnicodeString & s)
for (i = 0; i < parameters->GetSize(); i++)
{
ip = (ICalParameter *) parameters->GetAt(i);
if (ip->getParameterName(u).compareIgnoreCase(JulianKeyword::Instance()->ms_sFREQ) == 0)
if (ip->getParameterName(u).compareIgnoreCase(nsCalKeyword::Instance()->ms_sFREQ) == 0)
{
t = ip->getParameterValue(t);
#if JULIAN_DEBUGGING_RECURRENCE
@ -451,20 +451,20 @@ Recurrence::parse(UnicodeString & s)
t_int32 tSize = t.size();
JAtom atomParam(u);
if (JulianKeyword::Instance()->ms_ATOM_UNTIL == atomParam)
if (nsCalKeyword::Instance()->ms_ATOM_UNTIL == atomParam)
{
// TODO: ONLY accepts UTC time for now
m_Until.setTimeString(t);
// TODO: Log if m_Until is invalid or before start time
}
else if (JulianKeyword::Instance()->ms_ATOM_COUNT == atomParam)
else if (nsCalKeyword::Instance()->ms_ATOM_COUNT == atomParam)
{
char * tcc = t.toCString("");
PR_ASSERT(tcc != 0);
m_iCount = nsCalUtility::atot_int32(tcc, bParseError, tSize);
delete [] tcc; tcc = 0;
}
else if (JulianKeyword::Instance()->ms_ATOM_INTERVAL == atomParam)
else if (nsCalKeyword::Instance()->ms_ATOM_INTERVAL == atomParam)
{
// TODO: if duration allowed, parse duration, then it to interval
char * tcc = t.toCString("");
@ -472,18 +472,18 @@ Recurrence::parse(UnicodeString & s)
tempInterval = nsCalUtility::atot_int32(tcc, bParseError, tSize);
delete [] tcc; tcc = 0;
}
else if (JulianKeyword::Instance()->ms_ATOM_WKST == atomParam)
else if (nsCalKeyword::Instance()->ms_ATOM_WKST == atomParam)
{
m_iWkSt = stringToDay(t, bParseError);
}
else if (JulianKeyword::Instance()->ms_ATOM_BYSETPOS == atomParam)
else if (nsCalKeyword::Instance()->ms_ATOM_BYSETPOS == atomParam)
{
parseDelimited(t, JulianKeyword::Instance()->ms_sCOMMA_SYMBOL, v);
parseDelimited(t, nsCalKeyword::Instance()->ms_sCOMMA_SYMBOL, v);
m_aiBySetPos = verifyIntList(v, -366, 366, sErrorMsg, retSize, bParseError, TRUE);
m_iBySetPosLen = retSize;
m_iActiveGenerators++;
}
else if (JulianKeyword::Instance()->ms_ATOM_BYMINUTE == atomParam)
else if (nsCalKeyword::Instance()->ms_ATOM_BYMINUTE == atomParam)
{
dg = (DateGenerator *) m_GntrVctr->GetAt(ms_iByMinuteGntrIndex);
if (dg->getSpan() < m_iType)
@ -493,13 +493,13 @@ Recurrence::parse(UnicodeString & s)
}
else
{
parseDelimited(t, JulianKeyword::Instance()->ms_sCOMMA_SYMBOL, v);
parseDelimited(t, nsCalKeyword::Instance()->ms_sCOMMA_SYMBOL, v);
m_aiByMinute = verifyIntList(v, 0, 59, sErrorMsg, retSize, bParseError);
dg->setParamsArray(m_aiByMinute, retSize);
m_iActiveGenerators++;
}
}
else if (JulianKeyword::Instance()->ms_ATOM_BYHOUR == atomParam)
else if (nsCalKeyword::Instance()->ms_ATOM_BYHOUR == atomParam)
{
dg = (DateGenerator *) m_GntrVctr->GetAt(ms_iByHourGntrIndex);
if (dg->getSpan() < m_iType)
@ -509,13 +509,13 @@ Recurrence::parse(UnicodeString & s)
}
else
{
parseDelimited(t, JulianKeyword::Instance()->ms_sCOMMA_SYMBOL, v);
parseDelimited(t, nsCalKeyword::Instance()->ms_sCOMMA_SYMBOL, v);
m_aiByHour = verifyIntList(v, 0, 23, sErrorMsg, retSize, bParseError);
dg->setParamsArray(m_aiByHour, retSize);
m_iActiveGenerators++;
}
}
else if (JulianKeyword::Instance()->ms_ATOM_BYMONTHDAY == atomParam)
else if (nsCalKeyword::Instance()->ms_ATOM_BYMONTHDAY == atomParam)
{
dg = (DateGenerator *) m_GntrVctr->GetAt(ms_iByMonthDayGntrIndex);
if (dg->getSpan() < m_iType)
@ -525,14 +525,14 @@ Recurrence::parse(UnicodeString & s)
}
else
{
parseDelimited(t, JulianKeyword::Instance()->ms_sCOMMA_SYMBOL, v);
parseDelimited(t, nsCalKeyword::Instance()->ms_sCOMMA_SYMBOL, v);
m_aiByMonthDay = verifyIntList(v, -31, 31, sErrorMsg, retSize, bParseError, TRUE);
dg->setParamsArray(m_aiByMonthDay, retSize);
m_iActiveGenerators++;
byMonthDaySize = retSize;
}
}
else if (JulianKeyword::Instance()->ms_ATOM_BYYEARDAY == atomParam)
else if (nsCalKeyword::Instance()->ms_ATOM_BYYEARDAY == atomParam)
{
dg = (DateGenerator *) m_GntrVctr->GetAt(ms_iByYearDayGntrIndex);
if (dg->getSpan() < m_iType)
@ -542,7 +542,7 @@ Recurrence::parse(UnicodeString & s)
}
else
{
parseDelimited(t, JulianKeyword::Instance()->ms_sCOMMA_SYMBOL, v);
parseDelimited(t, nsCalKeyword::Instance()->ms_sCOMMA_SYMBOL, v);
m_aiByYearDay = verifyIntList(v, -366, 366, sErrorMsg, retSize, bParseError, TRUE);
dg->setParamsArray(m_aiByYearDay, retSize);
m_iActiveGenerators++;
@ -550,7 +550,7 @@ Recurrence::parse(UnicodeString & s)
bYearDay = TRUE;
}
}
else if (JulianKeyword::Instance()->ms_ATOM_BYWEEKNO == atomParam)
else if (nsCalKeyword::Instance()->ms_ATOM_BYWEEKNO == atomParam)
{
dg = (DateGenerator *) m_GntrVctr->GetAt(ms_iByWeekNoGntrIndex);
if (dg->getSpan() < m_iType)
@ -560,7 +560,7 @@ Recurrence::parse(UnicodeString & s)
}
else
{
parseDelimited(t, JulianKeyword::Instance()->ms_sCOMMA_SYMBOL, v);
parseDelimited(t, nsCalKeyword::Instance()->ms_sCOMMA_SYMBOL, v);
m_aiByWeekNo = verifyIntList(v, -53, 53, sErrorMsg, retSize, bParseError, TRUE);
dg->setParamsArray(m_aiByWeekNo, retSize);
m_iActiveGenerators++;
@ -568,7 +568,7 @@ Recurrence::parse(UnicodeString & s)
bWeekNo = TRUE;
}
}
else if (JulianKeyword::Instance()->ms_ATOM_BYMONTH == atomParam)
else if (nsCalKeyword::Instance()->ms_ATOM_BYMONTH == atomParam)
{
dg = (DateGenerator *) m_GntrVctr->GetAt(ms_iByMonthGntrIndex);
if (dg->getSpan() < m_iType)
@ -578,7 +578,7 @@ Recurrence::parse(UnicodeString & s)
}
else
{
parseDelimited(t, JulianKeyword::Instance()->ms_sCOMMA_SYMBOL, v);
parseDelimited(t, nsCalKeyword::Instance()->ms_sCOMMA_SYMBOL, v);
m_aiByMonth = verifyIntList(v, 1, 12, sErrorMsg, retSize, bParseError, TRUE);
dg->setParamsArray(m_aiByMonth, retSize);
m_iActiveGenerators++;
@ -587,7 +587,7 @@ Recurrence::parse(UnicodeString & s)
byMonthSize = retSize;
}
}
else if (JulianKeyword::Instance()->ms_ATOM_BYDAY == atomParam)
else if (nsCalKeyword::Instance()->ms_ATOM_BYDAY == atomParam)
{
switch(m_iType)
{
@ -611,7 +611,7 @@ Recurrence::parse(UnicodeString & s)
}
else
{
parseDelimited(t, JulianKeyword::Instance()->ms_sCOMMA_SYMBOL, v);
parseDelimited(t, nsCalKeyword::Instance()->ms_sCOMMA_SYMBOL, v);
m_aaiByDay = createByDayList(v, m_iType, retSize, bParseError);
dg->setRDay(m_aaiByDay, retSize);
m_iActiveGenerators++;
@ -872,7 +872,7 @@ Recurrence::stringEnforce(DateTime startDate, JulianPtrArray * srr,
{
// log an invalid rdate
if (log != 0) log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidRDate, 200);
nsCalLogErrorMessage::Instance()->ms_iInvalidRDate, 200);
}
}
}
@ -1006,7 +1006,7 @@ Recurrence::unzip(t_int32 bound, JulianPtrArray * out, JLog * log,
if (log != 0)
{
log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidRecurrenceError, 200);
nsCalLogErrorMessage::Instance()->ms_iInvalidRecurrenceError, 200);
}
return;
}
@ -1412,13 +1412,13 @@ t_int32 Recurrence::stringToDay(UnicodeString & s, t_bool & error)
}
else
{
if (s == JulianKeyword::Instance()->ms_sSU) i = Calendar::SUNDAY;
else if (s == JulianKeyword::Instance()->ms_sMO) i = Calendar::MONDAY;
else if (s == JulianKeyword::Instance()->ms_sTU) i = Calendar::TUESDAY;
else if (s == JulianKeyword::Instance()->ms_sWE) i = Calendar::WEDNESDAY;
else if (s == JulianKeyword::Instance()->ms_sTH) i = Calendar::THURSDAY;
else if (s == JulianKeyword::Instance()->ms_sFR) i = Calendar::FRIDAY;
else if (s == JulianKeyword::Instance()->ms_sSA) i = Calendar::SATURDAY;
if (s == nsCalKeyword::Instance()->ms_sSU) i = Calendar::SUNDAY;
else if (s == nsCalKeyword::Instance()->ms_sMO) i = Calendar::MONDAY;
else if (s == nsCalKeyword::Instance()->ms_sTU) i = Calendar::TUESDAY;
else if (s == nsCalKeyword::Instance()->ms_sWE) i = Calendar::WEDNESDAY;
else if (s == nsCalKeyword::Instance()->ms_sTH) i = Calendar::THURSDAY;
else if (s == nsCalKeyword::Instance()->ms_sFR) i = Calendar::FRIDAY;
else if (s == nsCalKeyword::Instance()->ms_sSA) i = Calendar::SATURDAY;
else
{
error = TRUE;
@ -1586,12 +1586,12 @@ t_int32 Recurrence::stringToType(UnicodeString & s, t_bool & bParseError)
if (s.size() > 0)
{
if (s == JulianKeyword::Instance()->ms_sMINUTELY) iType = nsCalUtility::RT_MINUTELY;
else if (s == JulianKeyword::Instance()->ms_sHOURLY) iType = nsCalUtility::RT_HOURLY;
else if (s == JulianKeyword::Instance()->ms_sDAILY) iType = nsCalUtility::RT_DAILY;
else if (s == JulianKeyword::Instance()->ms_sWEEKLY) iType = nsCalUtility::RT_WEEKLY;
else if (s == JulianKeyword::Instance()->ms_sMONTHLY) iType = nsCalUtility::RT_MONTHLY;
else if (s == JulianKeyword::Instance()->ms_sYEARLY) iType = nsCalUtility::RT_YEARLY;
if (s == nsCalKeyword::Instance()->ms_sMINUTELY) iType = nsCalUtility::RT_MINUTELY;
else if (s == nsCalKeyword::Instance()->ms_sHOURLY) iType = nsCalUtility::RT_HOURLY;
else if (s == nsCalKeyword::Instance()->ms_sDAILY) iType = nsCalUtility::RT_DAILY;
else if (s == nsCalKeyword::Instance()->ms_sWEEKLY) iType = nsCalUtility::RT_WEEKLY;
else if (s == nsCalKeyword::Instance()->ms_sMONTHLY) iType = nsCalUtility::RT_MONTHLY;
else if (s == nsCalKeyword::Instance()->ms_sYEARLY) iType = nsCalUtility::RT_YEARLY;
else bParseError = TRUE;
}
else

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

@ -101,41 +101,41 @@ void nsCalRecurrenceID::setParam(UnicodeString & paramName, UnicodeString & para
t_int32 i;
if (paramName.size() == 0)
{
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iInvalidParameterName,
JulianKeyword::Instance()->ms_sRECURRENCEID, paramName, 200);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iInvalidParameterName,
nsCalKeyword::Instance()->ms_sRECURRENCEID, paramName, 200);
}
else
{
t_int32 hashCode = paramName.hashCode();
if (JulianKeyword::Instance()->ms_ATOM_RANGE == hashCode)
if (nsCalKeyword::Instance()->ms_ATOM_RANGE == hashCode)
{
i = nsCalRecurrenceID::stringToRange(paramVal);
if (i < 0)
{
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iInvalidParameterValue,
JulianKeyword::Instance()->ms_sRECURRENCEID, paramName, paramVal, 200);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iInvalidParameterValue,
nsCalKeyword::Instance()->ms_sRECURRENCEID, paramName, paramVal, 200);
}
else
{
if (getRange() >= 0)
{
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iDuplicatedParameter,
JulianKeyword::Instance()->ms_sRECURRENCEID, paramName, 100);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iDuplicatedParameter,
nsCalKeyword::Instance()->ms_sRECURRENCEID, paramName, 100);
}
setRange((nsCalRecurrenceID::RANGE) i);
}
}
else if (ICalProperty::IsXToken(paramName))
{
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iXTokenParamIgnored,
JulianKeyword::Instance()->ms_sRECURRENCEID, paramName, 100);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iXTokenParamIgnored,
nsCalKeyword::Instance()->ms_sRECURRENCEID, paramName, 100);
}
else
{
// NOTE: what about optional parameters?? THERE ARE NONE.
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iInvalidParameterName,
JulianKeyword::Instance()->ms_sRECURRENCEID, paramName, 200);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iInvalidParameterName,
nsCalKeyword::Instance()->ms_sRECURRENCEID, paramName, 200);
}
}
}
@ -185,11 +185,11 @@ nsCalRecurrenceID::toString(UnicodeString & out)
{
UnicodeString u;
out = "";
out += JulianKeyword::Instance()->ms_sRANGE;
out += JulianKeyword::Instance()->ms_sCOLON_SYMBOL;
out += nsCalKeyword::Instance()->ms_sRANGE;
out += nsCalKeyword::Instance()->ms_sCOLON_SYMBOL;
out += rangeToString(m_Range, u);
out += JulianKeyword::Instance()->ms_sDATE;
out += JulianKeyword::Instance()->ms_sCOLON_SYMBOL;
out += nsCalKeyword::Instance()->ms_sDATE;
out += nsCalKeyword::Instance()->ms_sCOLON_SYMBOL;
out += m_DateTime.toISO8601();
return out;
}
@ -205,13 +205,13 @@ nsCalRecurrenceID::toICALString(UnicodeString & sProp, UnicodeString & out)
{
UnicodeString u;
out += ';';
out += JulianKeyword::Instance()->ms_sRANGE;
out += nsCalKeyword::Instance()->ms_sRANGE;
out += '=';
out += rangeToString(m_Range, u);
}
out += ':';
out += m_DateTime.toISO8601();
out += JulianKeyword::Instance()->ms_sLINEBREAK;
out += nsCalKeyword::Instance()->ms_sLINEBREAK;
return out;
}
@ -231,9 +231,9 @@ nsCalRecurrenceID::stringToRange(UnicodeString & sRange)
{
t_int32 hashCode = sRange.hashCode();
if (JulianKeyword::Instance()->ms_ATOM_THISANDPRIOR == hashCode)
if (nsCalKeyword::Instance()->ms_ATOM_THISANDPRIOR == hashCode)
return RANGE_THISANDPRIOR;
else if (JulianKeyword::Instance()->ms_ATOM_THISANDFUTURE == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_THISANDFUTURE == hashCode)
return RANGE_THISANDFUTURE;
else return RANGE_NONE;
}
@ -247,8 +247,8 @@ nsCalRecurrenceID::rangeToString(nsCalRecurrenceID::RANGE range,
out = "";
switch(range)
{
case RANGE_THISANDPRIOR: out = JulianKeyword::Instance()->ms_sTHISANDPRIOR; break;
case RANGE_THISANDFUTURE: out = JulianKeyword::Instance()->ms_sTHISANDFUTURE; break;
case RANGE_THISANDPRIOR: out = nsCalKeyword::Instance()->ms_sTHISANDPRIOR; break;
case RANGE_THISANDFUTURE: out = nsCalKeyword::Instance()->ms_sTHISANDFUTURE; break;
default:
// NONE case
out = "";

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

@ -493,7 +493,7 @@ TimeBasedEvent::formatChar(t_int32 c, UnicodeString sFilterAttendee,
}
return sResult;
case ms_cAttach:
s = JulianKeyword::Instance()->ms_sATTACH;
s = nsCalKeyword::Instance()->ms_sATTACH;
return ICalProperty::propertyVectorToICALString(s, getAttach(), sResult);
case ms_cAttendees:
{
@ -545,80 +545,80 @@ TimeBasedEvent::formatChar(t_int32 c, UnicodeString sFilterAttendee,
// return sResult.toString();
}
case ms_cCategories:
s = JulianKeyword::Instance()->ms_sCATEGORIES;
s = nsCalKeyword::Instance()->ms_sCATEGORIES;
return ICalProperty::propertyVectorToICALString(s, getCategories(), sResult);
case ms_cClass:
s = JulianKeyword::Instance()->ms_sCLASS;
s = nsCalKeyword::Instance()->ms_sCLASS;
return ICalProperty::propertyToICALString(s, getClassProperty(), sResult);
case ms_cComment:
s = JulianKeyword::Instance()->ms_sCOMMENT;
s = nsCalKeyword::Instance()->ms_sCOMMENT;
return ICalProperty::propertyVectorToICALString(s, getComment(), sResult);
case ms_cURL:
s = JulianKeyword::Instance()->ms_sURL;
s = nsCalKeyword::Instance()->ms_sURL;
return ICalProperty::propertyToICALString(s, getURLProperty(), sResult);
case ms_cCreated:
s = JulianKeyword::Instance()->ms_sCREATED;
s = nsCalKeyword::Instance()->ms_sCREATED;
return ICalProperty::propertyToICALString(s, getCreatedProperty(), sResult);
case ms_cDescription:
s = JulianKeyword::Instance()->ms_sDESCRIPTION;
s = nsCalKeyword::Instance()->ms_sDESCRIPTION;
return ICalProperty::propertyToICALString(s, getDescriptionProperty(), sResult);
case ms_cDTStart:
s = JulianKeyword::Instance()->ms_sDTSTART;
s = nsCalKeyword::Instance()->ms_sDTSTART;
return ICalProperty::propertyToICALString(s, getDTStartProperty(), sResult);
case ms_cDTStamp:
s = JulianKeyword::Instance()->ms_sDTSTAMP;
s = nsCalKeyword::Instance()->ms_sDTSTAMP;
return ICalProperty::propertyToICALString(s, getDTStampProperty(), sResult);
case ms_cExDate:
s = JulianKeyword::Instance()->ms_sEXDATE;
s = nsCalKeyword::Instance()->ms_sEXDATE;
return ICalProperty::propertyVectorToICALString(s, getExDates(), sResult);
case ms_cExRule:
if (getExRules() != 0)
{
//s = JulianKeyword::Instance()->ms_sEXRULE;
//s = nsCalKeyword::Instance()->ms_sEXRULE;
//return ICalComponent::propertyVToCalString(s, getExRules(), sResult);
return ICalProperty::vectorToICALString(getExRules(), sResult);
}
return "";
case ms_cLastModified:
s = JulianKeyword::Instance()->ms_sLASTMODIFIED;
s = nsCalKeyword::Instance()->ms_sLASTMODIFIED;
return ICalProperty::propertyToICALString(s, getLastModifiedProperty(), sResult);
case ms_cRDate:
s = JulianKeyword::Instance()->ms_sRDATE;
s = nsCalKeyword::Instance()->ms_sRDATE;
return ICalProperty::propertyVectorToICALString(s, getRDates(), sResult);
case ms_cRRule:
if (getRRules() != 0)
{
//s = JulianKeyword::Instance()->ms_sRRULE;
//s = nsCalKeyword::Instance()->ms_sRRULE;
//return ICalComponent::propertyVToCalString(s, getRRules(), sResult);
return ICalProperty::vectorToICALString(getRRules(), sResult);
}
return "";
case ms_cRecurrenceID:
s = JulianKeyword::Instance()->ms_sRECURRENCEID;
s = nsCalKeyword::Instance()->ms_sRECURRENCEID;
return ICalProperty::propertyToICALString(s, getRecurrenceIDProperty(), sResult);
case ms_cRelatedTo:
s = JulianKeyword::Instance()->ms_sRELATEDTO;
s = nsCalKeyword::Instance()->ms_sRELATEDTO;
return ICalProperty::propertyVectorToICALString(s, getRelatedTo(), sResult);
case ms_cRequestStatus:
s = JulianKeyword::Instance()->ms_sREQUESTSTATUS;
s = nsCalKeyword::Instance()->ms_sREQUESTSTATUS;
return ICalProperty::propertyVectorToICALString(s, getRequestStatus(), sResult);
case ms_cSequence:
s = JulianKeyword::Instance()->ms_sSEQUENCE;
s = nsCalKeyword::Instance()->ms_sSEQUENCE;
return ICalProperty::propertyToICALString(s, getSequenceProperty(), sResult);
case ms_cStatus:
s = JulianKeyword::Instance()->ms_sSTATUS;
s = nsCalKeyword::Instance()->ms_sSTATUS;
return ICalProperty::propertyToICALString(s, getStatusProperty(), sResult);
case ms_cSummary:
s = JulianKeyword::Instance()->ms_sSUMMARY;
s = nsCalKeyword::Instance()->ms_sSUMMARY;
return ICalProperty::propertyToICALString(s, getSummaryProperty(), sResult);
case ms_cUID:
s = JulianKeyword::Instance()->ms_sUID;
s = nsCalKeyword::Instance()->ms_sUID;
return ICalProperty::propertyToICALString(s, getUIDProperty(), sResult);
case ms_cOrganizer:
s = JulianKeyword::Instance()->ms_sORGANIZER;
s = nsCalKeyword::Instance()->ms_sORGANIZER;
return ICalProperty::propertyToICALString(s, getOrganizerProperty(), sResult);
case ms_cContact:
s = JulianKeyword::Instance()->ms_sCONTACT;
s = nsCalKeyword::Instance()->ms_sCONTACT;
return ICalProperty::propertyVectorToICALString(s, getContact(), sResult);
case ms_cXTokens:
return ICalProperty::vectorToICALString(getXTokens(), sResult);
@ -645,15 +645,15 @@ TimeBasedEvent::parseType(UnicodeString & sType, ICalReader * brFile,
JulianPtrArray * parameters = new JulianPtrArray();
parseStatus = JulianKeyword::Instance()->ms_sOK;
parseStatus = nsCalKeyword::Instance()->ms_sOK;
PR_ASSERT(parameters != 0 && brFile != 0);
if (parameters == 0 || brFile == 0)
{
// Return an invalid event
return parseStatus;
}
//UnicodeString end = JulianKeyword::Instance()->ms_sEND_WITH_COLON; end += sType;
//UnicodeString begin = JulianKeyword::Instance()->ms_sBEGIN_WITH_COLON; begin += sType;
//UnicodeString end = nsCalKeyword::Instance()->ms_sEND_WITH_COLON; end += sType;
//UnicodeString begin = nsCalKeyword::Instance()->ms_sBEGIN_WITH_COLON; begin += sType;
ErrorCode status = ZERO_ERROR;
@ -703,7 +703,7 @@ TimeBasedEvent::parseType(UnicodeString & sType, ICalReader * brFile,
continue;
}
// break on END:type (where type is matching VEVENT, VTODO, VJOURNAL)
if ((propName.compareIgnoreCase(JulianKeyword::Instance()->ms_sEND) == 0) &&
if ((propName.compareIgnoreCase(nsCalKeyword::Instance()->ms_sEND) == 0) &&
(propVal.compareIgnoreCase(sType) == 0))
{
ICalProperty::deleteICalParameterVector(parameters);
@ -712,24 +712,24 @@ TimeBasedEvent::parseType(UnicodeString & sType, ICalReader * brFile,
break;
}
if (
((propName.compareIgnoreCase(JulianKeyword::Instance()->ms_sBEGIN) == 0) &&
((propName.compareIgnoreCase(nsCalKeyword::Instance()->ms_sBEGIN) == 0) &&
((propVal.compareIgnoreCase(sType) == 0) && !bIgnoreBeginError )||
((propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVCALENDAR) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVEVENT) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVTODO) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVJOURNAL) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVFREEBUSY) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVTIMEZONE) == 0) ||
((propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVCALENDAR) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVEVENT) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVTODO) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVJOURNAL) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVFREEBUSY) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVTIMEZONE) == 0) ||
(ICalProperty::IsXToken(propVal)))
) ||
((propName.compareIgnoreCase(JulianKeyword::Instance()->ms_sEND) == 0) &&
((propName.compareIgnoreCase(nsCalKeyword::Instance()->ms_sEND) == 0) &&
(
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVCALENDAR) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVFREEBUSY) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVJOURNAL) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVEVENT) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVTODO) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVTIMEZONE) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVCALENDAR) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVFREEBUSY) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVJOURNAL) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVEVENT) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVTODO) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVTIMEZONE) == 0) ||
(ICalProperty::IsXToken(propVal)))
))
{
@ -741,7 +741,7 @@ TimeBasedEvent::parseType(UnicodeString & sType, ICalReader * brFile,
parseStatus = strLine;
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iAbruptEndOfParsing,
nsCalLogErrorMessage::Instance()->ms_iAbruptEndOfParsing,
sType, strLine, 300);
bNewEvent = TRUE;
@ -749,8 +749,8 @@ TimeBasedEvent::parseType(UnicodeString & sType, ICalReader * brFile,
}
else
{
if ((propName.compareIgnoreCase(JulianKeyword::Instance()->ms_sBEGIN) == 0) &&
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVALARM) == 0))
if ((propName.compareIgnoreCase(nsCalKeyword::Instance()->ms_sBEGIN) == 0) &&
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVALARM) == 0))
{
ICalProperty::deleteICalParameterVector(parameters);
@ -772,11 +772,11 @@ TimeBasedEvent::parseType(UnicodeString & sType, ICalReader * brFile,
else
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidAlarm, 300);
nsCalLogErrorMessage::Instance()->ms_iInvalidAlarm, 300);
delete alarm; alarm = 0;
}
}
if (sOK.compareIgnoreCase(JulianKeyword::Instance()->ms_sOK) == 0)
if (sOK.compareIgnoreCase(nsCalKeyword::Instance()->ms_sOK) == 0)
bNextAlarm = FALSE;
else
{
@ -787,7 +787,7 @@ TimeBasedEvent::parseType(UnicodeString & sType, ICalReader * brFile,
bNextAlarm = FALSE;
}
}
if (sOK.compareIgnoreCase(JulianKeyword::Instance()->ms_sOK) != 0)
if (sOK.compareIgnoreCase(nsCalKeyword::Instance()->ms_sOK) != 0)
{
parseStatus = sOK;
break;
@ -826,15 +826,15 @@ void TimeBasedEvent::storeAttach(UnicodeString & strLine, UnicodeString & propVa
// check parameters (binary, uri), todo: checkEncoding range
// todo: check FMTTYPE so it doesn't complain.
t_bool bParamValid = ICalProperty::CheckParamsWithValueRangeCheck(parameters,
JulianAtomRange::Instance()->ms_asEncodingValueFMTTypeParamRange,
JulianAtomRange::Instance()->ms_asEncodingValueFMTTypeParamRangeSize,
JulianAtomRange::Instance()->ms_asBinaryURIValueRange,
JulianAtomRange::Instance()->ms_asBinaryURIValueRangeSize);
nsCalAtomRange::Instance()->ms_asEncodingValueFMTTypeParamRange,
nsCalAtomRange::Instance()->ms_asEncodingValueFMTTypeParamRangeSize,
nsCalAtomRange::Instance()->ms_asBinaryURIValueRange,
nsCalAtomRange::Instance()->ms_asBinaryURIValueRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
}
addAttach(propVal, parameters);
}
@ -849,13 +849,13 @@ void TimeBasedEvent::storeAttendees(UnicodeString & strLine, UnicodeString & pro
if (!attendee->isValid())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidAttendee, 200);
nsCalLogErrorMessage::Instance()->ms_iInvalidAttendee, 200);
UnicodeString u;
u = JulianLogErrorMessage::Instance()->ms_sRS202;
u = nsCalLogErrorMessage::Instance()->ms_sRS202;
u += '.'; u += ' ';
u += strLine;
//setRequestStatus(JulianLogErrorMessage::Instance()->ms_iRS202);
//setRequestStatus(nsCalLogErrorMessage::Instance()->ms_iRS202);
addRequestStatus(u);
delete attendee; attendee = 0;
}
@ -869,13 +869,13 @@ void TimeBasedEvent::storeCategories(UnicodeString & strLine, UnicodeString & pr
JulianPtrArray * parameters, JulianPtrArray * vTimeZones)
{
t_bool bParamValid = ICalProperty::CheckParams(parameters,
JulianAtomRange::Instance()->ms_asLanguageParamRange,
JulianAtomRange::Instance()->ms_asLanguageParamRangeSize);
nsCalAtomRange::Instance()->ms_asLanguageParamRange,
nsCalAtomRange::Instance()->ms_asLanguageParamRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
}
addCategoriesPropertyVector(propVal, parameters);
@ -887,16 +887,16 @@ void TimeBasedEvent::storeClass(UnicodeString & strLine, UnicodeString & propVal
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
}
if (getClassProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT,
JulianKeyword::Instance()->ms_sCLASS, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT,
nsCalKeyword::Instance()->ms_sCLASS, 100);
}
setClass(propVal, parameters);
}
@ -904,14 +904,14 @@ void TimeBasedEvent::storeComment(UnicodeString & strLine, UnicodeString & propV
JulianPtrArray * parameters, JulianPtrArray * vTimeZones)
{
t_bool bParamValid = ICalProperty::CheckParams(parameters,
JulianAtomRange::Instance()->ms_asAltrepLanguageParamRange,
JulianAtomRange::Instance()->ms_asAltrepLanguageParamRangeSize);
nsCalAtomRange::Instance()->ms_asAltrepLanguageParamRange,
nsCalAtomRange::Instance()->ms_asAltrepLanguageParamRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
}
addComment(propVal, parameters);
@ -920,13 +920,13 @@ void TimeBasedEvent::storeContact(UnicodeString & strLine, UnicodeString & propV
JulianPtrArray * parameters, JulianPtrArray * vTimeZones)
{
t_bool bParamValid = ICalProperty::CheckParams(parameters,
JulianAtomRange::Instance()->ms_asAltrepLanguageParamRange,
JulianAtomRange::Instance()->ms_asAltrepLanguageParamRangeSize);
nsCalAtomRange::Instance()->ms_asAltrepLanguageParamRange,
nsCalAtomRange::Instance()->ms_asAltrepLanguageParamRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
}
addContact(propVal, parameters);
@ -938,16 +938,16 @@ void TimeBasedEvent::storeCreated(UnicodeString & strLine, UnicodeString & propV
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
}
if (getCreatedProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT,
JulianKeyword::Instance()->ms_sCREATED, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT,
nsCalKeyword::Instance()->ms_sCREATED, 100);
}
DateTime d;
d = VTimeZone::DateTimeApplyTimeZone(propVal, vTimeZones, parameters);
@ -959,23 +959,23 @@ void TimeBasedEvent::storeDescription(UnicodeString & strLine, UnicodeString & p
{
// check parameters
t_bool bParamValid = ICalProperty::CheckParams(parameters,
JulianAtomRange::Instance()->ms_asAltrepLanguageParamRange,
JulianAtomRange::Instance()->ms_asAltrepLanguageParamRangeSize);
nsCalAtomRange::Instance()->ms_asAltrepLanguageParamRange,
nsCalAtomRange::Instance()->ms_asAltrepLanguageParamRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
}
// check for duplicates
if (getDescriptionProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT,
JulianKeyword::Instance()->ms_sDESCRIPTION, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT,
nsCalKeyword::Instance()->ms_sDESCRIPTION, 100);
}
setDescription(propVal, parameters);
@ -985,28 +985,28 @@ void TimeBasedEvent::storeDTStart(UnicodeString & strLine, UnicodeString & propV
{
// check parameters (date, datetime), TZID
t_bool bParamValid = ICalProperty::CheckParamsWithValueRangeCheck(parameters,
JulianAtomRange::Instance()->ms_asTZIDValueParamRange,
JulianAtomRange::Instance()->ms_asTZIDValueParamRangeSize,
JulianAtomRange::Instance()->ms_asDateDateTimeValueRange,
JulianAtomRange::Instance()->ms_asDateDateTimeValueRangeSize);
nsCalAtomRange::Instance()->ms_asTZIDValueParamRange,
nsCalAtomRange::Instance()->ms_asTZIDValueParamRangeSize,
nsCalAtomRange::Instance()->ms_asDateDateTimeValueRange,
nsCalAtomRange::Instance()->ms_asDateDateTimeValueRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
}
if (getDTStartProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT,
JulianKeyword::Instance()->ms_sDTSTART, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT,
nsCalKeyword::Instance()->ms_sDTSTART, 100);
}
UnicodeString u, out;
u = JulianKeyword::Instance()->ms_sVALUE;
u = nsCalKeyword::Instance()->ms_sVALUE;
out = ICalParameter::GetParameterFromVector(u, out, parameters);
t_bool bIsDate = DateTime::IsParseableDate(propVal);
@ -1014,22 +1014,22 @@ void TimeBasedEvent::storeDTStart(UnicodeString & strLine, UnicodeString & propV
if (bIsDate)
{
// if there is a VALUE=X parameter, make sure X is DATE
if (out.size() != 0 && (JulianKeyword::Instance()->ms_ATOM_DATE != out.hashCode()))
if (out.size() != 0 && (nsCalKeyword::Instance()->ms_ATOM_DATE != out.hashCode()))
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iPropertyValueTypeMismatch,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iPropertyValueTypeMismatch,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
}
setAllDayEvent(TRUE);
}
else
{
// if there is a VALUE=X parameter, make sure X is DATETIME
if (out.size() != 0 && (JulianKeyword::Instance()->ms_ATOM_DATETIME != out.hashCode()))
if (out.size() != 0 && (nsCalKeyword::Instance()->ms_ATOM_DATETIME != out.hashCode()))
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iPropertyValueTypeMismatch,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iPropertyValueTypeMismatch,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
}
setAllDayEvent(FALSE);
}
@ -1047,16 +1047,16 @@ void TimeBasedEvent::storeDTStamp(UnicodeString & strLine, UnicodeString & propV
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
}
if (getDTStampProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT,
JulianKeyword::Instance()->ms_sDTSTAMP, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT,
nsCalKeyword::Instance()->ms_sDTSTAMP, 100);
}
DateTime d;
d = VTimeZone::DateTimeApplyTimeZone(propVal, vTimeZones, parameters);
@ -1068,15 +1068,15 @@ void TimeBasedEvent::storeExDate(UnicodeString & strLine, UnicodeString & propVa
{
// check parameters (date, datetime)
t_bool bParamValid = ICalProperty::CheckParamsWithValueRangeCheck(parameters,
JulianAtomRange::Instance()->ms_asTZIDValueParamRange,
JulianAtomRange::Instance()->ms_asTZIDValueParamRangeSize,
JulianAtomRange::Instance()->ms_asDateDateTimeValueRange,
JulianAtomRange::Instance()->ms_asDateDateTimeValueRangeSize);
nsCalAtomRange::Instance()->ms_asTZIDValueParamRange,
nsCalAtomRange::Instance()->ms_asTZIDValueParamRangeSize,
nsCalAtomRange::Instance()->ms_asDateDateTimeValueRange,
nsCalAtomRange::Instance()->ms_asDateDateTimeValueRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
}
// DONE:?TODO: finish
addExDate(propVal, parameters);
@ -1088,8 +1088,8 @@ void TimeBasedEvent::storeExRule(UnicodeString & strLine, UnicodeString & propVa
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
}
// TODO: finish, pass timezones.
addExRuleString(strLine);
@ -1101,16 +1101,16 @@ void TimeBasedEvent::storeLastModified(UnicodeString & strLine, UnicodeString &
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
}
if (getLastModifiedProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT,
JulianKeyword::Instance()->ms_sLASTMODIFIED, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT,
nsCalKeyword::Instance()->ms_sLASTMODIFIED, 100);
}
DateTime d;
d = VTimeZone::DateTimeApplyTimeZone(propVal, vTimeZones, parameters);
@ -1122,21 +1122,21 @@ void TimeBasedEvent::storeOrganizer(UnicodeString & strLine, UnicodeString & pro
{
// check parameters
t_bool bParamValid = ICalProperty::CheckParams(parameters,
JulianAtomRange::Instance()->ms_asSentByParamRange,
JulianAtomRange::Instance()->ms_asSentByParamRangeSize);
nsCalAtomRange::Instance()->ms_asSentByParamRange,
nsCalAtomRange::Instance()->ms_asSentByParamRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
}
if (getOrganizerProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT,
JulianKeyword::Instance()->ms_sORGANIZER, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT,
nsCalKeyword::Instance()->ms_sORGANIZER, 100);
}
setOrganizer(propVal, parameters);
}
@ -1145,15 +1145,15 @@ void TimeBasedEvent::storeRDate(UnicodeString & strLine, UnicodeString & propVal
{
// check parameters (date, datetime, period)
t_bool bParamValid = ICalProperty::CheckParamsWithValueRangeCheck(parameters,
JulianAtomRange::Instance()->ms_asTZIDValueParamRange,
JulianAtomRange::Instance()->ms_asTZIDValueParamRangeSize,
JulianAtomRange::Instance()->ms_asDateDateTimePeriodValueRange,
JulianAtomRange::Instance()->ms_asDateDateTimePeriodValueRangeSize);
nsCalAtomRange::Instance()->ms_asTZIDValueParamRange,
nsCalAtomRange::Instance()->ms_asTZIDValueParamRangeSize,
nsCalAtomRange::Instance()->ms_asDateDateTimePeriodValueRange,
nsCalAtomRange::Instance()->ms_asDateDateTimePeriodValueRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
}
// TODO: finish
addRDate(propVal, parameters);
@ -1165,8 +1165,8 @@ void TimeBasedEvent::storeRRule(UnicodeString & strLine, UnicodeString & propVal
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
}
// TODO: finish, pass timezones.
addRRuleString(strLine);
@ -1178,9 +1178,9 @@ void TimeBasedEvent::storeRecurrenceID(UnicodeString & strLine, UnicodeString &
if (getRecurrenceIDProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT,
JulianKeyword::Instance()->ms_sRECURRENCEID, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT,
nsCalKeyword::Instance()->ms_sRECURRENCEID, 100);
}
DateTime d(propVal);
@ -1195,13 +1195,13 @@ void TimeBasedEvent::storeRelatedTo(UnicodeString & strLine, UnicodeString & pro
{
// check parameters: todo: check reltype
t_bool bParamValid = ICalProperty::CheckParams(parameters,
JulianAtomRange::Instance()->ms_asReltypeParamRange,
JulianAtomRange::Instance()->ms_asReltypeParamRangeSize);
nsCalAtomRange::Instance()->ms_asReltypeParamRange,
nsCalAtomRange::Instance()->ms_asReltypeParamRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
}
addRelatedTo(propVal, parameters);
@ -1211,21 +1211,21 @@ void TimeBasedEvent::storeRequestStatus(UnicodeString & strLine, UnicodeString &
{
// check parameters
t_bool bParamValid = ICalProperty::CheckParams(parameters,
JulianAtomRange::Instance()->ms_asLanguageParamRange,
JulianAtomRange::Instance()->ms_asLanguageParamRangeSize);
nsCalAtomRange::Instance()->ms_asLanguageParamRange,
nsCalAtomRange::Instance()->ms_asLanguageParamRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
}
/*
if (getRequestStatusProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT, JulianKeyword::Instance()->ms_s, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT, nsCalKeyword::Instance()->ms_s, 100);
}
*/
//setRequestStatus(propVal, parameters);
@ -1241,8 +1241,8 @@ void TimeBasedEvent::storeSequence(UnicodeString & strLine, UnicodeString & prop
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
}
char * pcc = propVal.toCString("");
@ -1253,9 +1253,9 @@ void TimeBasedEvent::storeSequence(UnicodeString & strLine, UnicodeString & prop
if (getSequenceProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT,
JulianKeyword::Instance()->ms_sSEQUENCE, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT,
nsCalKeyword::Instance()->ms_sSEQUENCE, 100);
}
if (!bParseError)
{
@ -1264,9 +1264,9 @@ void TimeBasedEvent::storeSequence(UnicodeString & strLine, UnicodeString & prop
else
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidNumberFormat,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT,
JulianKeyword::Instance()->ms_sSEQUENCE,
nsCalLogErrorMessage::Instance()->ms_iInvalidNumberFormat,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT,
nsCalKeyword::Instance()->ms_sSEQUENCE,
propVal, 200);
}
}
@ -1277,16 +1277,16 @@ void TimeBasedEvent::storeStatus(UnicodeString & strLine, UnicodeString & propVa
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
}
if (getStatusProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT,
JulianKeyword::Instance()->ms_sSTATUS, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT,
nsCalKeyword::Instance()->ms_sSTATUS, 100);
}
setStatus(propVal, parameters);
}
@ -1295,21 +1295,21 @@ void TimeBasedEvent::storeSummary(UnicodeString & strLine, UnicodeString & propV
{
// check parameters
t_bool bParamValid = ICalProperty::CheckParams(parameters,
JulianAtomRange::Instance()->ms_asLanguageParamRange,
JulianAtomRange::Instance()->ms_asLanguageParamRangeSize);
nsCalAtomRange::Instance()->ms_asLanguageParamRange,
nsCalAtomRange::Instance()->ms_asLanguageParamRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
}
if (getSummaryProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT,
JulianKeyword::Instance()->ms_sSUMMARY, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT,
nsCalKeyword::Instance()->ms_sSUMMARY, 100);
}
setSummary(propVal, parameters);
}
@ -1320,16 +1320,16 @@ void TimeBasedEvent::storeUID(UnicodeString & strLine, UnicodeString & propVal,
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
}
if (getUIDProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT,
JulianKeyword::Instance()->ms_sUID, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT,
nsCalKeyword::Instance()->ms_sUID, 100);
}
setUID(propVal, parameters);
}
@ -1340,16 +1340,16 @@ void TimeBasedEvent::storeURL(UnicodeString & strLine, UnicodeString & propVal,
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT, strLine, 100);
}
if (getURLProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sTIMEBASEDEVENT,
JulianKeyword::Instance()->ms_sURL, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sTIMEBASEDEVENT,
nsCalKeyword::Instance()->ms_sURL, 100);
}
setURL(propVal, parameters);
@ -1402,26 +1402,26 @@ UnicodeString TimeBasedEvent::toICALString(UnicodeString sMethod, UnicodeString
t_int32 hashCode = sMethod.hashCode();
if (JulianKeyword::Instance()->ms_ATOM_PUBLISH == hashCode)
if (nsCalKeyword::Instance()->ms_ATOM_PUBLISH == hashCode)
s = publishMessage();
else if (JulianKeyword::Instance()->ms_ATOM_REQUEST == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_REQUEST == hashCode)
s = requestMessage();
else if (JulianKeyword::Instance()->ms_ATOM_CANCEL == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_CANCEL == hashCode)
s = cancelMessage();
else if (JulianKeyword::Instance()->ms_ATOM_REPLY == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_REPLY == hashCode)
s = replyMessage(sName);
else if (JulianKeyword::Instance()->ms_ATOM_REFRESH == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_REFRESH == hashCode)
s = refreshMessage(sName);
else if (JulianKeyword::Instance()->ms_ATOM_COUNTER == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_COUNTER == hashCode)
s = counterMessage();
else if (JulianKeyword::Instance()->ms_ATOM_DECLINECOUNTER == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_DECLINECOUNTER == hashCode)
s = declineCounterMessage();
else if (JulianKeyword::Instance()->ms_ATOM_ADD == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_ADD == hashCode)
s = addMessage();
/*
else if (JulianKeyword::Instance()->ms_ATOM_DELEGATEREQUEST == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_DELEGATEREQUEST == hashCode)
s = delegateRequestMessage(sName, sDelegatedTo, isRecurring);
else if (JulianKeyword::Instance()->ms_ATOM_DELEGATEREPLY == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_DELEGATEREPLY == hashCode)
s = delegateReplyMessage(sName, sDelegatedTo, isRecurring);
*/
return s;
@ -1783,7 +1783,7 @@ UnicodeString TimeBasedEvent::delegateRequestMessage(UnicodeString sAttendeeFilt
//DebugMsg.Instance().println(0,"No such attendee");
return "";
}
if (me.getStatus().compareIgnoreCase(JulianKeyword::Instance()->ms_sDELEGATED) != 0) {
if (me.getStatus().compareIgnoreCase(nsCalKeyword::Instance()->ms_sDELEGATED) != 0) {
//LogStream.Instance().println(2, Utility.ErrorMsg("DelegateRequestError"));
//DebugMsg.Instance().println(0,"I did not delegate yet");
return "";
@ -1805,13 +1805,13 @@ UnicodeString TimeBasedEvent::delegateRequestMessage(UnicodeString sAttendeeFilt
delegateName = *((UnicodeString)delegateTo.lastElement();)
// according to spec, rsvp, expect should be set to exactly what delegate had
String sRSVP = PropertyKeywords.JulianKeyword::Instance()->ms_sTRUE;
String sExpect = PropertyKeywords.JulianKeyword::Instance()->ms_sREQUEST;
String sRole = PropertyKeywords.JulianKeyword::Instance()->ms_sDELEGATE;
String sRSVP = PropertyKeywords.nsCalKeyword::Instance()->ms_sTRUE;
String sExpect = PropertyKeywords.nsCalKeyword::Instance()->ms_sREQUEST;
String sRole = PropertyKeywords.nsCalKeyword::Instance()->ms_sDELEGATE;
delegate.setName(delegateName);
delegate.setRole(PropertyKeywords.JulianKeyword::Instance()->ms_sDELEGATE);
delegate.setRSVP(PropertyKeywords.JulianKeyword::Instance()->ms_sTRUE);
delegate.setRole(PropertyKeywords.nsCalKeyword::Instance()->ms_sDELEGATE);
delegate.setRSVP(PropertyKeywords.nsCalKeyword::Instance()->ms_sTRUE);
delegate.setDelegatedFrom(sAttendeeFilter);
//delegate.load("ATTENDEE;ROLE=DELEGATE;RSVP=" + sRSVP +";EXPECT="+ sExpect +";DELEGATED-FROM=" + sAttendeeFilter + ":" + delegateName);
@ -1826,9 +1826,9 @@ UnicodeString TimeBasedEvent::delegateRequestMessage(UnicodeString sAttendeeFilt
// UPDATE ATTENDEE PROPERTIES HERE (attendee status is accepted, declined, delegated)
// what about response-sequence ? (will we keep it)
if (bRecur)
return format(JulianKeyword::Instance()->ms_sRecurDelegateRequestMessage, TRUE); // this is a delegate request
return format(nsCalKeyword::Instance()->ms_sRecurDelegateRequestMessage, TRUE); // this is a delegate request
else
return format(JulianKeyword::Instance()->ms_sDelegateRequestMessage, TRUE); // this is a delegate request
return format(nsCalKeyword::Instance()->ms_sDelegateRequestMessage, TRUE); // this is a delegate request
}
*/
@ -1996,7 +1996,7 @@ TimeBasedEvent::splitDates(JulianPtrArray * out,
// getTZID from date, check for it from VTimezone vector.
// then get the the NLSTimeZone from that VTimeZone
u = ip->getParameterValue(
JulianKeyword::Instance()->ms_sTZID, u, status);
nsCalKeyword::Instance()->ms_sTZID, u, status);
if (!FAILURE(status))
{
@ -2011,7 +2011,7 @@ TimeBasedEvent::splitDates(JulianPtrArray * out,
u = *((UnicodeString *)ip->getValue());
st = new UnicodeStringTokenizer(u,
JulianKeyword::Instance()->ms_sCOMMA_SYMBOL);
nsCalKeyword::Instance()->ms_sCOMMA_SYMBOL);
PR_ASSERT(st != 0);
if (st != 0)
{
@ -2108,7 +2108,7 @@ TimeBasedEvent::getPeriodRDates(JulianPtrArray * out)
ip = (ICalProperty *) getRDates()->GetAt(i);
u = *((UnicodeString *)ip->getValue());
st = new UnicodeStringTokenizer(u,
JulianKeyword::Instance()->ms_sCOMMA_SYMBOL);
nsCalKeyword::Instance()->ms_sCOMMA_SYMBOL);
PR_ASSERT(st != 0);
if (st != 0)
{
@ -2210,7 +2210,7 @@ void checkRecurrence()
void checkRange(UnicodeString sPropName, UnicodeString sPropValue, UnicodeString sRange[]) {
t_boolean b = FALSE;
if (sPropName.equalsIgnoreCase(PropertyKeywords.JulianKeyword::Instance()->ms_sCLASS)) {
if (sPropName.equalsIgnoreCase(PropertyKeywords.nsCalKeyword::Instance()->ms_sCLASS)) {
if (ParserUtil.isXToken(sPropValue))
return;
else {
@ -2219,7 +2219,7 @@ void checkRange(UnicodeString sPropName, UnicodeString sPropValue, UnicodeString
DebugMsg.Instance().println(0, "Bad value " + sPropValue + " for property " + sPropName);
LogStream.Instance().println(2, Utility.ErrorMsg("InvalidPropertyValue") +
" TimeBasedEvent:" + sPropValue);
setRequestStatus(Utility.ErrorMsg("RS201") + ";" + PropertyKeywords.JulianKeyword::Instance()->ms_sCLASS);
setRequestStatus(Utility.ErrorMsg("RS201") + ";" + PropertyKeywords.nsCalKeyword::Instance()->ms_sCLASS);
setDefaultProps(sPropName);
}
return;
@ -2252,7 +2252,7 @@ void TimeBasedEvent::setDefaultProps(UnicodeString sPropName) {
UnicodeString u;
t_int32 hashCode = sPropName.hashCode();
if (JulianKeyword::Instance()->ms_ATOM_DESCRIPTION == hashCode) {
if (nsCalKeyword::Instance()->ms_ATOM_DESCRIPTION == hashCode) {
//LogStream.Instance().println(0, Utility.ErrorMsg("DefaultTBEDescription"));
// Setting default Description to empty string
//if (getDescription( == hashCode) {
@ -2264,21 +2264,21 @@ void TimeBasedEvent::setDefaultProps(UnicodeString sPropName) {
u = getSummary();
setDescription(u);
}
else if (JulianKeyword::Instance()->ms_ATOM_CLASS == hashCode) {
else if (nsCalKeyword::Instance()->ms_ATOM_CLASS == hashCode) {
//LogStream.Instance().println(0, Utility.ErrorMsg("DefaultTBEClass"));
u = "";
setClass(u);
}
else if (JulianKeyword::Instance()->ms_ATOM_STATUS == hashCode) {
else if (nsCalKeyword::Instance()->ms_ATOM_STATUS == hashCode) {
//LogStream.Instance().println(0, Utility.ErrorMsg("DefaultTBEStatus"));
u = "";
setStatus(u);
}
//else if (sPropName.equalsIgnoreCase(PropertyKeywords.JulianKeyword::Instance()->ms_sTRANSP)) {
//else if (sPropName.equalsIgnoreCase(PropertyKeywords.nsCalKeyword::Instance()->ms_sTRANSP)) {
// LogStream.Instance().println(0, Utility.ErrorMsg("DefaultTBETransp"));
// setTransp(PropertyKeywords.JulianKeyword::Instance()->ms_sOPAQUE);
// setTransp(PropertyKeywords.nsCalKeyword::Instance()->ms_sOPAQUE);
//}
else if (JulianKeyword::Instance()->ms_ATOM_REQUESTSTATUS == hashCode) {
else if (nsCalKeyword::Instance()->ms_ATOM_REQUESTSTATUS == hashCode) {
//LogStream.Instance().println(0, Utility.ErrorMsg("DefaultTBERequestStatus"));
u = "";
setRequestStatus(u);
@ -2307,12 +2307,12 @@ void TimeBasedEvent::selfCheck()
// NOTE: setting default CLASS to PUBLIC if CLASS is invalid or not in range
if (getClass().size() == 0 ||
(getClass().compareIgnoreCase(JulianKeyword::Instance()->ms_sPRIVATE) != 0) &&
(getClass().compareIgnoreCase(JulianKeyword::Instance()->ms_sPUBLIC) != 0) &&
(getClass().compareIgnoreCase(JulianKeyword::Instance()->ms_sCONFIDENTIAL) != 0))
(getClass().compareIgnoreCase(nsCalKeyword::Instance()->ms_sPRIVATE) != 0) &&
(getClass().compareIgnoreCase(nsCalKeyword::Instance()->ms_sPUBLIC) != 0) &&
(getClass().compareIgnoreCase(nsCalKeyword::Instance()->ms_sCONFIDENTIAL) != 0))
{
setClass(JulianKeyword::Instance()->ms_sPUBLIC);
setClass(nsCalKeyword::Instance()->ms_sPUBLIC);
}
}

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

@ -186,7 +186,7 @@ TZPart::parse(ICalReader * brFile, UnicodeString & sType,
{
UnicodeString strLine, propName, propVal;
JulianPtrArray * parameters = new JulianPtrArray();
parseStatus = JulianKeyword::Instance()->ms_sOK;
parseStatus = nsCalKeyword::Instance()->ms_sOK;
PR_ASSERT(parameters != 0 && brFile != 0);
if (parameters == 0 || brFile == 0)
@ -220,7 +220,7 @@ TZPart::parse(ICalReader * brFile, UnicodeString & sType,
continue;
}
// END:STANDARD OR END:DAYLIGHT (sType = daylight or standard)
else if ((propName.compareIgnoreCase(JulianKeyword::Instance()->ms_sEND) == 0) &&
else if ((propName.compareIgnoreCase(nsCalKeyword::Instance()->ms_sEND) == 0) &&
(propVal.compareIgnoreCase(sType) == 0))
{
ICalProperty::deleteICalParameterVector(parameters);
@ -229,26 +229,26 @@ TZPart::parse(ICalReader * brFile, UnicodeString & sType,
break;
}
else if (
((propName.compareIgnoreCase(JulianKeyword::Instance()->ms_sEND) == 0) &&
((propName.compareIgnoreCase(nsCalKeyword::Instance()->ms_sEND) == 0) &&
(
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVTIMEZONE) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVCALENDAR) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVEVENT) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVTODO) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVJOURNAL) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVFREEBUSY) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVTIMEZONE) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVCALENDAR) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVEVENT) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVTODO) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVJOURNAL) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVFREEBUSY) == 0) ||
(ICalProperty::IsXToken(propVal))
))
||
((propName.compareIgnoreCase(JulianKeyword::Instance()->ms_sBEGIN) == 0) &&
((propName.compareIgnoreCase(nsCalKeyword::Instance()->ms_sBEGIN) == 0) &&
(
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sDAYLIGHT) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sSTANDARD) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVEVENT) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVTODO) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVJOURNAL) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVFREEBUSY) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVTIMEZONE) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sDAYLIGHT) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sSTANDARD) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVEVENT) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVTODO) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVJOURNAL) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVFREEBUSY) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVTIMEZONE) == 0) ||
(ICalProperty::IsXToken(propVal))
)))
{
@ -257,8 +257,8 @@ TZPart::parse(ICalReader * brFile, UnicodeString & sType,
// BEGIN:VEVENT, VTODO, VJOURNAL, VTIMEZONE, VFREEBUSY, xtoken
// END:VTIMEZONE, END:VCALENDAR
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iAbruptEndOfParsing,
JulianKeyword::Instance()->ms_sTZPART, strLine, 300);
nsCalLogErrorMessage::Instance()->ms_iAbruptEndOfParsing,
nsCalKeyword::Instance()->ms_sTZPART, strLine, 300);
ICalProperty::deleteICalParameterVector(parameters);
parameters->RemoveAll();
@ -302,8 +302,8 @@ void TZPart::storeData(UnicodeString & strLine, UnicodeString & propName,
else
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidPropertyName,
JulianKeyword::Instance()->ms_sTZPART, propName, 200);
nsCalLogErrorMessage::Instance()->ms_iInvalidPropertyName,
nsCalKeyword::Instance()->ms_sTZPART, propName, 200);
}
}
//---------------------------------------------------------------------
@ -312,14 +312,14 @@ void TZPart::storeComment(UnicodeString & strLine, UnicodeString & propVal,
{
// check parameters
t_bool bParamValid = ICalProperty::CheckParams(parameters,
JulianAtomRange::Instance()->ms_asAltrepLanguageParamRange,
JulianAtomRange::Instance()->ms_asAltrepLanguageParamRangeSize);
nsCalAtomRange::Instance()->ms_asAltrepLanguageParamRange,
nsCalAtomRange::Instance()->ms_asAltrepLanguageParamRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTZPART, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTZPART, strLine, 100);
}
addComment(propVal, parameters);
@ -329,13 +329,13 @@ void TZPart::storeTZName(UnicodeString & strLine, UnicodeString & propVal,
{
// check parameters
t_bool bParamValid = ICalProperty::CheckParams(parameters,
JulianAtomRange::Instance()->ms_asLanguageParamRange,
JulianAtomRange::Instance()->ms_asLanguageParamRangeSize);
nsCalAtomRange::Instance()->ms_asLanguageParamRange,
nsCalAtomRange::Instance()->ms_asLanguageParamRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTZPART, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTZPART, strLine, 100);
}
addTZName(propVal, parameters);
@ -348,16 +348,16 @@ void TZPart::storeDTStart(UnicodeString & strLine, UnicodeString & propVal,
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTZPART, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTZPART, strLine, 100);
}
if (getDTStartProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sTZPART,
JulianKeyword::Instance()->ms_sDTSTART, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sTZPART,
nsCalKeyword::Instance()->ms_sDTSTART, 100);
}
DateTime d(propVal);
if (DateTime::IsParseable(propVal, m_iStartYear, m_iStartMonth, m_iStartDay,
@ -375,16 +375,16 @@ void TZPart::storeRDate(UnicodeString & strLine, UnicodeString & propVal,
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTZPART, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTZPART, strLine, 100);
}
if (getRDateProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sTZPART,
JulianKeyword::Instance()->ms_sRDATE, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sTZPART,
nsCalKeyword::Instance()->ms_sRDATE, 100);
}
// DONE:?TODO: Finish
DateTime d(propVal);
@ -399,16 +399,16 @@ void TZPart::storeRRule(UnicodeString & strLine, UnicodeString & propVal,
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTZPART, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTZPART, strLine, 100);
}
if (getRRuleProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sTZPART,
JulianKeyword::Instance()->ms_sRRULE, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sTZPART,
nsCalKeyword::Instance()->ms_sRRULE, 100);
}
setRRule(propVal, parameters);
}
@ -419,16 +419,16 @@ void TZPart::storeTZOffsetTo(UnicodeString & strLine, UnicodeString & propVal,
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTZPART, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTZPART, strLine, 100);
}
if (getTZOffsetToProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sTZPART,
JulianKeyword::Instance()->ms_sTZOFFSETTO, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sTZPART,
nsCalKeyword::Instance()->ms_sTZOFFSETTO, 100);
}
setTZOffsetTo(propVal, parameters);
}
@ -439,16 +439,16 @@ void TZPart::storeTZOffsetFrom(UnicodeString & strLine, UnicodeString & propVal,
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sTZPART, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sTZPART, strLine, 100);
}
if (getTZOffsetFromProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sTZPART,
JulianKeyword::Instance()->ms_sTZOFFSETFROM, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sTZPART,
nsCalKeyword::Instance()->ms_sTZOFFSETFROM, 100);
}
setTZOffsetFrom(propVal, parameters);
}
@ -469,8 +469,8 @@ t_bool TZPart::isValid()
if (!getDTStart().isValid())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingStartingTime,
JulianKeyword::Instance()->ms_sTZPART, u, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingStartingTime,
nsCalKeyword::Instance()->ms_sTZPART, u, 300);
return FALSE;
}
u = getTZOffsetTo();
@ -488,7 +488,7 @@ t_bool TZPart::isValid()
UnicodeString TZPart::toICALString()
{
return ICalComponent::format(m_Name, JulianFormatString::Instance()->ms_sTZPartAllMessage, "");
return ICalComponent::format(m_Name, nsCalFormatString::Instance()->ms_sTZPartAllMessage, "");
}
//---------------------------------------------------------------------
@ -515,51 +515,51 @@ UnicodeString TZPart::formatChar(t_int32 c, UnicodeString sFilterAttendee,
switch (c)
{
case ms_cComment:
s = JulianKeyword::Instance()->ms_sCOMMENT;
s = nsCalKeyword::Instance()->ms_sCOMMENT;
return ICalProperty::propertyVectorToICALString(s, getComment(), sResult);
case ms_cTZName:
s = JulianKeyword::Instance()->ms_sTZNAME;
s = nsCalKeyword::Instance()->ms_sTZNAME;
return ICalProperty::propertyVectorToICALString(s, getTZName(), sResult);
case ms_cDTStart:
#if 0
s = JulianKeyword::Instance()->ms_sDTSTART;
s = nsCalKeyword::Instance()->ms_sDTSTART;
return ICalProperty::propertyToICALString(s, getDTStartProperty(), sResult);
#else
if (getDTStartProperty() != 0)
{
sResult += JulianKeyword::Instance()->ms_sDTSTART;
sResult += JulianKeyword::Instance()->ms_sCOLON_SYMBOL;
sResult += nsCalKeyword::Instance()->ms_sDTSTART;
sResult += nsCalKeyword::Instance()->ms_sCOLON_SYMBOL;
DateTime::ToISO8601String(m_iStartYear, m_iStartMonth, m_iStartDay,
m_iStartHour, m_iStartMinute, m_iStartSecond, s);
sResult += s;
sResult += JulianKeyword::Instance()->ms_sLINEBREAK;
sResult += nsCalKeyword::Instance()->ms_sLINEBREAK;
}
return sResult;
#endif
case ms_cRDate:
#if 0
s = JulianKeyword::Instance()->ms_sRDATE;
s = nsCalKeyword::Instance()->ms_sRDATE;
return ICalProperty::propertyToICALString(s, getRDateProperty(), sResult);
#else
if (getRDateProperty() != 0)
{
sResult += JulianKeyword::Instance()->ms_sRDATE;
sResult += JulianKeyword::Instance()->ms_sCOLON_SYMBOL;
sResult += nsCalKeyword::Instance()->ms_sRDATE;
sResult += nsCalKeyword::Instance()->ms_sCOLON_SYMBOL;
DateTime::ToISO8601String(m_iRDateYear, m_iRDateMonth, m_iRDateDay,
m_iRDateHour, m_iRDateMinute, m_iRDateSecond, s);
sResult += s;
sResult += JulianKeyword::Instance()->ms_sLINEBREAK;
sResult += nsCalKeyword::Instance()->ms_sLINEBREAK;
}
return sResult;
#endif
case ms_cRRule:
s = JulianKeyword::Instance()->ms_sRRULE;
s = nsCalKeyword::Instance()->ms_sRRULE;
return ICalProperty::propertyToICALString(s, getRRuleProperty(), sResult);
case ms_cTZOffsetTo:
s = JulianKeyword::Instance()->ms_sTZOFFSETTO;
s = nsCalKeyword::Instance()->ms_sTZOFFSETTO;
return ICalProperty::propertyToICALString(s, getTZOffsetToProperty(), sResult);
case ms_cTZOffsetFrom:
s = JulianKeyword::Instance()->ms_sTZOFFSETFROM;
s = nsCalKeyword::Instance()->ms_sTZOFFSETFROM;
return ICalProperty::propertyToICALString(s, getTZOffsetFromProperty(), sResult);
case ms_cXTokens:
return ICalProperty::vectorToICALString(getXTokens(), sResult);
@ -597,7 +597,7 @@ UnicodeString TZPart::toStringChar(t_int32 c, UnicodeString & dateFmt)
UnicodeString TZPart::toString()
{
return ICalComponent::toStringFmt(
JulianFormatString::Instance()->ms_TZPartStrDefaultFmt);
nsCalFormatString::Instance()->ms_TZPartStrDefaultFmt);
}
//---------------------------------------------------------------------
@ -648,8 +648,8 @@ t_bool TZPart::parseRRule()
//if (FALSE) TRACE("line (size = %d) = ---%s---\r\n", strLine.size(), strLine.toCString(""));
// manipulating string so I can use the parsePropertyLine method
strLine += ':'; //JulianKeyword::Instance()->ms_sCOLON_SYMBOL;
strLine.insert(0, JulianKeyword::Instance()->ms_sRRULE_WITH_SEMICOLON);
strLine += ':'; //nsCalKeyword::Instance()->ms_sCOLON_SYMBOL;
strLine.insert(0, nsCalKeyword::Instance()->ms_sRRULE_WITH_SEMICOLON);
//if (FALSE) TRACE("line (size = %d) = ---%s---\r\n", strLine.size(), strLine.toCString(""));
JulianPtrArray * parameters = new JulianPtrArray();
@ -670,7 +670,7 @@ t_bool TZPart::parseRRule()
pV = ip->getParameterValue(pV);
//if (FALSE) TRACE("pN = --%s--, pV = --%s--, paramSize = %d\r\n", pN.toCString(""), pV.toCString(""), parameters->GetSize());
if (pN.compareIgnoreCase(JulianKeyword::Instance()->ms_sBYMONTH) == 0)
if (pN.compareIgnoreCase(nsCalKeyword::Instance()->ms_sBYMONTH) == 0)
{
// since month is 0-based, must subtract 1
char * pVcc = pV.toCString("");
@ -678,7 +678,7 @@ t_bool TZPart::parseRRule()
m_StartMonth = nsCalUtility::atot_int32(pVcc, bParseError, pV.size()) - 1;
delete [] pVcc; pVcc = 0;
}
else if (pN.compareIgnoreCase(JulianKeyword::Instance()->ms_sBYDAY) == 0)
else if (pN.compareIgnoreCase(nsCalKeyword::Instance()->ms_sBYDAY) == 0)
{
if (pV.size() == 3)
{
@ -711,7 +711,7 @@ t_bool TZPart::parseRRule()
//else { bParseError = TRUE; }
}
}
else if (pN.compareIgnoreCase(JulianKeyword::Instance()->ms_sUNTIL) == 0)
else if (pN.compareIgnoreCase(nsCalKeyword::Instance()->ms_sUNTIL) == 0)
{
m_Until.setTimeString(pV);
}

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

@ -58,7 +58,7 @@ UnicodeStringTokenizer::UnicodeStringTokenizer(UnicodeString & str)
{
m_String = str;
m_MaxPosition = m_String.size();
m_StringDelimeters = JulianKeyword::Instance()->ms_sDEFAULT_DELIMS;
m_StringDelimeters = nsCalKeyword::Instance()->ms_sDEFAULT_DELIMS;
}
#endif
//---------------------------------------------------------------------

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

@ -171,7 +171,7 @@ VAlarm::parse(ICalReader * brFile, UnicodeString & sType,
{
UnicodeString strLine, propName, propVal;
JulianPtrArray * parameters = new JulianPtrArray();
parseStatus = JulianKeyword::Instance()->ms_sOK;
parseStatus = nsCalKeyword::Instance()->ms_sOK;
PR_ASSERT(parameters != 0 && brFile != 0);
if (parameters == 0 || brFile == 0)
@ -200,8 +200,8 @@ VAlarm::parse(ICalReader * brFile, UnicodeString & sType,
continue;
}
// END:STANDARD OR END:DAYLIGHT (sType = daylight or standard)
else if ((propName.compareIgnoreCase(JulianKeyword::Instance()->ms_sEND) == 0) &&
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVALARM) == 0))
else if ((propName.compareIgnoreCase(nsCalKeyword::Instance()->ms_sEND) == 0) &&
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVALARM) == 0))
{
ICalProperty::deleteICalParameterVector(parameters);
parameters->RemoveAll();
@ -209,31 +209,31 @@ VAlarm::parse(ICalReader * brFile, UnicodeString & sType,
break;
}
else if (
((propName.compareIgnoreCase(JulianKeyword::Instance()->ms_sEND) == 0) &&
( (propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVEVENT) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVTODO) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVCALENDAR) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVJOURNAL) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVFREEBUSY) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVTIMEZONE) == 0) ||
((propName.compareIgnoreCase(nsCalKeyword::Instance()->ms_sEND) == 0) &&
( (propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVEVENT) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVTODO) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVCALENDAR) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVJOURNAL) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVFREEBUSY) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVTIMEZONE) == 0) ||
(ICalProperty::IsXToken(propVal)))
) ||
((propName.compareIgnoreCase(JulianKeyword::Instance()->ms_sBEGIN) == 0) &&
((propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVEVENT) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVTODO) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVJOURNAL) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVFREEBUSY) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVTIMEZONE) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVCALENDAR) == 0) ||
((propName.compareIgnoreCase(nsCalKeyword::Instance()->ms_sBEGIN) == 0) &&
((propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVEVENT) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVTODO) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVJOURNAL) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVFREEBUSY) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVTIMEZONE) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVCALENDAR) == 0) ||
(ICalProperty::IsXToken(propVal)) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVALARM) == 0))))
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVALARM) == 0))))
{
// END:VEVENT, VTODO, VCALENDAR, VJOURNAL, VFREEBUSY, VTIMEZONE, x-token
// BEGIN:VEVENT, VTODO, VJOURNAL, VFREEBUSY, VTIMEZONE, VCALENDAR, VALARM, xtoken
// abrupt end
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iAbruptEndOfParsing,
JulianKeyword::Instance()->ms_sVALARM, strLine, 300);
nsCalLogErrorMessage::Instance()->ms_iAbruptEndOfParsing,
nsCalKeyword::Instance()->ms_sVALARM, strLine, 300);
ICalProperty::deleteICalParameterVector(parameters);
parameters->RemoveAll();
@ -262,25 +262,25 @@ void VAlarm::storeAction(UnicodeString & strLine, UnicodeString & propVal,
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVALARM, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVALARM, strLine, 100);
}
i = stringToAction(propVal);
if (i < 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidPropertyValue,
JulianKeyword::Instance()->ms_sVALARM,
JulianKeyword::Instance()->ms_sACTION, propVal, 200);
nsCalLogErrorMessage::Instance()->ms_iInvalidPropertyValue,
nsCalKeyword::Instance()->ms_sVALARM,
nsCalKeyword::Instance()->ms_sACTION, propVal, 200);
}
else
{
if (getAction() >= 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVALARM,
JulianKeyword::Instance()->ms_sACTION, propVal, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVALARM,
nsCalKeyword::Instance()->ms_sACTION, propVal, 100);
}
setAction((VAlarm::ACTION) i);
}
@ -292,15 +292,15 @@ void VAlarm::storeAttach(UnicodeString & strLine, UnicodeString & propVal,
{
t_bool bParamValid;
bParamValid = ICalProperty::CheckParamsWithValueRangeCheck(parameters,
JulianAtomRange::Instance()->ms_asEncodingValueFMTTypeParamRange,
JulianAtomRange::Instance()->ms_asEncodingValueFMTTypeParamRangeSize,
JulianAtomRange::Instance()->ms_asBinaryURIValueRange,
JulianAtomRange::Instance()->ms_asBinaryURIValueRangeSize);
nsCalAtomRange::Instance()->ms_asEncodingValueFMTTypeParamRange,
nsCalAtomRange::Instance()->ms_asEncodingValueFMTTypeParamRangeSize,
nsCalAtomRange::Instance()->ms_asBinaryURIValueRange,
nsCalAtomRange::Instance()->ms_asBinaryURIValueRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVALARM, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVALARM, strLine, 100);
}
addAttach(propVal, parameters);
}
@ -317,7 +317,7 @@ void VAlarm::storeAttendee(UnicodeString & strLine, UnicodeString & propVal,
if (!attendee->isValid())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidAttendee, 200);
nsCalLogErrorMessage::Instance()->ms_iInvalidAttendee, 200);
delete attendee; attendee = 0;
}
else
@ -333,23 +333,23 @@ void VAlarm::storeDescription(UnicodeString & strLine, UnicodeString & propVal,
// check parameters
t_bool bParamValid;
bParamValid = ICalProperty::CheckParams(parameters,
JulianAtomRange::Instance()->ms_asAltrepLanguageParamRange,
JulianAtomRange::Instance()->ms_asAltrepLanguageParamRangeSize);
nsCalAtomRange::Instance()->ms_asAltrepLanguageParamRange,
nsCalAtomRange::Instance()->ms_asAltrepLanguageParamRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVALARM, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVALARM, strLine, 100);
}
// check for duplicates
if (getDescriptionProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVALARM,
JulianKeyword::Instance()->ms_sDESCRIPTION, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVALARM,
nsCalKeyword::Instance()->ms_sDESCRIPTION, 100);
}
setDescription(propVal, parameters);
@ -362,16 +362,16 @@ void VAlarm::storeDuration(UnicodeString & strLine, UnicodeString & propVal,
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVALARM, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVALARM, strLine, 100);
}
if (getDurationProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVALARM,
JulianKeyword::Instance()->ms_sDURATION, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVALARM,
nsCalKeyword::Instance()->ms_sDURATION, 100);
}
nsCalDuration d(propVal);
setDuration(d, parameters);
@ -387,8 +387,8 @@ void VAlarm::storeRepeat(UnicodeString & strLine, UnicodeString & propVal,
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVALARM, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVALARM, strLine, 100);
}
char * pcc = propVal.toCString("");
@ -399,9 +399,9 @@ void VAlarm::storeRepeat(UnicodeString & strLine, UnicodeString & propVal,
if (getRepeatProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVALARM,
JulianKeyword::Instance()->ms_sREPEAT, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVALARM,
nsCalKeyword::Instance()->ms_sREPEAT, 100);
}
if (!bParseError)
{
@ -410,9 +410,9 @@ void VAlarm::storeRepeat(UnicodeString & strLine, UnicodeString & propVal,
else
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidNumberFormat,
JulianKeyword::Instance()->ms_sVALARM,
JulianKeyword::Instance()->ms_sREPEAT, propVal, 200);
nsCalLogErrorMessage::Instance()->ms_iInvalidNumberFormat,
nsCalKeyword::Instance()->ms_sVALARM,
nsCalKeyword::Instance()->ms_sREPEAT, propVal, 200);
}
}
//---------------------------------------------------------------------
@ -422,21 +422,21 @@ void VAlarm::storeSummary(UnicodeString & strLine, UnicodeString & propVal,
// check parameters
t_bool bParamValid;
bParamValid = ICalProperty::CheckParams(parameters,
JulianAtomRange::Instance()->ms_asLanguageParamRange,
JulianAtomRange::Instance()->ms_asLanguageParamRangeSize);
nsCalAtomRange::Instance()->ms_asLanguageParamRange,
nsCalAtomRange::Instance()->ms_asLanguageParamRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVALARM, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVALARM, strLine, 100);
}
if (getSummaryProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVALARM,
JulianKeyword::Instance()->ms_sSUMMARY, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVALARM,
nsCalKeyword::Instance()->ms_sSUMMARY, 100);
}
setSummary(propVal, parameters);
}
@ -448,21 +448,21 @@ void VAlarm::storeTrigger(UnicodeString & strLine, UnicodeString & propVal,
// check parameters
t_bool bParamValid;
bParamValid = ICalProperty::CheckParams(parameters,
JulianAtomRange::Instance()->ms_asRelatedValueParamRange,
JulianAtomRange::Instance()->ms_asRelatedValueParamRangeSize);
nsCalAtomRange::Instance()->ms_asRelatedValueParamRange,
nsCalAtomRange::Instance()->ms_asRelatedValueParamRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVALARM, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVALARM, strLine, 100);
}
// if propVal is a datetime, store trigger as a datetime, otherwise store is as a duration
if (getDurationProperty() != 0 || m_TriggerDateTime.isValid())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVALARM,
JulianKeyword::Instance()->ms_sDURATION, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVALARM,
nsCalKeyword::Instance()->ms_sDURATION, 100);
}
DateTime dt(propVal);
@ -502,8 +502,8 @@ VAlarm::storeData(UnicodeString & strLine, UnicodeString & propName,
else
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidPropertyName,
JulianKeyword::Instance()->ms_sVALARM, propName, 200);
nsCalLogErrorMessage::Instance()->ms_iInvalidPropertyName,
nsCalKeyword::Instance()->ms_sVALARM, propName, 200);
}
}
@ -524,7 +524,7 @@ void VAlarm::selfCheck()
if (getDescription().size() == 0)
{
// TODO: make this localized;
//u = JulianLogErrorMessage::Instance()->ms_iDefaultAlarmDescriptionString;
//u = nsCalLogErrorMessage::Instance()->ms_iDefaultAlarmDescriptionString;
u = "DEFAULT";
setDescription(u);
}
@ -537,14 +537,14 @@ void VAlarm::selfCheck()
if (getDescription().size() == 0)
{
// TODO: make this localized;
//u = JulianLogErrorMessage::Instance()->ms_iDefaultAlarmDescriptionString;
//u = nsCalLogErrorMessage::Instance()->ms_iDefaultAlarmDescriptionString;
u = "DEFAULT";
setDescription(u);
}
if (getSummary().size() == 0)
{
// TODO: make this localized;
//u = JulianLogErrorMessage::Instance()->ms_iDefaultAlarmSummaryString;
//u = nsCalLogErrorMessage::Instance()->ms_iDefaultAlarmSummaryString;
u = "DEFAULT";
setSummary(u);
}
@ -621,8 +621,8 @@ t_bool VAlarm::isValid()
//---------------------------------------------------------------------
UnicodeString VAlarm::toICALString()
{
UnicodeString u = JulianKeyword::Instance()->ms_sVALARM;
return ICalComponent::format(u, JulianFormatString::Instance()->ms_sVAlarmAllMessage, "");
UnicodeString u = nsCalKeyword::Instance()->ms_sVALARM;
return ICalComponent::format(u, nsCalFormatString::Instance()->ms_sVAlarmAllMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VAlarm::toICALString(UnicodeString method,
@ -637,7 +637,7 @@ UnicodeString VAlarm::toICALString(UnicodeString method,
UnicodeString VAlarm::toString()
{
return ICalComponent::toStringFmt(
JulianFormatString::Instance()->ms_VAlarmStrDefaultFmt);
nsCalFormatString::Instance()->ms_VAlarmStrDefaultFmt);
}
//---------------------------------------------------------------------
UnicodeString VAlarm::formatChar(t_int32 c, UnicodeString sFilterAttendee,
@ -654,45 +654,45 @@ UnicodeString VAlarm::formatChar(t_int32 c, UnicodeString sFilterAttendee,
{
case ms_cAction:
// print method enum
sResult += JulianKeyword::Instance()->ms_sACTION;
sResult += JulianKeyword::Instance()->ms_sCOLON_SYMBOL;
sResult += nsCalKeyword::Instance()->ms_sACTION;
sResult += nsCalKeyword::Instance()->ms_sCOLON_SYMBOL;
sResult += actionToString(getAction(), s);
sResult += JulianKeyword::Instance()->ms_sLINEBREAK;
sResult += nsCalKeyword::Instance()->ms_sLINEBREAK;
return sResult;
case ms_cAttendees:
s = JulianKeyword::Instance()->ms_sATTENDEE;
s = nsCalKeyword::Instance()->ms_sATTENDEE;
return ICalProperty::propertyVectorToICALString(s, getAttendees(), sResult);
case ms_cAttach:
s = JulianKeyword::Instance()->ms_sATTACH;
s = nsCalKeyword::Instance()->ms_sATTACH;
return ICalProperty::propertyVectorToICALString(s, getAttach(), sResult);
case ms_cDescription:
s = JulianKeyword::Instance()->ms_sDESCRIPTION;
s = nsCalKeyword::Instance()->ms_sDESCRIPTION;
return ICalProperty::propertyToICALString(s, getDescriptionProperty(), sResult);
case ms_cDuration:
s = JulianKeyword::Instance()->ms_sDURATION;
s = nsCalKeyword::Instance()->ms_sDURATION;
return ICalProperty::propertyToICALString(s, getDurationProperty(), sResult);
case ms_cRepeat:
s = JulianKeyword::Instance()->ms_sREPEAT;
s = nsCalKeyword::Instance()->ms_sREPEAT;
return ICalProperty::propertyToICALString(s, getRepeatProperty(), sResult);
case ms_cTrigger:
s = JulianKeyword::Instance()->ms_sTRIGGER;
s = nsCalKeyword::Instance()->ms_sTRIGGER;
if (m_Trigger != 0)
{
return ICalProperty::propertyToICALString(s, getTriggerProperty(), sResult);
}
else
{
s += JulianKeyword::Instance()->ms_sSEMICOLON_SYMBOL;
s += JulianKeyword::Instance()->ms_sVALUE;
s += nsCalKeyword::Instance()->ms_sSEMICOLON_SYMBOL;
s += nsCalKeyword::Instance()->ms_sVALUE;
s += '=';
s += JulianKeyword::Instance()->ms_sDATETIME;
s += JulianKeyword::Instance()->ms_sCOLON_SYMBOL;
s += nsCalKeyword::Instance()->ms_sDATETIME;
s += nsCalKeyword::Instance()->ms_sCOLON_SYMBOL;
s += m_TriggerDateTime.toISO8601();
s += JulianKeyword::Instance()->ms_sLINEBREAK;
s += nsCalKeyword::Instance()->ms_sLINEBREAK;
return s;
}
case ms_cSummary:
s = JulianKeyword::Instance()->ms_sSUMMARY;
s = nsCalKeyword::Instance()->ms_sSUMMARY;
return ICalProperty::propertyToICALString(s, getSummaryProperty(), sResult);
case ms_cXTokens:
return ICalProperty::vectorToICALString(getXTokens(), sResult);
@ -769,10 +769,10 @@ VAlarm::stringToAction(UnicodeString & action)
{
t_int32 hashCode = action.hashCode();
if (JulianKeyword::Instance()->ms_ATOM_AUDIO == hashCode) return ACTION_AUDIO;
else if (JulianKeyword::Instance()->ms_ATOM_DISPLAY == hashCode) return ACTION_DISPLAY;
else if (JulianKeyword::Instance()->ms_ATOM_EMAIL == hashCode) return ACTION_EMAIL;
else if (JulianKeyword::Instance()->ms_ATOM_PROCEDURE == hashCode) return ACTION_PROCEDURE;
if (nsCalKeyword::Instance()->ms_ATOM_AUDIO == hashCode) return ACTION_AUDIO;
else if (nsCalKeyword::Instance()->ms_ATOM_DISPLAY == hashCode) return ACTION_DISPLAY;
else if (nsCalKeyword::Instance()->ms_ATOM_EMAIL == hashCode) return ACTION_EMAIL;
else if (nsCalKeyword::Instance()->ms_ATOM_PROCEDURE == hashCode) return ACTION_PROCEDURE;
else return ACTION_INVALID;
// ??? is AUDIO to be default, or should I have invalid state?
}
@ -783,10 +783,10 @@ UnicodeString & VAlarm::actionToString(VAlarm::ACTION action, UnicodeString & ou
{
switch(action)
{
case ACTION_AUDIO: out = JulianKeyword::Instance()->ms_sAUDIO; break;
case ACTION_DISPLAY: out = JulianKeyword::Instance()->ms_sDISPLAY; break;
case ACTION_EMAIL: out = JulianKeyword::Instance()->ms_sEMAIL; break;
case ACTION_PROCEDURE: out = JulianKeyword::Instance()->ms_sPROCEDURE; break;
case ACTION_AUDIO: out = nsCalKeyword::Instance()->ms_sAUDIO; break;
case ACTION_DISPLAY: out = nsCalKeyword::Instance()->ms_sDISPLAY; break;
case ACTION_EMAIL: out = nsCalKeyword::Instance()->ms_sEMAIL; break;
case ACTION_PROCEDURE: out = nsCalKeyword::Instance()->ms_sPROCEDURE; break;
default:
out = "";
break;

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

@ -39,7 +39,7 @@
//---------------------------------------------------------------------
void VEvent::setDefaultFmt(UnicodeString s)
{
JulianFormatString::Instance()->ms_VEventStrDefaultFmt = s;
nsCalFormatString::Instance()->ms_VEventStrDefaultFmt = s;
}
//---------------------------------------------------------------------
@ -155,7 +155,7 @@ VEvent::parse(ICalReader * brFile, UnicodeString & sMethod,
UnicodeString & parseStatus, JulianPtrArray * vTimeZones,
t_bool bIgnoreBeginError, nsCalUtility::MimeEncoding encoding)
{
UnicodeString u = JulianKeyword::Instance()->ms_sVEVENT;
UnicodeString u = nsCalKeyword::Instance()->ms_sVEVENT;
return parseType(u, brFile, sMethod, parseStatus, vTimeZones, bIgnoreBeginError, encoding);
}
@ -210,7 +210,7 @@ void VEvent::selfCheck()
// if is anniversary event, set transp to TRANSPARENT
if (isAllDayEvent())
{
setTransp(JulianKeyword::Instance()->ms_sTRANSP);
setTransp(nsCalKeyword::Instance()->ms_sTRANSP);
// if no dtend, set dtend to end of day of dtstart.
if (!getDTEnd().isValid())
@ -232,7 +232,7 @@ void VEvent::selfCheck()
setDTEnd(d);
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDTEndBeforeDTStart, 100);
nsCalLogErrorMessage::Instance()->ms_iDTEndBeforeDTStart, 100);
}
}
else
@ -254,7 +254,7 @@ void VEvent::selfCheck()
setDTEnd(d);
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDTEndBeforeDTStart, 100);
nsCalLogErrorMessage::Instance()->ms_iDTEndBeforeDTStart, 100);
}
}
if (getStatus().size() > 0)
@ -264,14 +264,14 @@ void VEvent::selfCheck()
u.toUpper();
ICalProperty::Trim(u);
JAtom ua(u);
if ((JulianKeyword::Instance()->ms_ATOM_CONFIRMED != ua) &&
(JulianKeyword::Instance()->ms_ATOM_TENTATIVE != ua) &&
(JulianKeyword::Instance()->ms_ATOM_CANCELLED != ua))
if ((nsCalKeyword::Instance()->ms_ATOM_CONFIRMED != ua) &&
(nsCalKeyword::Instance()->ms_ATOM_TENTATIVE != ua) &&
(nsCalKeyword::Instance()->ms_ATOM_CANCELLED != ua))
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidPropertyValue,
JulianKeyword::Instance()->ms_sVEVENT,
JulianKeyword::Instance()->ms_sSTATUS, u, 200);
nsCalLogErrorMessage::Instance()->ms_iInvalidPropertyValue,
nsCalKeyword::Instance()->ms_sVEVENT,
nsCalKeyword::Instance()->ms_sSTATUS, u, 200);
setStatus("");
}
@ -284,27 +284,27 @@ void VEvent::storeDTEnd(UnicodeString & strLine, UnicodeString & propVal,
{
// check parameters
t_bool bParamValid = ICalProperty::CheckParamsWithValueRangeCheck(parameters,
JulianAtomRange::Instance()->ms_asTZIDValueParamRange,
JulianAtomRange::Instance()->ms_asTZIDValueParamRangeSize,
JulianAtomRange::Instance()->ms_asDateDateTimeValueRange,
JulianAtomRange::Instance()->ms_asDateDateTimeValueRangeSize);
nsCalAtomRange::Instance()->ms_asTZIDValueParamRange,
nsCalAtomRange::Instance()->ms_asTZIDValueParamRangeSize,
nsCalAtomRange::Instance()->ms_asDateDateTimeValueRange,
nsCalAtomRange::Instance()->ms_asDateDateTimeValueRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVEVENT, strLine, 100);
}
if (getDTEndProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVEVENT,
JulianKeyword::Instance()->ms_sDTEND, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVEVENT,
nsCalKeyword::Instance()->ms_sDTEND, 100);
}
UnicodeString u, out;
u = JulianKeyword::Instance()->ms_sVALUE;
u = nsCalKeyword::Instance()->ms_sVALUE;
out = ICalParameter::GetParameterFromVector(u, out, parameters);
t_bool bIsDate = DateTime::IsParseableDate(propVal);
@ -312,21 +312,21 @@ void VEvent::storeDTEnd(UnicodeString & strLine, UnicodeString & propVal,
if (bIsDate)
{
// if there is a VALUE=X parameter, make sure X is DATE
if (out.size() != 0 && (JulianKeyword::Instance()->ms_ATOM_DATE != out.hashCode()))
if (out.size() != 0 && (nsCalKeyword::Instance()->ms_ATOM_DATE != out.hashCode()))
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iPropertyValueTypeMismatch,
JulianKeyword::Instance()->ms_sVEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iPropertyValueTypeMismatch,
nsCalKeyword::Instance()->ms_sVEVENT, strLine, 100);
}
}
else
{
// if there is a VALUE=X parameter, make sure X is DATETIME
if (out.size() != 0 && (JulianKeyword::Instance()->ms_ATOM_DATETIME != out.hashCode()))
if (out.size() != 0 && (nsCalKeyword::Instance()->ms_ATOM_DATETIME != out.hashCode()))
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iPropertyValueTypeMismatch,
JulianKeyword::Instance()->ms_sVEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iPropertyValueTypeMismatch,
nsCalKeyword::Instance()->ms_sVEVENT, strLine, 100);
}
}
@ -342,16 +342,16 @@ void VEvent::storeDuration(UnicodeString & strLine, UnicodeString & propVal,
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVEVENT, strLine, 100);
}
if (m_TempDuration != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVEVENT,
JulianKeyword::Instance()->ms_sDURATION, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVEVENT,
nsCalKeyword::Instance()->ms_sDURATION, 100);
}
//Duration d(propVal);
if (m_TempDuration == 0)
@ -369,16 +369,16 @@ void VEvent::storeGEO(UnicodeString & strLine, UnicodeString & propVal,
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVEVENT, strLine, 100);
}
if (getGEOProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVEVENT,
JulianKeyword::Instance()->ms_sGEO, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVEVENT,
nsCalKeyword::Instance()->ms_sGEO, 100);
}
setGEO(propVal, parameters);
}
@ -386,22 +386,22 @@ void VEvent::storeLocation(UnicodeString & strLine, UnicodeString & propVal,
JulianPtrArray * parameters, JulianPtrArray * vTimeZones)
{
t_bool bParamValid = ICalProperty::CheckParams(parameters,
JulianAtomRange::Instance()->ms_asAltrepLanguageParamRange,
JulianAtomRange::Instance()->ms_asAltrepLanguageParamRangeSize);
nsCalAtomRange::Instance()->ms_asAltrepLanguageParamRange,
nsCalAtomRange::Instance()->ms_asAltrepLanguageParamRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVEVENT, strLine, 100);
}
if (getLocationProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVEVENT,
JulianKeyword::Instance()->ms_sLOCATION, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVEVENT,
nsCalKeyword::Instance()->ms_sLOCATION, 100);
}
setLocation(propVal, parameters);
}
@ -415,8 +415,8 @@ void VEvent::storePriority(UnicodeString & strLine, UnicodeString & propVal,
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVEVENT, strLine, 100);
}
char * pcc = propVal.toCString("");
@ -426,9 +426,9 @@ void VEvent::storePriority(UnicodeString & strLine, UnicodeString & propVal,
if (getPriorityProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVEVENT,
JulianKeyword::Instance()->ms_sPRIORITY, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVEVENT,
nsCalKeyword::Instance()->ms_sPRIORITY, 100);
}
if (!bParseError)
{
@ -436,9 +436,9 @@ void VEvent::storePriority(UnicodeString & strLine, UnicodeString & propVal,
}
else
{
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iInvalidNumberFormat,
JulianKeyword::Instance()->ms_sVEVENT,
JulianKeyword::Instance()->ms_sPRIORITY, propVal, 200);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iInvalidNumberFormat,
nsCalKeyword::Instance()->ms_sVEVENT,
nsCalKeyword::Instance()->ms_sPRIORITY, propVal, 200);
}
}
void VEvent::storeResources(UnicodeString & strLine, UnicodeString & propVal,
@ -446,13 +446,13 @@ void VEvent::storeResources(UnicodeString & strLine, UnicodeString & propVal,
{
// check parameters
t_bool bParamValid = ICalProperty::CheckParams(parameters,
JulianAtomRange::Instance()->ms_asLanguageParamRange,
JulianAtomRange::Instance()->ms_asLanguageParamRangeSize);
nsCalAtomRange::Instance()->ms_asLanguageParamRange,
nsCalAtomRange::Instance()->ms_asLanguageParamRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVEVENT, strLine, 100);
}
addResourcesPropertyVector(propVal, parameters);
@ -464,16 +464,16 @@ void VEvent::storeTransp(UnicodeString & strLine, UnicodeString & propVal,
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVEVENT, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVEVENT, strLine, 100);
}
if (getTranspProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVEVENT,
JulianKeyword::Instance()->ms_sTRANSP, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVEVENT,
nsCalKeyword::Instance()->ms_sTRANSP, 100);
}
setTransp(propVal, parameters);
}
@ -500,10 +500,10 @@ VEvent::storeData(UnicodeString & strLine, UnicodeString & propName,
}
}
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidPropertyName,
JulianKeyword::Instance()->ms_sVEVENT, propName, 200);
nsCalLogErrorMessage::Instance()->ms_iInvalidPropertyName,
nsCalKeyword::Instance()->ms_sVEVENT, propName, 200);
UnicodeString u;
u = JulianLogErrorMessage::Instance()->ms_sRS202;
u = nsCalLogErrorMessage::Instance()->ms_sRS202;
u += '.'; u += ' ';
u += strLine;
addRequestStatus(u);
@ -573,7 +573,7 @@ UnicodeString VEvent::formatHelper(UnicodeString & strFmt,
UnicodeString sFilterAttendee,
t_bool delegateRequest)
{
UnicodeString u = JulianKeyword::Instance()->ms_sVEVENT;
UnicodeString u = nsCalKeyword::Instance()->ms_sVEVENT;
return ICalComponent::format(u, strFmt, sFilterAttendee, delegateRequest);
}
@ -582,7 +582,7 @@ UnicodeString VEvent::formatHelper(UnicodeString & strFmt,
UnicodeString VEvent::toString()
{
return ICalComponent::toStringFmt(
JulianFormatString::Instance()->ms_VEventStrDefaultFmt);
nsCalFormatString::Instance()->ms_VEventStrDefaultFmt);
}
//---------------------------------------------------------------------
@ -620,29 +620,29 @@ UnicodeString VEvent::formatChar(t_int32 c, UnicodeString sFilterAttendee,
UnicodeString s, sResult;
switch (c) {
case ms_cDTEnd:
s = JulianKeyword::Instance()->ms_sDTEND;
s = nsCalKeyword::Instance()->ms_sDTEND;
return ICalProperty::propertyToICALString(s, getDTEndProperty(), sResult);
case ms_cDuration:
s = JulianKeyword::Instance()->ms_sDURATION;
s = nsCalKeyword::Instance()->ms_sDURATION;
s += ':';
s += getDuration().toICALString();
s += JulianKeyword::Instance()->ms_sLINEBREAK;
s += nsCalKeyword::Instance()->ms_sLINEBREAK;
return s;
//return ICalProperty::propertyToICALString(s, getDurationProperty(), sResult);
case ms_cLocation:
s = JulianKeyword::Instance()->ms_sLOCATION;
s = nsCalKeyword::Instance()->ms_sLOCATION;
return ICalProperty::propertyToICALString(s, getLocationProperty(), sResult);
case ms_cPriority:
s = JulianKeyword::Instance()->ms_sPRIORITY;
s = nsCalKeyword::Instance()->ms_sPRIORITY;
return ICalProperty::propertyToICALString(s, getPriorityProperty(), sResult);
case ms_cResources:
s = JulianKeyword::Instance()->ms_sRESOURCES;
s = nsCalKeyword::Instance()->ms_sRESOURCES;
return ICalProperty::propertyVectorToICALString(s, getResources(), sResult);
case ms_cGEO:
s = JulianKeyword::Instance()->ms_sGEO;
s = nsCalKeyword::Instance()->ms_sGEO;
return ICalProperty::propertyToICALString(s, getGEOProperty(), sResult);
case ms_cTransp:
s = JulianKeyword::Instance()->ms_sTRANSP;
s = nsCalKeyword::Instance()->ms_sTRANSP;
return ICalProperty::propertyToICALString(s, getTranspProperty(), sResult);
default:
{
@ -655,41 +655,41 @@ UnicodeString VEvent::formatChar(t_int32 c, UnicodeString sFilterAttendee,
t_bool VEvent::isValid()
{
if ((getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sPUBLISH) == 0) ||
(getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sREQUEST) == 0) ||
(getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sADD) == 0))
if ((getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sPUBLISH) == 0) ||
(getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sREQUEST) == 0) ||
(getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sADD) == 0))
{
// must have dtstart
if ((!getDTStart().isValid()))
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingStartingTime, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingStartingTime, 300);
return FALSE;
}
// If dtend exists, make sure it is not before dtstart
if (getDTEnd().isValid() && getDTEnd() < getDTStart())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iEndBeforeStartTime, 300);
nsCalLogErrorMessage::Instance()->ms_iEndBeforeStartTime, 300);
return FALSE;
}
// must have dtstamp, summary, uid
if (!getDTStamp().isValid())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
return FALSE;
}
if (getSummary().size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingSummary, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingSummary, 300);
return FALSE;
}
if (getUID().size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingUID, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingUID, 300);
return FALSE;
}
@ -698,7 +698,7 @@ t_bool VEvent::isValid()
if (getOrganizer().size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingOrganizer, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingOrganizer, 300);
return FALSE;
}
*/
@ -706,34 +706,34 @@ t_bool VEvent::isValid()
if (getSequence() < 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingSeqNo, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingSeqNo, 300);
return FALSE;
}
if (getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sREQUEST) == 0)
if (getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sREQUEST) == 0)
{
if (getAttendees() == 0 || getAttendees()->GetSize() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingAttendees, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingAttendees, 300);
return FALSE;
}
}
}
else if ((getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sREPLY) == 0) ||
(getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sCANCEL) == 0) ||
(getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sDECLINECOUNTER) == 0))
else if ((getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sREPLY) == 0) ||
(getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sCANCEL) == 0) ||
(getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sDECLINECOUNTER) == 0))
{
// must have dtstamp, uid
if (!getDTStamp().isValid())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
return FALSE;
}
if (getUID().size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingUID, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingUID, 300);
return FALSE;
}
@ -741,58 +741,58 @@ t_bool VEvent::isValid()
if (getOrganizer().size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingOrganizer, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingOrganizer, 300);
return FALSE;
}
// must have sequence >= 0
if (getSequence() < 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingSeqNo, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingSeqNo, 300);
return FALSE;
}
if (getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sREPLY) == 0)
if (getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sREPLY) == 0)
{
// TODO: attendees are required, commenting out for now
if (getAttendees() == 0 || getAttendees()->GetSize() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingAttendees, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingAttendees, 300);
return FALSE;
}
}
}
else if ((getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sREFRESH) == 0))
else if ((getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sREFRESH) == 0))
{
// must have dtstamp, uid
if (!getDTStamp().isValid())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
return FALSE;
}
if (getUID().size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingUID, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingUID, 300);
return FALSE;
}
// TODO: attendees required?
}
else if ((getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sCOUNTER) == 0))
else if ((getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sCOUNTER) == 0))
{
// must have dtstamp, uid
if (!getDTStamp().isValid())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
return FALSE;
}
if (getUID().size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingUID, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingUID, 300);
return FALSE;
}
@ -800,7 +800,7 @@ t_bool VEvent::isValid()
if (getSequence() < 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingSeqNo, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingSeqNo, 300);
return FALSE;
}
}
@ -821,79 +821,79 @@ t_bool VEvent::isCriticalInfoSame()
UnicodeString VEvent::cancelMessage()
{
UnicodeString s = JulianKeyword::Instance()->ms_sCANCELLED;
UnicodeString s = nsCalKeyword::Instance()->ms_sCANCELLED;
setStatus(s);
return formatHelper(JulianFormatString::Instance()->ms_sVEventCancelMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVEventCancelMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VEvent::requestMessage()
{
return formatHelper(JulianFormatString::Instance()->ms_sVEventRequestMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVEventRequestMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VEvent::requestRecurMessage()
{
return formatHelper(JulianFormatString::Instance()->ms_sVEventRecurRequestMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVEventRecurRequestMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VEvent::counterMessage()
{
return formatHelper(JulianFormatString::Instance()->ms_sVEventCounterMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVEventCounterMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VEvent::declineCounterMessage()
{
return formatHelper(JulianFormatString::Instance()->ms_sVEventDeclineCounterMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVEventDeclineCounterMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VEvent::addMessage()
{
return formatHelper(JulianFormatString::Instance()->ms_sVEventAddMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVEventAddMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VEvent::refreshMessage(UnicodeString sAttendeeFilter)
{
return formatHelper(JulianFormatString::Instance()->ms_sVEventRefreshMessage, sAttendeeFilter);
return formatHelper(nsCalFormatString::Instance()->ms_sVEventRefreshMessage, sAttendeeFilter);
}
//---------------------------------------------------------------------
UnicodeString VEvent::allMessage()
{
return formatHelper(JulianFormatString::Instance()->ms_sVEventAllPropertiesMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVEventAllPropertiesMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VEvent::replyMessage(UnicodeString sAttendeeFilter)
{
return formatHelper(JulianFormatString::Instance()->ms_sVEventReplyMessage, sAttendeeFilter);
return formatHelper(nsCalFormatString::Instance()->ms_sVEventReplyMessage, sAttendeeFilter);
}
//---------------------------------------------------------------------
UnicodeString VEvent::publishMessage()
{
return formatHelper(JulianFormatString::Instance()->ms_sVEventPublishMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVEventPublishMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VEvent::publishRecurMessage()
{
return formatHelper(JulianFormatString::Instance()->ms_sVEventRecurPublishMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVEventRecurPublishMessage, "");
}
//---------------------------------------------------------------------

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

@ -552,7 +552,7 @@ VFreebusy::parse(ICalReader * brFile, UnicodeString & method,
UnicodeString & parseStatus, JulianPtrArray * vTimeZones,
t_bool bIgnoreBeginError, nsCalUtility::MimeEncoding encoding)
{
parseStatus = JulianKeyword::Instance()->ms_sOK;
parseStatus = nsCalKeyword::Instance()->ms_sOK;
UnicodeString strLine, propName, propVal;
JulianPtrArray * parameters = new JulianPtrArray();
@ -585,8 +585,8 @@ VFreebusy::parse(ICalReader * brFile, UnicodeString & method,
continue;
}
else if ((propName.compareIgnoreCase(JulianKeyword::Instance()->ms_sEND) == 0) &&
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVFREEBUSY) == 0))
else if ((propName.compareIgnoreCase(nsCalKeyword::Instance()->ms_sEND) == 0) &&
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVFREEBUSY) == 0))
{
ICalProperty::deleteICalParameterVector(parameters);
parameters->RemoveAll();
@ -594,21 +594,21 @@ VFreebusy::parse(ICalReader * brFile, UnicodeString & method,
break;
}
else if (
((propName.compareIgnoreCase(JulianKeyword::Instance()->ms_sBEGIN) == 0) &&
((propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVFREEBUSY) == 0) && !bIgnoreBeginError )||
((propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVCALENDAR) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVEVENT) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVTODO) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVJOURNAL) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVTIMEZONE) == 0) ||
((propName.compareIgnoreCase(nsCalKeyword::Instance()->ms_sBEGIN) == 0) &&
((propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVFREEBUSY) == 0) && !bIgnoreBeginError )||
((propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVCALENDAR) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVEVENT) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVTODO) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVJOURNAL) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVTIMEZONE) == 0) ||
(ICalProperty::IsXToken(propVal)))
) ||
((propName.compareIgnoreCase(JulianKeyword::Instance()->ms_sEND) == 0) &&
((propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVCALENDAR) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVEVENT) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVTODO) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVJOURNAL) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVTIMEZONE) == 0) ||
((propName.compareIgnoreCase(nsCalKeyword::Instance()->ms_sEND) == 0) &&
((propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVCALENDAR) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVEVENT) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVTODO) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVJOURNAL) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVTIMEZONE) == 0) ||
(ICalProperty::IsXToken(propVal)))
)
) //else if
@ -621,8 +621,8 @@ VFreebusy::parse(ICalReader * brFile, UnicodeString & method,
parseStatus = strLine;
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iAbruptEndOfParsing,
JulianKeyword::Instance()->ms_sVFREEBUSY, strLine, 300);
nsCalLogErrorMessage::Instance()->ms_iAbruptEndOfParsing,
nsCalKeyword::Instance()->ms_sVFREEBUSY, strLine, 300);
break;
}
else
@ -674,13 +674,13 @@ VFreebusy::storeData(UnicodeString & strLine, UnicodeString & propName,
else
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidPropertyName,
JulianKeyword::Instance()->ms_sVFREEBUSY, propName, 200);
nsCalLogErrorMessage::Instance()->ms_iInvalidPropertyName,
nsCalKeyword::Instance()->ms_sVFREEBUSY, propName, 200);
UnicodeString u;
u = JulianLogErrorMessage::Instance()->ms_sRS202;
u = nsCalLogErrorMessage::Instance()->ms_sRS202;
u += '.'; u += ' ';
u += strLine;
//setRequestStatus(JulianLogErrorMessage::Instance()->ms_iRS202);
//setRequestStatus(nsCalLogErrorMessage::Instance()->ms_iRS202);
addRequestStatus(u);
return FALSE;
}
@ -698,13 +698,13 @@ void VFreebusy::storeAttendees(UnicodeString & strLine, UnicodeString & propVal,
if (!attendee->isValid())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidAttendee,
JulianKeyword::Instance()->ms_sVFREEBUSY, propVal, 200);
nsCalLogErrorMessage::Instance()->ms_iInvalidAttendee,
nsCalKeyword::Instance()->ms_sVFREEBUSY, propVal, 200);
UnicodeString u;
u = JulianLogErrorMessage::Instance()->ms_sRS202;
u = nsCalLogErrorMessage::Instance()->ms_sRS202;
u += '.'; u += ' ';
u += strLine;
//setRequestStatus(JulianLogErrorMessage::Instance()->ms_iRS202);
//setRequestStatus(nsCalLogErrorMessage::Instance()->ms_iRS202);
addRequestStatus(u);
delete attendee; attendee = 0;
}
@ -719,14 +719,14 @@ void VFreebusy::storeComment(UnicodeString & strLine, UnicodeString & propVal,
{
// check parameters
t_bool bParamValid = ICalProperty::CheckParams(parameters,
JulianAtomRange::Instance()->ms_asAltrepLanguageParamRange,
JulianAtomRange::Instance()->ms_asAltrepLanguageParamRangeSize);
nsCalAtomRange::Instance()->ms_asAltrepLanguageParamRange,
nsCalAtomRange::Instance()->ms_asAltrepLanguageParamRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVFREEBUSY, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVFREEBUSY, strLine, 100);
}
addComment(propVal, parameters);
}
@ -735,13 +735,13 @@ void VFreebusy::storeContact(UnicodeString & strLine, UnicodeString & propVal,
{
// check parameters
t_bool bParamValid = ICalProperty::CheckParams(parameters,
JulianAtomRange::Instance()->ms_asAltrepLanguageParamRange,
JulianAtomRange::Instance()->ms_asAltrepLanguageParamRangeSize);
nsCalAtomRange::Instance()->ms_asAltrepLanguageParamRange,
nsCalAtomRange::Instance()->ms_asAltrepLanguageParamRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVFREEBUSY, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVFREEBUSY, strLine, 100);
}
addContact(propVal, parameters);
}
@ -752,16 +752,16 @@ void VFreebusy::storeCreated(UnicodeString & strLine, UnicodeString & propVal,
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVFREEBUSY, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVFREEBUSY, strLine, 100);
}
if (getCreatedProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVFREEBUSY,
JulianKeyword::Instance()->ms_sCREATED, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVFREEBUSY,
nsCalKeyword::Instance()->ms_sCREATED, 100);
}
DateTime d;
d = VTimeZone::DateTimeApplyTimeZone(propVal, vTimeZones, parameters);
@ -776,16 +776,16 @@ void VFreebusy::storeDuration(UnicodeString & strLine, UnicodeString & propVal,
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVFREEBUSY, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVFREEBUSY, strLine, 100);
}
if (m_TempDuration != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVFREEBUSY,
JulianKeyword::Instance()->ms_sDURATION, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVFREEBUSY,
nsCalKeyword::Instance()->ms_sDURATION, 100);
}
//Duration d(propVal);
if (m_TempDuration == 0)
@ -803,17 +803,17 @@ void VFreebusy::storeDTEnd(UnicodeString & strLine, UnicodeString & propVal,
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVFREEBUSY, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVFREEBUSY, strLine, 100);
}
// DTEND must be in UTC
if (getDTEndProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVFREEBUSY,
JulianKeyword::Instance()->ms_sDTEND, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVFREEBUSY,
nsCalKeyword::Instance()->ms_sDTEND, 100);
}
DateTime d;
d = VTimeZone::DateTimeApplyTimeZone(propVal, vTimeZones, parameters);
@ -827,17 +827,17 @@ void VFreebusy::storeDTStart(UnicodeString & strLine, UnicodeString & propVal,
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVFREEBUSY, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVFREEBUSY, strLine, 100);
}
// DTSTART must be in UTC
if (getDTStartProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVFREEBUSY,
JulianKeyword::Instance()->ms_sDTSTART, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVFREEBUSY,
nsCalKeyword::Instance()->ms_sDTSTART, 100);
}
DateTime d;
d = VTimeZone::DateTimeApplyTimeZone(propVal, vTimeZones, parameters);
@ -851,16 +851,16 @@ void VFreebusy::storeDTStamp(UnicodeString & strLine, UnicodeString & propVal,
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVFREEBUSY, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVFREEBUSY, strLine, 100);
}
if (getDTStampProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVFREEBUSY,
JulianKeyword::Instance()->ms_sDTSTAMP, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVFREEBUSY,
nsCalKeyword::Instance()->ms_sDTSTAMP, 100);
}
DateTime d;
d = VTimeZone::DateTimeApplyTimeZone(propVal, vTimeZones, parameters);
@ -879,12 +879,12 @@ void VFreebusy::storeFreebusy(UnicodeString & strLine, UnicodeString & propVal,
if (!freeb->isValid())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidFreebusy, 200);
nsCalLogErrorMessage::Instance()->ms_iInvalidFreebusy, 200);
UnicodeString u;
u = JulianLogErrorMessage::Instance()->ms_sRS202;
u = nsCalLogErrorMessage::Instance()->ms_sRS202;
u += '.'; u += ' ';
u += strLine;
//setRequestStatus(JulianLogErrorMessage::Instance()->ms_iRS202);
//setRequestStatus(nsCalLogErrorMessage::Instance()->ms_iRS202);
addRequestStatus(u);
delete freeb; freeb = 0;
}
@ -901,16 +901,16 @@ void VFreebusy::storeLastModified(UnicodeString & strLine, UnicodeString & propV
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVFREEBUSY, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVFREEBUSY, strLine, 100);
}
if (getLastModified().getTime() >= 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVFREEBUSY,
JulianKeyword::Instance()->ms_sLASTMODIFIED, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVFREEBUSY,
nsCalKeyword::Instance()->ms_sLASTMODIFIED, 100);
}
DateTime d;
d = VTimeZone::DateTimeApplyTimeZone(propVal, vTimeZones, parameters);
@ -922,21 +922,21 @@ void VFreebusy::storeOrganizer(UnicodeString & strLine, UnicodeString & propVal,
{
// check parameters
t_bool bParamValid = ICalProperty::CheckParams(parameters,
JulianAtomRange::Instance()->ms_asSentByParamRange,
JulianAtomRange::Instance()->ms_asSentByParamRangeSize);
nsCalAtomRange::Instance()->ms_asSentByParamRange,
nsCalAtomRange::Instance()->ms_asSentByParamRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVFREEBUSY, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVFREEBUSY, strLine, 100);
}
if (getOrganizerProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVFREEBUSY,
JulianKeyword::Instance()->ms_sORGANIZER, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVFREEBUSY,
nsCalKeyword::Instance()->ms_sORGANIZER, 100);
}
setOrganizer(propVal, parameters);
}
@ -945,22 +945,22 @@ void VFreebusy::storeRequestStatus(UnicodeString & strLine, UnicodeString & prop
{
// check parameters
t_bool bParamValid = ICalProperty::CheckParams(parameters,
JulianAtomRange::Instance()->ms_asLanguageParamRange,
JulianAtomRange::Instance()->ms_asLanguageParamRangeSize);
nsCalAtomRange::Instance()->ms_asLanguageParamRange,
nsCalAtomRange::Instance()->ms_asLanguageParamRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVFREEBUSY, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVFREEBUSY, strLine, 100);
}
#if 0
/* Don't print duplicated property on Request Status */
if (getRequestStatusProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVFREEBUSY,
JulianKeyword::Instance()->ms_sREQUESTSTATUS, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVFREEBUSY,
nsCalKeyword::Instance()->ms_sREQUESTSTATUS, 100);
}
#endif
@ -976,8 +976,8 @@ void VFreebusy::storeSequence(UnicodeString & strLine, UnicodeString & propVal,
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVFREEBUSY, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVFREEBUSY, strLine, 100);
}
char * pcc = propVal.toCString("");
@ -987,9 +987,9 @@ void VFreebusy::storeSequence(UnicodeString & strLine, UnicodeString & propVal,
if (getSequenceProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVFREEBUSY,
JulianKeyword::Instance()->ms_sSEQUENCE, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVFREEBUSY,
nsCalKeyword::Instance()->ms_sSEQUENCE, 100);
}
if (!bParseError)
{
@ -998,9 +998,9 @@ void VFreebusy::storeSequence(UnicodeString & strLine, UnicodeString & propVal,
else
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidNumberFormat,
JulianKeyword::Instance()->ms_sVFREEBUSY,
JulianKeyword::Instance()->ms_sSEQUENCE, propVal, 200);
nsCalLogErrorMessage::Instance()->ms_iInvalidNumberFormat,
nsCalKeyword::Instance()->ms_sVFREEBUSY,
nsCalKeyword::Instance()->ms_sSEQUENCE, propVal, 200);
}
}
void VFreebusy::storeUID(UnicodeString & strLine, UnicodeString & propVal,
@ -1010,15 +1010,15 @@ void VFreebusy::storeUID(UnicodeString & strLine, UnicodeString & propVal,
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVFREEBUSY, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVFREEBUSY, strLine, 100);
}
if (getUIDProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVFREEBUSY,
JulianKeyword::Instance()->ms_sUID, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVFREEBUSY,
nsCalKeyword::Instance()->ms_sUID, 100);
}
setUID(propVal, parameters);
}
@ -1029,15 +1029,15 @@ void VFreebusy::storeURL(UnicodeString & strLine, UnicodeString & propVal,
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVFREEBUSY, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVFREEBUSY, strLine, 100);
}
if (getURLProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVFREEBUSY,
JulianKeyword::Instance()->ms_sURL, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVFREEBUSY,
nsCalKeyword::Instance()->ms_sURL, 100);
}
setURL(propVal, parameters);
//addURL(propVal, parameters);
@ -1051,13 +1051,13 @@ t_bool VFreebusy::isValid()
// TODO: handle bad method names
if (getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sPUBLISH) == 0)
if (getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sPUBLISH) == 0)
{
// publish must have dtstamp
if (!getDTStamp().isValid())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingStartingTime, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingStartingTime, 300);
return FALSE;
}
@ -1065,24 +1065,24 @@ t_bool VFreebusy::isValid()
if (getOrganizer().size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingOrganizer, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingOrganizer, 300);
return FALSE;
}
}
else if (getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sREQUEST) == 0)
else if (getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sREQUEST) == 0)
{
// publish must have dtstamp
if (!getDTStamp().isValid())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
return FALSE;
}
// TODO: must have requested attendee address
if (getAttendees() == 0 || getAttendees()->GetSize() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingAttendees, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingAttendees, 300);
return FALSE;
}
@ -1090,7 +1090,7 @@ t_bool VFreebusy::isValid()
if (getOrganizer().size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingOrganizer, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingOrganizer, 300);
return FALSE;
}
@ -1098,36 +1098,36 @@ t_bool VFreebusy::isValid()
if (!dS.isValid())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingStartingTime, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingStartingTime, 300);
return FALSE;
}
if (!dE.isValid())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingEndingTime, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingEndingTime, 300);
return FALSE;
}
if (dS.afterDateTime(dE))
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iEndBeforeStartTime, 300);
nsCalLogErrorMessage::Instance()->ms_iEndBeforeStartTime, 300);
return FALSE;
}
}
else if (getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sREPLY) == 0)
else if (getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sREPLY) == 0)
{
// both request and reply must have valid dtstamp and a UID
if (!getDTStamp().isValid())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
return FALSE;
}
if (getUID().size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingUID, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingUID, 300);
return FALSE;
}
@ -1135,33 +1135,33 @@ t_bool VFreebusy::isValid()
if (getAttendees() == 0 || getAttendees()->GetSize() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingAttendees, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingAttendees, 300);
return FALSE;
}
// must have originator' organizer address
if (getOrganizer().size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingOrganizer, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingOrganizer, 300);
return FALSE;
}
// must have start, end
if (!dS.isValid())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingStartingTime, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingStartingTime, 300);
return FALSE;
}
if (!dE.isValid())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingEndingTime, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingEndingTime, 300);
return FALSE;
}
if (dS.afterDateTime(dE))
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iEndBeforeStartTime, 300);
nsCalLogErrorMessage::Instance()->ms_iEndBeforeStartTime, 300);
return FALSE;
}
}
@ -1189,7 +1189,7 @@ t_bool VFreebusy::isValid()
//---------------------------------------------------------------------
UnicodeString VFreebusy::toICALString()
{
return formatHelper(JulianFormatString::Instance()->ms_sVFreebusyAllMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVFreebusyAllMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VFreebusy::toICALString(UnicodeString sMethod,
@ -1199,12 +1199,12 @@ UnicodeString VFreebusy::toICALString(UnicodeString sMethod,
// NOTE: Remove later, to avoid warnings
if (isRecurring) {}
if (sMethod.compareIgnoreCase(JulianKeyword::Instance()->ms_sPUBLISH) == 0)
return formatHelper(JulianFormatString::Instance()->ms_sVFreebusyPublishMessage, "");
else if (sMethod.compareIgnoreCase(JulianKeyword::Instance()->ms_sREQUEST) == 0)
return formatHelper(JulianFormatString::Instance()->ms_sVFreebusyRequestMessage, "");
else if (sMethod.compareIgnoreCase(JulianKeyword::Instance()->ms_sREPLY) == 0)
return formatHelper(JulianFormatString::Instance()->ms_sVFreebusyReplyMessage, sName);
if (sMethod.compareIgnoreCase(nsCalKeyword::Instance()->ms_sPUBLISH) == 0)
return formatHelper(nsCalFormatString::Instance()->ms_sVFreebusyPublishMessage, "");
else if (sMethod.compareIgnoreCase(nsCalKeyword::Instance()->ms_sREQUEST) == 0)
return formatHelper(nsCalFormatString::Instance()->ms_sVFreebusyRequestMessage, "");
else if (sMethod.compareIgnoreCase(nsCalKeyword::Instance()->ms_sREPLY) == 0)
return formatHelper(nsCalFormatString::Instance()->ms_sVFreebusyReplyMessage, sName);
else
return toICALString();
}
@ -1212,12 +1212,12 @@ UnicodeString VFreebusy::toICALString(UnicodeString sMethod,
UnicodeString VFreebusy::toString()
{
return ICalComponent::toStringFmt(
JulianFormatString::Instance()->ms_VFreebusyStrDefaultFmt);
nsCalFormatString::Instance()->ms_VFreebusyStrDefaultFmt);
}
//---------------------------------------------------------------------
UnicodeString VFreebusy::formatHelper(UnicodeString & strFmt, UnicodeString sFilterAttendee)
{
UnicodeString u = JulianKeyword::Instance()->ms_sVFREEBUSY;
UnicodeString u = nsCalKeyword::Instance()->ms_sVFREEBUSY;
return ICalComponent::format(u, strFmt, sFilterAttendee);
}
//---------------------------------------------------------------------
@ -1262,52 +1262,52 @@ VFreebusy::formatChar(t_int32 c, UnicodeString sFilterAttendee,
return sResult;
}
case ms_cFreebusy:
s = JulianKeyword::Instance()->ms_sFREEBUSY;
s = nsCalKeyword::Instance()->ms_sFREEBUSY;
return ICalProperty::propertyVectorToICALString(s, getFreebusy(), sResult);
case ms_cComment:
s = JulianKeyword::Instance()->ms_sCOMMENT;
s = nsCalKeyword::Instance()->ms_sCOMMENT;
return ICalProperty::propertyVectorToICALString(s, getComment(), sResult);
case ms_cContact:
s = JulianKeyword::Instance()->ms_sCONTACT;
s = nsCalKeyword::Instance()->ms_sCONTACT;
return ICalProperty::propertyVectorToICALString(s, getContact(), sResult);
/*
case ms_cCreated:
s = JulianKeyword::Instance()->ms_sCREATED;
s = nsCalKeyword::Instance()->ms_sCREATED;
return ICalProperty::propertyToICALString(s, getCreatedProperty(), sResult);
*/
case ms_cDTEnd:
s = JulianKeyword::Instance()->ms_sDTEND;
s = nsCalKeyword::Instance()->ms_sDTEND;
return ICalProperty::propertyToICALString(s, getDTEndProperty(), sResult);
case ms_cDuration:
s = JulianKeyword::Instance()->ms_sDURATION;
s = nsCalKeyword::Instance()->ms_sDURATION;
s += ':';
s += getDuration().toICALString();
s += JulianKeyword::Instance()->ms_sLINEBREAK;
s += nsCalKeyword::Instance()->ms_sLINEBREAK;
return s;
case ms_cDTStart:
s = JulianKeyword::Instance()->ms_sDTSTART;
s = nsCalKeyword::Instance()->ms_sDTSTART;
return ICalProperty::propertyToICALString(s, getDTStartProperty(), sResult);
case ms_cDTStamp:
s = JulianKeyword::Instance()->ms_sDTSTAMP;
s = nsCalKeyword::Instance()->ms_sDTSTAMP;
return ICalProperty::propertyToICALString(s, getDTStampProperty(), sResult);
//case ms_cRelatedTo:
// s = JulianKeyword::Instance()->ms_sRELATEDTO;
// s = nsCalKeyword::Instance()->ms_sRELATEDTO;
// return ICalProperty::propertyVectorToICALString(s, getRelatedTo(), sResult);
case ms_cOrganizer:
s = JulianKeyword::Instance()->ms_sORGANIZER;
s = nsCalKeyword::Instance()->ms_sORGANIZER;
return ICalProperty::propertyToICALString(s, getOrganizerProperty(), sResult);
case ms_cRequestStatus:
s = JulianKeyword::Instance()->ms_sREQUESTSTATUS;
s = nsCalKeyword::Instance()->ms_sREQUESTSTATUS;
//return ICalProperty::propertyToICALString(s, getRequestStatusProperty(), sResult);
return ICalProperty::propertyVectorToICALString(s, getRequestStatus(), sResult);
case ms_cSequence:
s = JulianKeyword::Instance()->ms_sSEQUENCE;
s = nsCalKeyword::Instance()->ms_sSEQUENCE;
return ICalProperty::propertyToICALString(s, getSequenceProperty(), sResult);
case ms_cUID:
s = JulianKeyword::Instance()->ms_sUID;
s = nsCalKeyword::Instance()->ms_sUID;
return ICalProperty::propertyToICALString(s, getUIDProperty(), sResult);
case ms_cURL:
s = JulianKeyword::Instance()->ms_sURL;
s = nsCalKeyword::Instance()->ms_sURL;
//return ICalProperty::propertyVectorToICALString(s, getURL(), sResult);
return ICalProperty::propertyToICALString(s, getURLProperty(), sResult);
case ms_cXTokens:

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

@ -39,7 +39,7 @@
//---------------------------------------------------------------------
void VJournal::setDefaultFmt(UnicodeString s)
{
JulianFormatString::Instance()->ms_VJournalStrDefaultFmt = s;
nsCalFormatString::Instance()->ms_VJournalStrDefaultFmt = s;
}
//---------------------------------------------------------------------
#if 0
@ -85,7 +85,7 @@ VJournal::parse(ICalReader * brFile, UnicodeString & sMethod,
UnicodeString & parseStatus, JulianPtrArray * vTimeZones,
t_bool bIgnoreBeginError, nsCalUtility::MimeEncoding encoding)
{
UnicodeString u = JulianKeyword::Instance()->ms_sVJOURNAL;
UnicodeString u = nsCalKeyword::Instance()->ms_sVJOURNAL;
return parseType(u, brFile, sMethod, parseStatus, vTimeZones, bIgnoreBeginError, encoding);
}
@ -108,14 +108,14 @@ void VJournal::selfCheck()
u.toUpper();
ICalProperty::Trim(u);
JAtom ua(u);
if ((JulianKeyword::Instance()->ms_ATOM_DRAFT!= ua) &&
(JulianKeyword::Instance()->ms_ATOM_FINAL != ua) &&
(JulianKeyword::Instance()->ms_ATOM_CANCELLED != ua))
if ((nsCalKeyword::Instance()->ms_ATOM_DRAFT!= ua) &&
(nsCalKeyword::Instance()->ms_ATOM_FINAL != ua) &&
(nsCalKeyword::Instance()->ms_ATOM_CANCELLED != ua))
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidPropertyValue,
JulianKeyword::Instance()->ms_sVJOURNAL,
JulianKeyword::Instance()->ms_sSTATUS, u, 200);
nsCalLogErrorMessage::Instance()->ms_iInvalidPropertyValue,
nsCalKeyword::Instance()->ms_sVJOURNAL,
nsCalKeyword::Instance()->ms_sSTATUS, u, 200);
setStatus("");
}
@ -135,13 +135,13 @@ VJournal::storeData(UnicodeString & strLine, UnicodeString & propName,
else
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidPropertyName,
JulianKeyword::Instance()->ms_sVJOURNAL, propName, 200);
nsCalLogErrorMessage::Instance()->ms_iInvalidPropertyName,
nsCalKeyword::Instance()->ms_sVJOURNAL, propName, 200);
UnicodeString u;
u = JulianLogErrorMessage::Instance()->ms_sRS202;
u = nsCalLogErrorMessage::Instance()->ms_sRS202;
u += '.'; u += ' ';
u += strLine;
//setRequestStatus(JulianLogErrorMessage::Instance()->ms_iRS202);
//setRequestStatus(nsCalLogErrorMessage::Instance()->ms_iRS202);
addRequestStatus(u);
return FALSE;
}
@ -160,7 +160,7 @@ UnicodeString VJournal::formatHelper(UnicodeString & strFmt,
UnicodeString sFilterAttendee,
t_bool delegateRequest)
{
UnicodeString u = JulianKeyword::Instance()->ms_sVJOURNAL;
UnicodeString u = nsCalKeyword::Instance()->ms_sVJOURNAL;
return ICalComponent::format(u, strFmt, sFilterAttendee, delegateRequest);
}
@ -169,7 +169,7 @@ UnicodeString VJournal::formatHelper(UnicodeString & strFmt,
UnicodeString VJournal::toString()
{
return ICalComponent::toStringFmt(
JulianFormatString::Instance()->ms_VJournalStrDefaultFmt);
nsCalFormatString::Instance()->ms_VJournalStrDefaultFmt);
}
//---------------------------------------------------------------------
@ -192,15 +192,15 @@ UnicodeString VJournal::formatChar(t_int32 c, UnicodeString sFilterAttendee,
t_bool VJournal::isValid()
{
// TODO: finish
if ((getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sPUBLISH) == 0) ||
(getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sREQUEST) == 0) ||
(getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sADD) == 0))
if ((getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sPUBLISH) == 0) ||
(getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sREQUEST) == 0) ||
(getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sADD) == 0))
{
// must have dtstart
if ((!getDTStart().isValid()))
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingStartingTime, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingStartingTime, 300);
return FALSE;
}
@ -212,116 +212,116 @@ t_bool VJournal::isValid()
if (!getDTStamp().isValid())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
return FALSE;
}
if (getSummary().size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingSummary, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingSummary, 300);
return FALSE;
}
if (getUID().size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingUID, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingUID, 300);
return FALSE;
}
// must have organizer
if (getOrganizer().size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingOrganizer, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingOrganizer, 300);
return FALSE;
}
// must have sequence >= 0
if (getSequence() < 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingSeqNo, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingSeqNo, 300);
return FALSE;
}
if (getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sREQUEST) == 0)
if (getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sREQUEST) == 0)
{
if (getAttendees() == 0 || getAttendees()->GetSize() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingAttendees, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingAttendees, 300);
return FALSE;
}
}
}
else if ((getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sREPLY) == 0) ||
(getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sCANCEL) == 0) ||
(getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sDECLINECOUNTER) == 0))
else if ((getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sREPLY) == 0) ||
(getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sCANCEL) == 0) ||
(getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sDECLINECOUNTER) == 0))
{
// must have dtstamp, uid
if (!getDTStamp().isValid())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
return FALSE;
}
if (getUID().size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingUID, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingUID, 300);
return FALSE;
}
// must have organizer
if (getOrganizer().size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingOrganizer, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingOrganizer, 300);
return FALSE;
}
// must have sequence >= 0
if (getSequence() < 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingSeqNo, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingSeqNo, 300);
return FALSE;
}
if (getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sREPLY) == 0)
if (getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sREPLY) == 0)
{
if (getAttendees() == 0 || getAttendees()->GetSize() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingAttendees, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingAttendees, 300);
return FALSE;
}
}
}
else if ((getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sREFRESH) == 0))
else if ((getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sREFRESH) == 0))
{
// must have dtstamp, uid
if (!getDTStamp().isValid())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
return FALSE;
}
if (getUID().size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
return FALSE;
}
// TODO: attendees required?
}
else if ((getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sCOUNTER) == 0))
else if ((getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sCOUNTER) == 0))
{
// must have dtstamp, uid
if (!getDTStamp().isValid())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
return FALSE;
}
if (getUID().size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
return FALSE;
}
@ -329,7 +329,7 @@ t_bool VJournal::isValid()
if (getSequence() < 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingSeqNo, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingSeqNo, 300);
return FALSE;
}
}
@ -342,79 +342,79 @@ t_bool VJournal::isValid()
UnicodeString VJournal::cancelMessage()
{
UnicodeString s = JulianKeyword::Instance()->ms_sCANCELLED;
UnicodeString s = nsCalKeyword::Instance()->ms_sCANCELLED;
setStatus(s);
return formatHelper(JulianFormatString::Instance()->ms_sVJournalCancelMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVJournalCancelMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VJournal::requestMessage()
{
return formatHelper(JulianFormatString::Instance()->ms_sVJournalRequestMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVJournalRequestMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VJournal::requestRecurMessage()
{
return formatHelper(JulianFormatString::Instance()->ms_sVJournalRecurRequestMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVJournalRecurRequestMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VJournal::counterMessage()
{
return formatHelper(JulianFormatString::Instance()->ms_sVJournalCounterMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVJournalCounterMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VJournal::declineCounterMessage()
{
return formatHelper(JulianFormatString::Instance()->ms_sVJournalDeclineCounterMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVJournalDeclineCounterMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VJournal::addMessage()
{
return formatHelper(JulianFormatString::Instance()->ms_sVJournalAddMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVJournalAddMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VJournal::refreshMessage(UnicodeString sAttendeeFilter)
{
return formatHelper(JulianFormatString::Instance()->ms_sVJournalRefreshMessage, sAttendeeFilter);
return formatHelper(nsCalFormatString::Instance()->ms_sVJournalRefreshMessage, sAttendeeFilter);
}
//---------------------------------------------------------------------
UnicodeString VJournal::allMessage()
{
return formatHelper(JulianFormatString::Instance()->ms_sVJournalAllPropertiesMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVJournalAllPropertiesMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VJournal::replyMessage(UnicodeString sAttendeeFilter)
{
return formatHelper(JulianFormatString::Instance()->ms_sVJournalReplyMessage, sAttendeeFilter);
return formatHelper(nsCalFormatString::Instance()->ms_sVJournalReplyMessage, sAttendeeFilter);
}
//---------------------------------------------------------------------
UnicodeString VJournal::publishMessage()
{
return formatHelper(JulianFormatString::Instance()->ms_sVJournalPublishMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVJournalPublishMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VJournal::publishRecurMessage()
{
return formatHelper(JulianFormatString::Instance()->ms_sVJournalRecurPublishMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVJournalRecurPublishMessage, "");
}
//---------------------------------------------------------------------

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

@ -154,7 +154,7 @@ VTimeZone::parse(ICalReader * brFile, UnicodeString & sType,
t_bool bIgnoreBeginError, nsCalUtility::MimeEncoding encoding)
{
UnicodeString strLine, propName, propVal;
parseStatus = JulianKeyword::Instance()->ms_sOK;
parseStatus = nsCalKeyword::Instance()->ms_sOK;
JulianPtrArray * parameters = new JulianPtrArray();
PR_ASSERT(parameters != 0 && brFile != 0);
if (parameters == 0 || brFile == 0)
@ -188,29 +188,29 @@ VTimeZone::parse(ICalReader * brFile, UnicodeString & sType,
continue;
}
else if ((propName.compareIgnoreCase(JulianKeyword::Instance()->ms_sEND) == 0) &&
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVTIMEZONE) == 0))
else if ((propName.compareIgnoreCase(nsCalKeyword::Instance()->ms_sEND) == 0) &&
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVTIMEZONE) == 0))
{
ICalProperty::deleteICalParameterVector(parameters);
parameters->RemoveAll();
break;
}
else if (((propName.compareIgnoreCase(JulianKeyword::Instance()->ms_sEND) == 0) &&
((propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVCALENDAR) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVEVENT) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVTODO) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVJOURNAL) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVFREEBUSY) == 0) ||
else if (((propName.compareIgnoreCase(nsCalKeyword::Instance()->ms_sEND) == 0) &&
((propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVCALENDAR) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVEVENT) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVTODO) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVJOURNAL) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVFREEBUSY) == 0) ||
(ICalProperty::IsXToken(propVal)))
) ||
((propName.compareIgnoreCase(JulianKeyword::Instance()->ms_sBEGIN) == 0) &&
((propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVTIMEZONE) == 0) && !bIgnoreBeginError) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVEVENT) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVTODO) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVJOURNAL) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVFREEBUSY) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVCALENDAR) == 0) ||
((propName.compareIgnoreCase(nsCalKeyword::Instance()->ms_sBEGIN) == 0) &&
((propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVTIMEZONE) == 0) && !bIgnoreBeginError) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVEVENT) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVTODO) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVJOURNAL) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVFREEBUSY) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVCALENDAR) == 0) ||
(ICalProperty::IsXToken(propVal))
))
@ -223,15 +223,15 @@ VTimeZone::parse(ICalReader * brFile, UnicodeString & sType,
parameters->RemoveAll();
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iAbruptEndOfParsing,
JulianKeyword::Instance()->ms_sVTIMEZONE, strLine, 300);
nsCalLogErrorMessage::Instance()->ms_iAbruptEndOfParsing,
nsCalKeyword::Instance()->ms_sVTIMEZONE, strLine, 300);
parseStatus = strLine;
break;
}
else if ((propName.compareIgnoreCase(JulianKeyword::Instance()->ms_sBEGIN) == 0) &&
((propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sDAYLIGHT) == 0) ||
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sSTANDARD) == 0)))
else if ((propName.compareIgnoreCase(nsCalKeyword::Instance()->ms_sBEGIN) == 0) &&
((propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sDAYLIGHT) == 0) ||
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sSTANDARD) == 0)))
{
// Add the DAYLIGHT, STANDARD parts
ICalProperty::deleteICalParameterVector(parameters);
@ -246,7 +246,7 @@ VTimeZone::parse(ICalReader * brFile, UnicodeString & sType,
if (!tzpart->isValid())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidTZPart, 200);
nsCalLogErrorMessage::Instance()->ms_iInvalidTZPart, 200);
delete tzpart; tzpart = 0;
}
else
@ -279,60 +279,60 @@ void VTimeZone::storeData(UnicodeString & strLine, UnicodeString & propName,
}
//UnicodeString u;
t_int32 hashCode = propName.hashCode();
//if (propName.compareIgnoreCase(JulianKeyword::Instance()->ms_sLASTMODIFIED) == 0)
//if (propName.compareIgnoreCase(nsCalKeyword::Instance()->ms_sLASTMODIFIED) == 0)
if (JulianKeyword::Instance()->ms_ATOM_LASTMODIFIED == hashCode)
if (nsCalKeyword::Instance()->ms_ATOM_LASTMODIFIED == hashCode)
{
// no parameters
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVTIMEZONE, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVTIMEZONE, strLine, 100);
}
if (getLastModifiedProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVTIMEZONE, propName, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVTIMEZONE, propName, 100);
}
DateTime d(propVal);
setLastModified(d, parameters);
}
else if (JulianKeyword::Instance()->ms_ATOM_TZID == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_TZID == hashCode)
{
// no parameters
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVTIMEZONE, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVTIMEZONE, strLine, 100);
}
if (getTZIDProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVTIMEZONE, propName, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVTIMEZONE, propName, 100);
}
setTZID(propVal, parameters);
}
else if (JulianKeyword::Instance()->ms_ATOM_TZURL == hashCode)
else if (nsCalKeyword::Instance()->ms_ATOM_TZURL == hashCode)
{
// no parameters
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVTIMEZONE, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVTIMEZONE, strLine, 100);
}
if (getTZURLProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVTIMEZONE, propName, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVTIMEZONE, propName, 100);
}
setTZURL(propVal, parameters);
}
@ -343,8 +343,8 @@ void VTimeZone::storeData(UnicodeString & strLine, UnicodeString & propName,
else
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidPropertyName,
JulianKeyword::Instance()->ms_sVTIMEZONE, propName, 200);
nsCalLogErrorMessage::Instance()->ms_iInvalidPropertyName,
nsCalKeyword::Instance()->ms_sVTIMEZONE, propName, 200);
}
}
//---------------------------------------------------------------------
@ -452,8 +452,8 @@ t_bool VTimeZone::isValid()
//---------------------------------------------------------------------
UnicodeString VTimeZone::toICALString()
{
UnicodeString u = JulianKeyword::Instance()->ms_sVTIMEZONE;
return ICalComponent::format(u, JulianFormatString::Instance()->ms_sVTimeZoneAllMessage, "");
UnicodeString u = nsCalKeyword::Instance()->ms_sVTIMEZONE;
return ICalComponent::format(u, nsCalFormatString::Instance()->ms_sVTimeZoneAllMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VTimeZone::toICALString(UnicodeString method,
@ -468,7 +468,7 @@ UnicodeString VTimeZone::toICALString(UnicodeString method,
UnicodeString VTimeZone::toString()
{
return ICalComponent::toStringFmt(
JulianFormatString::Instance()->ms_VTimeZoneStrDefaultFmt);
nsCalFormatString::Instance()->ms_VTimeZoneStrDefaultFmt);
}
//---------------------------------------------------------------------
UnicodeString VTimeZone::toStringChar(t_int32 c, UnicodeString & dateFmt)
@ -525,13 +525,13 @@ UnicodeString VTimeZone::formatChar(t_int32 c, UnicodeString sFilterAttendee,
}
return s;
case ms_cLastModified:
s = JulianKeyword::Instance()->ms_sLASTMODIFIED;
s = nsCalKeyword::Instance()->ms_sLASTMODIFIED;
return ICalProperty::propertyToICALString(s, getLastModifiedProperty(), sResult);
case ms_cTZID:
s = JulianKeyword::Instance()->ms_sTZID;
s = nsCalKeyword::Instance()->ms_sTZID;
return ICalProperty::propertyToICALString(s, getTZIDProperty(), sResult);
case ms_cTZURL:
s = JulianKeyword::Instance()->ms_sTZURL;
s = nsCalKeyword::Instance()->ms_sTZURL;
return ICalProperty::propertyToICALString(s, getTZURLProperty(), sResult);
case ms_cXTokens:
return ICalProperty::vectorToICALString(getXTokens(), sResult);
@ -631,13 +631,13 @@ TZPart * VTimeZone::getPart(UnicodeString & u)
//---------------------------------------------------------------------
TZPart * VTimeZone::getStandardPart()
{
UnicodeString u = JulianKeyword::Instance()->ms_sSTANDARD;
UnicodeString u = nsCalKeyword::Instance()->ms_sSTANDARD;
return getPart(u);
}
//---------------------------------------------------------------------
TZPart * VTimeZone::getDaylightPart()
{
UnicodeString u = JulianKeyword::Instance()->ms_sDAYLIGHT;
UnicodeString u = nsCalKeyword::Instance()->ms_sDAYLIGHT;
return getPart(u);
}
//---------------------------------------------------------------------
@ -779,7 +779,7 @@ VTimeZone::DateTimeApplyTimeZone(UnicodeString & time,
UnicodeString out, u;
VTimeZone * vt = 0;
TimeZone *t = 0;
u = JulianKeyword::Instance()->ms_sTZID;
u = nsCalKeyword::Instance()->ms_sTZID;
out = ICalParameter::GetParameterFromVector(u, out, parameters);
//if (FALSE) TRACE("out = %s\r\n", out.toCString(""));

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

@ -40,7 +40,7 @@
//---------------------------------------------------------------------
void VTodo::setDefaultFmt(UnicodeString s)
{
JulianFormatString::Instance()->ms_VTodoStrDefaultFmt = s;
nsCalFormatString::Instance()->ms_VTodoStrDefaultFmt = s;
}
//---------------------------------------------------------------------
#if 0
@ -174,7 +174,7 @@ VTodo::parse(ICalReader * brFile, UnicodeString & sMethod,
UnicodeString & parseStatus, JulianPtrArray * vTimeZones,
t_bool bIgnoreBeginError, nsCalUtility::MimeEncoding encoding)
{
UnicodeString u = JulianKeyword::Instance()->ms_sVTODO;
UnicodeString u = nsCalKeyword::Instance()->ms_sVTODO;
return parseType(u, brFile, sMethod, parseStatus, vTimeZones, bIgnoreBeginError, encoding);
}
@ -221,15 +221,15 @@ void VTodo::selfCheck()
u.toUpper();
ICalProperty::Trim(u);
JAtom ua(u);
if ((JulianKeyword::Instance()->ms_ATOM_NEEDSACTION != ua) &&
(JulianKeyword::Instance()->ms_ATOM_COMPLETED != ua) &&
(JulianKeyword::Instance()->ms_ATOM_INPROCESS != ua) &&
(JulianKeyword::Instance()->ms_ATOM_CANCELLED != ua))
if ((nsCalKeyword::Instance()->ms_ATOM_NEEDSACTION != ua) &&
(nsCalKeyword::Instance()->ms_ATOM_COMPLETED != ua) &&
(nsCalKeyword::Instance()->ms_ATOM_INPROCESS != ua) &&
(nsCalKeyword::Instance()->ms_ATOM_CANCELLED != ua))
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidPropertyValue,
JulianKeyword::Instance()->ms_sVTODO,
JulianKeyword::Instance()->ms_sSTATUS, u, 200);
nsCalLogErrorMessage::Instance()->ms_iInvalidPropertyValue,
nsCalKeyword::Instance()->ms_sVTODO,
nsCalKeyword::Instance()->ms_sSTATUS, u, 200);
setStatus("");
}
@ -245,15 +245,15 @@ void VTodo::storeCompleted(UnicodeString & strLine, UnicodeString & propVal,
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVTODO, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVTODO, strLine, 100);
}
if (getCompletedProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVTODO,
JulianKeyword::Instance()->ms_sCOMPLETED, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVTODO,
nsCalKeyword::Instance()->ms_sCOMPLETED, 100);
}
DateTime d;
d = VTimeZone::DateTimeApplyTimeZone(propVal, vTimeZones, parameters);
@ -265,27 +265,27 @@ void VTodo::storeDue(UnicodeString & strLine, UnicodeString & propVal,
{
// check parameters
t_bool bParamValid = ICalProperty::CheckParamsWithValueRangeCheck(parameters,
JulianAtomRange::Instance()->ms_asTZIDValueParamRange,
JulianAtomRange::Instance()->ms_asTZIDValueParamRangeSize,
JulianAtomRange::Instance()->ms_asDateDateTimeValueRange,
JulianAtomRange::Instance()->ms_asDateDateTimeValueRangeSize);
nsCalAtomRange::Instance()->ms_asTZIDValueParamRange,
nsCalAtomRange::Instance()->ms_asTZIDValueParamRangeSize,
nsCalAtomRange::Instance()->ms_asDateDateTimeValueRange,
nsCalAtomRange::Instance()->ms_asDateDateTimeValueRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVTODO, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVTODO, strLine, 100);
}
if (getDueProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVTODO,
JulianKeyword::Instance()->ms_sDUE, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVTODO,
nsCalKeyword::Instance()->ms_sDUE, 100);
}
UnicodeString u, out;
u = JulianKeyword::Instance()->ms_sVALUE;
u = nsCalKeyword::Instance()->ms_sVALUE;
out = ICalParameter::GetParameterFromVector(u, out, parameters);
t_bool bIsDate = DateTime::IsParseableDate(propVal);
@ -293,21 +293,21 @@ void VTodo::storeDue(UnicodeString & strLine, UnicodeString & propVal,
if (bIsDate)
{
// if there is a VALUE=X parameter, make sure X is DATE
if (out.size() != 0 && (JulianKeyword::Instance()->ms_ATOM_DATE != out.hashCode()))
if (out.size() != 0 && (nsCalKeyword::Instance()->ms_ATOM_DATE != out.hashCode()))
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iPropertyValueTypeMismatch,
JulianKeyword::Instance()->ms_sVTODO, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iPropertyValueTypeMismatch,
nsCalKeyword::Instance()->ms_sVTODO, strLine, 100);
}
}
else
{
// if there is a VALUE=X parameter, make sure X is DATETIME
if (out.size() != 0 && (JulianKeyword::Instance()->ms_ATOM_DATETIME != out.hashCode()))
if (out.size() != 0 && (nsCalKeyword::Instance()->ms_ATOM_DATETIME != out.hashCode()))
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iPropertyValueTypeMismatch,
JulianKeyword::Instance()->ms_sVTODO, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iPropertyValueTypeMismatch,
nsCalKeyword::Instance()->ms_sVTODO, strLine, 100);
}
}
@ -323,16 +323,16 @@ void VTodo::storeDuration(UnicodeString & strLine, UnicodeString & propVal,
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVTODO, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVTODO, strLine, 100);
}
if (m_TempDuration != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVTODO,
JulianKeyword::Instance()->ms_sDURATION, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVTODO,
nsCalKeyword::Instance()->ms_sDURATION, 100);
}
//nsCalDuration d(propVal);
if (m_TempDuration == 0)
@ -350,16 +350,16 @@ void VTodo::storeGEO(UnicodeString & strLine, UnicodeString & propVal,
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVTODO, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVTODO, strLine, 100);
}
if (getGEOProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVTODO,
JulianKeyword::Instance()->ms_sGEO, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVTODO,
nsCalKeyword::Instance()->ms_sGEO, 100);
}
setGEO(propVal, parameters);
}
@ -367,22 +367,22 @@ void VTodo::storeLocation(UnicodeString & strLine, UnicodeString & propVal,
JulianPtrArray * parameters, JulianPtrArray * vTimeZones)
{
t_bool bParamValid = ICalProperty::CheckParams(parameters,
JulianAtomRange::Instance()->ms_asAltrepLanguageParamRange,
JulianAtomRange::Instance()->ms_asAltrepLanguageParamRangeSize);
nsCalAtomRange::Instance()->ms_asAltrepLanguageParamRange,
nsCalAtomRange::Instance()->ms_asAltrepLanguageParamRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVTODO, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVTODO, strLine, 100);
}
if (getLocationProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVTODO,
JulianKeyword::Instance()->ms_sLOCATION, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVTODO,
nsCalKeyword::Instance()->ms_sLOCATION, 100);
}
setLocation(propVal, parameters);
}
@ -396,8 +396,8 @@ void VTodo::storePercentComplete(UnicodeString & strLine, UnicodeString & propVa
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVTODO, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVTODO, strLine, 100);
}
char * pcc = propVal.toCString("");
@ -407,27 +407,27 @@ void VTodo::storePercentComplete(UnicodeString & strLine, UnicodeString & propVa
if (getPercentCompleteProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVTODO,
JulianKeyword::Instance()->ms_sPERCENTCOMPLETE, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVTODO,
nsCalKeyword::Instance()->ms_sPERCENTCOMPLETE, 100);
}
if (!bParseError)
{
if (i > 100)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iRoundedPercentCompleteTo100,
JulianKeyword::Instance()->ms_sVTODO,
JulianKeyword::Instance()->ms_sPERCENTCOMPLETE, 100);
nsCalLogErrorMessage::Instance()->ms_iRoundedPercentCompleteTo100,
nsCalKeyword::Instance()->ms_sVTODO,
nsCalKeyword::Instance()->ms_sPERCENTCOMPLETE, 100);
i = 100;
}
setPercentComplete(i, parameters);
}
else
{
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iInvalidNumberFormat,
JulianKeyword::Instance()->ms_sVTODO,
JulianKeyword::Instance()->ms_sPERCENTCOMPLETE, propVal, 200);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iInvalidNumberFormat,
nsCalKeyword::Instance()->ms_sVTODO,
nsCalKeyword::Instance()->ms_sPERCENTCOMPLETE, propVal, 200);
}
}
void VTodo::storePriority(UnicodeString & strLine, UnicodeString & propVal,
@ -440,8 +440,8 @@ void VTodo::storePriority(UnicodeString & strLine, UnicodeString & propVal,
if (parameters->GetSize() > 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVTODO, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVTODO, strLine, 100);
}
char * pcc = propVal.toCString("");
@ -451,9 +451,9 @@ void VTodo::storePriority(UnicodeString & strLine, UnicodeString & propVal,
if (getPriorityProperty() != 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iDuplicatedProperty,
JulianKeyword::Instance()->ms_sVTODO,
JulianKeyword::Instance()->ms_sPRIORITY, 100);
nsCalLogErrorMessage::Instance()->ms_iDuplicatedProperty,
nsCalKeyword::Instance()->ms_sVTODO,
nsCalKeyword::Instance()->ms_sPRIORITY, 100);
}
if (!bParseError)
{
@ -461,9 +461,9 @@ void VTodo::storePriority(UnicodeString & strLine, UnicodeString & propVal,
}
else
{
if (m_Log) m_Log->logError(JulianLogErrorMessage::Instance()->ms_iInvalidNumberFormat,
JulianKeyword::Instance()->ms_sVTODO,
JulianKeyword::Instance()->ms_sPRIORITY, propVal, 200);
if (m_Log) m_Log->logError(nsCalLogErrorMessage::Instance()->ms_iInvalidNumberFormat,
nsCalKeyword::Instance()->ms_sVTODO,
nsCalKeyword::Instance()->ms_sPRIORITY, propVal, 200);
}
}
void VTodo::storeResources(UnicodeString & strLine, UnicodeString & propVal,
@ -471,13 +471,13 @@ void VTodo::storeResources(UnicodeString & strLine, UnicodeString & propVal,
{
// check parameters
t_bool bParamValid = ICalProperty::CheckParams(parameters,
JulianAtomRange::Instance()->ms_asLanguageParamRange,
JulianAtomRange::Instance()->ms_asLanguageParamRangeSize);
nsCalAtomRange::Instance()->ms_asLanguageParamRange,
nsCalAtomRange::Instance()->ms_asLanguageParamRangeSize);
if (!bParamValid)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
JulianKeyword::Instance()->ms_sVTODO, strLine, 100);
nsCalLogErrorMessage::Instance()->ms_iInvalidOptionalParam,
nsCalKeyword::Instance()->ms_sVTODO, strLine, 100);
}
addResourcesPropertyVector(propVal, parameters);
@ -505,10 +505,10 @@ VTodo::storeData(UnicodeString & strLine, UnicodeString & propName,
}
}
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iInvalidPropertyName,
JulianKeyword::Instance()->ms_sVTODO, propName, 200);
nsCalLogErrorMessage::Instance()->ms_iInvalidPropertyName,
nsCalKeyword::Instance()->ms_sVTODO, propName, 200);
UnicodeString u;
u = JulianLogErrorMessage::Instance()->ms_sRS202;
u = nsCalLogErrorMessage::Instance()->ms_sRS202;
u += '.'; u += ' ';
u += strLine;
addRequestStatus(u);
@ -578,7 +578,7 @@ UnicodeString VTodo::formatHelper(UnicodeString & strFmt,
UnicodeString sFilterAttendee,
t_bool delegateRequest)
{
UnicodeString u = JulianKeyword::Instance()->ms_sVTODO;
UnicodeString u = nsCalKeyword::Instance()->ms_sVTODO;
return ICalComponent::format(u, strFmt, sFilterAttendee, delegateRequest);
}
@ -587,7 +587,7 @@ UnicodeString VTodo::formatHelper(UnicodeString & strFmt,
UnicodeString VTodo::toString()
{
return ICalComponent::toStringFmt(
JulianFormatString::Instance()->ms_VTodoStrDefaultFmt);
nsCalFormatString::Instance()->ms_VTodoStrDefaultFmt);
}
//---------------------------------------------------------------------
@ -627,32 +627,32 @@ UnicodeString VTodo::formatChar(t_int32 c, UnicodeString sFilterAttendee,
UnicodeString s, sResult;
switch (c) {
case ms_cCompleted:
s = JulianKeyword::Instance()->ms_sCOMPLETED;
s = nsCalKeyword::Instance()->ms_sCOMPLETED;
return ICalProperty::propertyToICALString(s, getCompletedProperty(), sResult);
case ms_cDue:
s = JulianKeyword::Instance()->ms_sDUE;
s = nsCalKeyword::Instance()->ms_sDUE;
return ICalProperty::propertyToICALString(s, getDueProperty(), sResult);
case ms_cDuration:
s = JulianKeyword::Instance()->ms_sDURATION;
s = nsCalKeyword::Instance()->ms_sDURATION;
s += ':';
s += getDuration().toICALString();
s += JulianKeyword::Instance()->ms_sLINEBREAK;
s += nsCalKeyword::Instance()->ms_sLINEBREAK;
return s;
//return ICalProperty::propertyToICALString(s, getDurationProperty(), sResult);
case ms_cLocation:
s = JulianKeyword::Instance()->ms_sLOCATION;
s = nsCalKeyword::Instance()->ms_sLOCATION;
return ICalProperty::propertyToICALString(s, getLocationProperty(), sResult);
case ms_cPercentComplete:
s = JulianKeyword::Instance()->ms_sPERCENTCOMPLETE;
s = nsCalKeyword::Instance()->ms_sPERCENTCOMPLETE;
return ICalProperty::propertyToICALString(s, getPercentCompleteProperty(), sResult);
case ms_cPriority:
s = JulianKeyword::Instance()->ms_sPRIORITY;
s = nsCalKeyword::Instance()->ms_sPRIORITY;
return ICalProperty::propertyToICALString(s, getPriorityProperty(), sResult);
case ms_cResources:
s = JulianKeyword::Instance()->ms_sRESOURCES;
s = nsCalKeyword::Instance()->ms_sRESOURCES;
return ICalProperty::propertyVectorToICALString(s, getResources(), sResult);
case ms_cGEO:
s = JulianKeyword::Instance()->ms_sGEO;
s = nsCalKeyword::Instance()->ms_sGEO;
return ICalProperty::propertyToICALString(s, getGEOProperty(), sResult);
default:
{
@ -665,15 +665,15 @@ UnicodeString VTodo::formatChar(t_int32 c, UnicodeString sFilterAttendee,
t_bool VTodo::isValid()
{
if ((getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sPUBLISH) == 0) ||
(getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sREQUEST) == 0) ||
(getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sADD) == 0))
if ((getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sPUBLISH) == 0) ||
(getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sREQUEST) == 0) ||
(getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sADD) == 0))
{
// must have dtstart
if ((!getDTStart().isValid()))
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingStartingTime, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingStartingTime, 300);
return FALSE;
}
@ -685,124 +685,124 @@ t_bool VTodo::isValid()
if (!getDTStamp().isValid())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
return FALSE;
}
if (getSummary().size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingSummary, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingSummary, 300);
return FALSE;
}
if (getUID().size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingUID, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingUID, 300);
return FALSE;
}
// must have organizer
if (getOrganizer().size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingOrganizer, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingOrganizer, 300);
return FALSE;
}
// must have sequence >= 0
if (getSequence() < 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingSeqNo, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingSeqNo, 300);
return FALSE;
}
if (getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sREQUEST) == 0)
if (getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sREQUEST) == 0)
{
if (getAttendees() == 0 || getAttendees()->GetSize() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingAttendees, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingAttendees, 300);
return FALSE;
}
}
}
else if ((getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sREPLY) == 0) ||
(getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sCANCEL) == 0) ||
(getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sDECLINECOUNTER) == 0))
else if ((getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sREPLY) == 0) ||
(getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sCANCEL) == 0) ||
(getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sDECLINECOUNTER) == 0))
{
// must have dtstamp, uid
if (!getDTStamp().isValid())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
return FALSE;
}
if (getUID().size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingUID, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingUID, 300);
return FALSE;
}
// must have organizer
if (getOrganizer().size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingOrganizer, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingOrganizer, 300);
return FALSE;
}
// must have sequence >= 0
if (getSequence() < 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingSeqNo, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingSeqNo, 300);
return FALSE;
}
if (getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sREPLY) == 0)
if (getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sREPLY) == 0)
{
if (getAttendees() == 0 || getAttendees()->GetSize() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingAttendees, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingAttendees, 300);
return FALSE;
}
}
}
else if ((getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sREFRESH) == 0))
else if ((getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sREFRESH) == 0))
{
// must have dtstamp, uid
if (!getDTStamp().isValid())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
return FALSE;
}
if (getUID().size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingUID, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingUID, 300);
return FALSE;
}
// TODO: attendees required?
}
else if ((getMethod().compareIgnoreCase(JulianKeyword::Instance()->ms_sCOUNTER) == 0))
else if ((getMethod().compareIgnoreCase(nsCalKeyword::Instance()->ms_sCOUNTER) == 0))
{
// must have dtstamp, uid
if (!getDTStamp().isValid())
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingDTStamp, 300);
return FALSE;
}
if (getUID().size() == 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingUID, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingUID, 300);
return FALSE;
}
// must have sequence >= 0
if (getSequence() < 0)
{
if (m_Log) m_Log->logError(
JulianLogErrorMessage::Instance()->ms_iMissingSeqNo, 300);
nsCalLogErrorMessage::Instance()->ms_iMissingSeqNo, 300);
return FALSE;
}
}
@ -816,79 +816,79 @@ t_bool VTodo::isValid()
UnicodeString VTodo::cancelMessage()
{
UnicodeString s = JulianKeyword::Instance()->ms_sCANCELLED;
UnicodeString s = nsCalKeyword::Instance()->ms_sCANCELLED;
setStatus(s);
return formatHelper(JulianFormatString::Instance()->ms_sVTodoCancelMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVTodoCancelMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VTodo::requestMessage()
{
return formatHelper(JulianFormatString::Instance()->ms_sVTodoRequestMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVTodoRequestMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VTodo::requestRecurMessage()
{
return formatHelper(JulianFormatString::Instance()->ms_sVTodoRecurRequestMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVTodoRecurRequestMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VTodo::counterMessage()
{
return formatHelper(JulianFormatString::Instance()->ms_sVTodoCounterMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVTodoCounterMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VTodo::declineCounterMessage()
{
return formatHelper(JulianFormatString::Instance()->ms_sVTodoDeclineCounterMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVTodoDeclineCounterMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VTodo::addMessage()
{
return formatHelper(JulianFormatString::Instance()->ms_sVTodoAddMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVTodoAddMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VTodo::refreshMessage(UnicodeString sAttendeeFilter)
{
return formatHelper(JulianFormatString::Instance()->ms_sVTodoRefreshMessage, sAttendeeFilter);
return formatHelper(nsCalFormatString::Instance()->ms_sVTodoRefreshMessage, sAttendeeFilter);
}
//---------------------------------------------------------------------
UnicodeString VTodo::allMessage()
{
return formatHelper(JulianFormatString::Instance()->ms_sVTodoAllPropertiesMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVTodoAllPropertiesMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VTodo::replyMessage(UnicodeString sAttendeeFilter)
{
return formatHelper(JulianFormatString::Instance()->ms_sVTodoReplyMessage, sAttendeeFilter);
return formatHelper(nsCalFormatString::Instance()->ms_sVTodoReplyMessage, sAttendeeFilter);
}
//---------------------------------------------------------------------
UnicodeString VTodo::publishMessage()
{
return formatHelper(JulianFormatString::Instance()->ms_sVTodoPublishMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVTodoPublishMessage, "");
}
//---------------------------------------------------------------------
UnicodeString VTodo::publishRecurMessage()
{
return formatHelper(JulianFormatString::Instance()->ms_sVTodoRecurPublishMessage, "");
return formatHelper(nsCalFormatString::Instance()->ms_sVTodoRecurPublishMessage, "");
}
//---------------------------------------------------------------------
@ -1196,7 +1196,7 @@ VTodo::addResourcesPropertyVector(UnicodeString & propVal,
ErrorCode status = ZERO_ERROR;
UnicodeStringTokenizer * st;
UnicodeString us;
UnicodeString sDelim = JulianKeyword::Instance()->ms_sCOMMA_SYMBOL;
UnicodeString sDelim = nsCalKeyword::Instance()->ms_sCOMMA_SYMBOL;
st = new UnicodeStringTokenizer(propVal, sDelim);
//ICalProperty * ip;

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

@ -41,7 +41,7 @@ class nsCalStreamReader
private:
/*char * m_Buffer;*/
static JulianUtility::MimeEncoding stringToEncodingType(UnicodeString & propVal);
static nsCalUtility::MimeEncoding stringToEncodingType(UnicodeString & propVal);
JulianPtrArray * m_OutCalendars;
nsCapiCallbackReader * m_Reader;

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

@ -36,7 +36,7 @@
class NS_CALENDAR nsCalStreamReader
{
private:
static JulianUtility::MimeEncoding stringToEncodingType(UnicodeString & propVal);
static nsCalUtility::MimeEncoding stringToEncodingType(UnicodeString & propVal);
/* dont deallocate these */

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

@ -76,7 +76,7 @@ private:
/** encoding of stream */
JulianUtility::MimeEncoding m_Encoding;
nsCalUtility::MimeEncoding m_Encoding;
/** need to deallocate */
JulianPtrArray * m_Chunks;
@ -104,7 +104,7 @@ public:
** CONSTRUCTORS and DESTRUCTORS
**---------------------------*/
nsCapiCallbackReader(PRMonitor * monitor,
JulianUtility::MimeEncoding encoding = JulianUtility::MimeEncoding_7bit);
nsCalUtility::MimeEncoding encoding = nsCalUtility::MimeEncoding_7bit);
~nsCapiCallbackReader();
/*-----------------------------
@ -114,7 +114,7 @@ public:
virtual void * getMonitor() { return m_Monitor; }
void setFinished() { m_bFinished = TRUE; }
void setEncoding(JulianUtility::MimeEncoding encoding) { m_Encoding = encoding; }
void setEncoding(nsCalUtility::MimeEncoding encoding) { m_Encoding = encoding; }
t_bool isFinished() const { return m_bFinished; }
/**

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

@ -64,23 +64,23 @@ nsCalStreamReader::nsCalStreamReader(nsCapiCallbackReader * reader,
//---------------------------------------------------------------------
JulianUtility::MimeEncoding
nsCalUtility::MimeEncoding
nsCalStreamReader::stringToEncodingType(UnicodeString & propVal)
{
if (propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_s7bit) == 0)
if (propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_s7bit) == 0)
{
return JulianUtility::MimeEncoding_7bit;
return nsCalUtility::MimeEncoding_7bit;
}
else if (propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sQUOTED_PRINTABLE) == 0)
else if (propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sQUOTED_PRINTABLE) == 0)
{
return JulianUtility::MimeEncoding_QuotedPrintable;
return nsCalUtility::MimeEncoding_QuotedPrintable;
}
else if (propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sBase64) == 0)
else if (propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sBase64) == 0)
{
return JulianUtility::MimeEncoding_Base64;
return nsCalUtility::MimeEncoding_Base64;
}
else
return JulianUtility::MimeEncoding_7bit;
return nsCalUtility::MimeEncoding_7bit;
}
//---------------------------------------------------------------------
@ -107,7 +107,7 @@ void nsCalStreamReader::ParseCalendars(ICalReader * reader,
JLog * log = 0;
ErrorCode status = ZERO_ERROR;
UnicodeString strLine, propName, propVal;
JulianUtility::MimeEncoding encoding = JulianUtility::MimeEncoding_7bit;
nsCalUtility::MimeEncoding encoding = nsCalUtility::MimeEncoding_7bit;
nsCapiCallbackReader * cr = (nsCapiCallbackReader *) reader;
@ -141,8 +141,8 @@ void nsCalStreamReader::ParseCalendars(ICalReader * reader,
if (TRUE) TRACE("\t--Parser: propName = --%s--, propVal = --%s--,paramSize = %d\r\n",
propName.toCString(""), propVal.toCString(""), parameters->GetSize());
#endif
if ((propName.compareIgnoreCase(JulianKeyword::Instance()->ms_sBEGIN) == 0) &&
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVCALENDAR) == 0))
if ((propName.compareIgnoreCase(nsCalKeyword::Instance()->ms_sBEGIN) == 0) &&
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVCALENDAR) == 0))
{
// parse an NSCalendar, add it to outCalendars
NSCalendar * cal = new NSCalendar(log);
@ -151,7 +151,7 @@ void nsCalStreamReader::ParseCalendars(ICalReader * reader,
outCalendars->Add(cal);
}
else if (propName.compareIgnoreCase(
JulianKeyword::Instance()->ms_sCONTENT_TRANSFER_ENCODING) == 0)
nsCalKeyword::Instance()->ms_sCONTENT_TRANSFER_ENCODING) == 0)
{
ICalProperty::Trim(propVal);
encoding = stringToEncodingType(propVal);

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

@ -42,7 +42,7 @@ nsCapiCallbackReader::AddBuffer(nsCapiBufferStruct * cBuf)
//---------------------------------------------------------------------
nsCapiCallbackReader::nsCapiCallbackReader(PRMonitor * monitor,
JulianUtility::MimeEncoding encoding)
nsCalUtility::MimeEncoding encoding)
{
m_Monitor = monitor;
m_bFinished = FALSE;
@ -113,7 +113,7 @@ t_int8 nsCapiCallbackReader::read(ErrorCode & status)
char c;
if ((size_t) m_Pos < cbBuf->m_pBufSize)
{
if (JulianUtility::MimeEncoding_QuotedPrintable == m_Encoding)
if (nsCalUtility::MimeEncoding_QuotedPrintable == m_Encoding)
{
char * buf = cbBuf->m_pBuf;
c = buf[m_Pos];

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

@ -67,15 +67,15 @@ nsCalStreamReader::nsCalStreamReader(nsCapiCallbackReader * reader,
nsCalUtility::MimeEncoding
nsCalStreamReader::stringToEncodingType(UnicodeString & propVal)
{
if (propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_s7bit) == 0)
if (propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_s7bit) == 0)
{
return nsCalUtility::MimeEncoding_7bit;
}
else if (propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sQUOTED_PRINTABLE) == 0)
else if (propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sQUOTED_PRINTABLE) == 0)
{
return nsCalUtility::MimeEncoding_QuotedPrintable;
}
else if (propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sBase64) == 0)
else if (propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sBase64) == 0)
{
return nsCalUtility::MimeEncoding_Base64;
}
@ -141,8 +141,8 @@ void nsCalStreamReader::ParseCalendars(ICalReader * reader,
if (TRUE) TRACE("\t--Parser: propName = --%s--, propVal = --%s--,paramSize = %d\r\n",
propName.toCString(""), propVal.toCString(""), parameters->GetSize());
#endif
if ((propName.compareIgnoreCase(JulianKeyword::Instance()->ms_sBEGIN) == 0) &&
(propVal.compareIgnoreCase(JulianKeyword::Instance()->ms_sVCALENDAR) == 0))
if ((propName.compareIgnoreCase(nsCalKeyword::Instance()->ms_sBEGIN) == 0) &&
(propVal.compareIgnoreCase(nsCalKeyword::Instance()->ms_sVCALENDAR) == 0))
{
// parse an NSCalendar, add it to outCalendars
NSCalendar * cal = new NSCalendar(log);
@ -151,7 +151,7 @@ void nsCalStreamReader::ParseCalendars(ICalReader * reader,
outCalendars->Add(cal);
}
else if (propName.compareIgnoreCase(
JulianKeyword::Instance()->ms_sCONTENT_TRANSFER_ENCODING) == 0)
nsCalKeyword::Instance()->ms_sCONTENT_TRANSFER_ENCODING) == 0)
{
ICalProperty::Trim(propVal);
encoding = stringToEncodingType(propVal);

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

@ -52,7 +52,7 @@ private:
**---------------------------*/
#if 0
/* date formatting strings. Moved to JulianFormatString class */
/* date formatting strings. Moved to nsCalFormatString class */
static UnicodeString ms_asPatterns[];
static UnicodeString ms_sISO8601Pattern;
static UnicodeString ms_sISO8601LocalPattern;

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

@ -78,7 +78,7 @@ private:
/**
* current vector of errors that is currently being written to.
*/
JulianLogErrorVector * m_CurrentEventLogVctr;
nsCalLogErrorVector * m_CurrentEventLogVctr;
/** TRUE = writeToString, FALSE = writeToFile, immutable */
t_bool m_WriteToString;
@ -90,7 +90,7 @@ private:
FILE * m_Stream;
/* if successful addition return TRUE, else FALSE */
t_bool addErrorToVector(JulianLogError * error);
t_bool addErrorToVector(nsCalLogError * error);
public:
@ -172,7 +172,7 @@ public:
* @param ComponentType
*/
void setCurrentEventLogComponentType(JulianLogErrorVector::ECompType iComponentType);
void setCurrentEventLogComponentType(nsCalLogErrorVector::ECompType iComponentType);
#if 0
void setUIDRecurrenceID(UnicodeString & uid, UnicodeString & rid);
@ -207,7 +207,7 @@ public:
* createIterator(logPtr, ECompType_XCOMPONENT, FALSE)
*
*/
static JulianLogIterator * createIterator(JLog * aLog, JulianLogErrorVector::ECompType iComponentType, t_bool bValid = TRUE);
static nsCalLogIterator * createIterator(JLog * aLog, nsCalLogErrorVector::ECompType iComponentType, t_bool bValid = TRUE);
#endif
void logError(const t_int32 errorID, t_int32 level = m_DEFAULT_LEVEL);

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

@ -33,7 +33,7 @@
* the error string. It also has a priority level and an error log number id.
* TODO: c++doc this
*/
class NS_CAL_UTIL JulianLogError
class NS_CAL_UTIL nsCalLogError
{
private:
/*-----------------------------
@ -48,20 +48,20 @@ private:
/*-----------------------------
** PRIVATE METHODS
**---------------------------*/
JulianLogError();
nsCalLogError();
public:
/*-----------------------------
** CONSTRUCTORS and DESTRUCTORS
**---------------------------*/
#if 0
JulianLogError(UnicodeString & errorString,
nsCalLogError(UnicodeString & errorString,
t_int32 errorPriority);
#endif
JulianLogError(t_int32 errorID,
nsCalLogError(t_int32 errorID,
UnicodeString & shortReturnStatusCode,
UnicodeString & offendingData, t_int32 errorPriority);
virtual ~JulianLogError() {}
virtual ~nsCalLogError() {}
/*-----------------------------
** ACCESSORS (GET AND SET)
**---------------------------*/
@ -83,7 +83,7 @@ public:
/*-----------------------------
** STATIC METHODS
**---------------------------*/
static void deleteJulianLogErrorVector(JulianPtrArray * errors);
static void deleteNsCalLogErrorVector(JulianPtrArray * errors);
/*-----------------------------
** OVERLOADED OPERATORS
**---------------------------*/

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

@ -28,14 +28,14 @@
#include "jlogvctr.h"
#include "nscalutilexp.h"
class NS_CAL_UTIL JulianLogIterator
class NS_CAL_UTIL nsCalLogIterator
{
private:
/*-----------------------------
** MEMBERS
**---------------------------*/
JulianPtrArray * m_LogToIterateOver;
JulianLogErrorVector::ECompType m_iComponentType;
nsCalLogErrorVector::ECompType m_iComponentType;
t_bool m_bValid;
t_int32 m_iIndex;
@ -43,39 +43,39 @@ private:
** PRIVATE METHODS
**---------------------------*/
JulianLogIterator();
JulianLogIterator(JulianPtrArray * toIterate, JulianLogErrorVector::ECompType iComponentType,
nsCalLogIterator();
nsCalLogIterator(JulianPtrArray * toIterate, nsCalLogErrorVector::ECompType iComponentType,
t_bool bValid);
JulianLogErrorVector * findNextElement(t_int32 startIndex);
nsCalLogErrorVector * findNextElement(t_int32 startIndex);
public:
static JulianLogIterator * createIterator(JulianPtrArray * toIterate,
JulianLogErrorVector::ECompType iComponentType, t_bool bValid);
static nsCalLogIterator * createIterator(JulianPtrArray * toIterate,
nsCalLogErrorVector::ECompType iComponentType, t_bool bValid);
/**
* Do this to create iterator of VEVENT log messages
t_int32 i;
JulianLogErrorVector * evtErrVctr = 0;
JulianLogError * error = 0;
nsCalLogErrorVector * evtErrVctr = 0;
nsCalLogError * error = 0;
if (log != 0)
{
JulianLogIterator * itr = log->createIterator((t_int32) ICalComponent::ICAL_COMPONENT_VEVENT)
nsCalLogIterator * itr = log->createIterator((t_int32) ICalComponent::ICAL_COMPONENT_VEVENT)
for (evtErrVctr = itr->firstElement(); evtErrVctr != 0; evtErrVctr = itr->nextElement())
{
if (evtErrVctr->GetErrors() != 0)
{
for (i = 0; i < evtErrVctr->GetErrors()->GetSize(); i++)
{
error = (JulianLogError *) errVctr->GetErrors()->GetAt(i);
error = (nsCalLogError *) errVctr->GetErrors()->GetAt(i);
// do what you want.
}
}
}
*/
JulianLogErrorVector * firstElement();
JulianLogErrorVector * nextElement();
nsCalLogErrorVector * firstElement();
nsCalLogErrorVector * nextElement();
};
#endif /* __JULIANLOGITERATOR_H_ */

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

@ -27,7 +27,7 @@
#include "jlogerr.h"
#include "nscalutilexp.h"
class NS_CAL_UTIL JulianLogErrorVector
class NS_CAL_UTIL nsCalLogErrorVector
{
public:
@ -62,9 +62,9 @@ public:
** CONSTRUCTORS and DESTRUCTORS
**---------------------------*/
JulianLogErrorVector();
JulianLogErrorVector(ECompType iICalComponentType);
~JulianLogErrorVector();
nsCalLogErrorVector();
nsCalLogErrorVector(ECompType iICalComponentType);
~nsCalLogErrorVector();
/*-----------------------------
** ACCESSORS (GET AND SET)
@ -89,7 +89,7 @@ public:
** UTILITIES
**---------------------------*/
void AddError(JulianLogError * error);
void AddError(nsCalLogError * error);
};

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

@ -32,15 +32,15 @@
/**
* singleton class to contain all ICAL keywords
*/
class NS_CAL_UTIL JulianKeyword
class NS_CAL_UTIL nsCalKeyword
{
private:
static JulianKeyword * m_Instance;
JulianKeyword();
static nsCalKeyword * m_Instance;
nsCalKeyword();
public:
static JulianKeyword * Instance();
~JulianKeyword();
static nsCalKeyword * Instance();
~nsCalKeyword();
/* iCALENDAR KEYWORDS*/
UnicodeString ms_sVCALENDAR;
@ -771,16 +771,16 @@ public:
/**
* singleton class that contains JAtom ranges for parameter checking.
*/
class NS_CAL_UTIL JulianAtomRange
class NS_CAL_UTIL nsCalAtomRange
{
private:
static JulianAtomRange * m_Instance;
JulianAtomRange();
static nsCalAtomRange * m_Instance;
nsCalAtomRange();
public:
~JulianAtomRange();
static JulianAtomRange * Instance();
~nsCalAtomRange();
static nsCalAtomRange * Instance();
/*
calscale: x-token
@ -891,16 +891,16 @@ public:
* For now, messages are not localized.
* NOTE: TODO: Localize the log error message one day
*/
class NS_CAL_UTIL JulianLogErrorMessage
class NS_CAL_UTIL nsCalLogErrorMessage
{
private:
static JulianLogErrorMessage * m_Instance;
JulianLogErrorMessage();
static nsCalLogErrorMessage * m_Instance;
nsCalLogErrorMessage();
public:
~JulianLogErrorMessage();
static JulianLogErrorMessage * Instance();
~nsCalLogErrorMessage();
static nsCalLogErrorMessage * Instance();
#if 0
UnicodeString ms_sDTEndBeforeDTStart;
@ -1240,17 +1240,17 @@ public:
* Singleton class that contains all formatting strings used
* to print iCalendar object to output.
*/
class NS_CAL_UTIL JulianFormatString
class NS_CAL_UTIL nsCalFormatString
{
private:
static JulianFormatString * m_Instance;
JulianFormatString();
static nsCalFormatString * m_Instance;
nsCalFormatString();
public:
static JulianFormatString * Instance();
~JulianFormatString();
static nsCalFormatString * Instance();
~nsCalFormatString();
/* DateTime string*/
UnicodeString ms_asDateTimePatterns[16];

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

@ -314,7 +314,7 @@ Date DateTime::parse(UnicodeString & s, Locale & locale)
{
for (i = 0; i < kPATTERNSIZE; i++)
{
if ((d = parseTime(JulianFormatString::Instance()->ms_asDateTimePatterns[i], s, locale)) > 0)
if ((d = parseTime(nsCalFormatString::Instance()->ms_asDateTimePatterns[i], s, locale)) > 0)
{
break;
}
@ -451,16 +451,16 @@ Date DateTime::parseISO8601(UnicodeString & us, TimeZone * timezone)
if (bUTC)
{
if ((t = parseTime(JulianFormatString::Instance()->ms_asDateTimePatterns[0], temp, (TimeZone *) m_kGMTTimeZone)) < 0)
if ((t = parseTime(nsCalFormatString::Instance()->ms_asDateTimePatterns[0], temp, (TimeZone *) m_kGMTTimeZone)) < 0)
{
t = parseTime(JulianFormatString::Instance()->ms_asDateTimePatterns[1], temp, (TimeZone *) m_kGMTTimeZone);
t = parseTime(nsCalFormatString::Instance()->ms_asDateTimePatterns[1], temp, (TimeZone *) m_kGMTTimeZone);
}
}
else
{
if ((t = parseTime(JulianFormatString::Instance()->ms_asDateTimePatterns[0], temp, timezone)) < 0)
if ((t = parseTime(nsCalFormatString::Instance()->ms_asDateTimePatterns[0], temp, timezone)) < 0)
{
t = parseTime(JulianFormatString::Instance()->ms_asDateTimePatterns[1], temp, timezone);
t = parseTime(nsCalFormatString::Instance()->ms_asDateTimePatterns[1], temp, timezone);
}
}
@ -1115,20 +1115,20 @@ t_bool DateTime::sameDMY(DateTime * d, TimeZone * timezone)
UnicodeString DateTime::toString(TimeZone * timezone)
{
//return strftimeNoLocale(ms_sDefaultPattern, m_TimeZone);
return strftimeNoLocale(JulianFormatString::Instance()->ms_sDateTimeDefaultPattern, timezone);
return strftimeNoLocale(nsCalFormatString::Instance()->ms_sDateTimeDefaultPattern, timezone);
}
//---------------------------------------------------------------------
UnicodeString DateTime::toISO8601Local(TimeZone * timezone)
{
//return strftimeNoLocale(ms_sISO8601LocalPattern, m_TimeZone);
return strftimeNoLocale(JulianFormatString::Instance()->ms_sDateTimeISO8601LocalPattern, timezone);
return strftimeNoLocale(nsCalFormatString::Instance()->ms_sDateTimeISO8601LocalPattern, timezone);
}
//---------------------------------------------------------------------
UnicodeString DateTime::toISO8601()
{
return strftimeNoLocale(JulianFormatString::Instance()->ms_sDateTimeISO8601Pattern,
return strftimeNoLocale(nsCalFormatString::Instance()->ms_sDateTimeISO8601Pattern,
(TimeZone *) m_kGMTTimeZone);
}
//---------------------------------------------------------------------
@ -1136,14 +1136,14 @@ UnicodeString DateTime::toISO8601()
UnicodeString DateTime::toISO8601LocalTimeOnly(TimeZone * timezone)
{
//return strftimeNoLocale(ms_sISO8601TimeOnlyPattern, m_TimeZone);
return strftimeNoLocale(JulianFormatString::Instance()->ms_sDateTimeISO8601TimeOnlyPattern, timezone);
return strftimeNoLocale(nsCalFormatString::Instance()->ms_sDateTimeISO8601TimeOnlyPattern, timezone);
}
//---------------------------------------------------------------------
UnicodeString DateTime::toISO8601TimeOnly()
{
return strftimeNoLocale(JulianFormatString::Instance()->ms_sDateTimeISO8601TimeOnlyPattern,
return strftimeNoLocale(nsCalFormatString::Instance()->ms_sDateTimeISO8601TimeOnlyPattern,
(TimeZone *) m_kGMTTimeZone);
}
@ -1152,14 +1152,14 @@ UnicodeString DateTime::toISO8601TimeOnly()
UnicodeString DateTime::toISO8601LocalDateOnly(TimeZone * timezone)
{
//return strftimeNoLocale(ms_sISO8601DateOnlyPattern, m_TimeZone);
return strftimeNoLocale(JulianFormatString::Instance()->ms_sDateTimeISO8601DateOnlyPattern, timezone);
return strftimeNoLocale(nsCalFormatString::Instance()->ms_sDateTimeISO8601DateOnlyPattern, timezone);
}
//---------------------------------------------------------------------
UnicodeString DateTime::toISO8601DateOnly()
{
return strftimeNoLocale(JulianFormatString::Instance()->ms_sDateTimeISO8601DateOnlyPattern,
return strftimeNoLocale(nsCalFormatString::Instance()->ms_sDateTimeISO8601DateOnlyPattern,
(TimeZone *) m_kGMTTimeZone);
}

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

@ -33,7 +33,7 @@ const t_int32 JLog::m_DEFAULT_LEVEL = 200;
const char * JLog::m_DEFAULT_FILENAME = "JLog.txt";
//---------------------------------------------------------------------
t_bool JLog::addErrorToVector(JulianLogError * error)
t_bool JLog::addErrorToVector(nsCalLogError * error)
{
t_bool status = FALSE;
if (m_CurrentEventLogVctr == 0)
@ -82,11 +82,11 @@ JLog::~JLog()
{
if (m_ErrorVctr != 0)
{
JulianLogErrorVector * evtLogVctr = 0;
nsCalLogErrorVector * evtLogVctr = 0;
t_int32 i = 0;
for (i = m_ErrorVctr->GetSize() - 1; i >= 0; i--)
{
evtLogVctr = (JulianLogErrorVector *) m_ErrorVctr->GetAt(i);
evtLogVctr = (nsCalLogErrorVector *) m_ErrorVctr->GetAt(i);
delete evtLogVctr;
}
delete m_ErrorVctr; m_ErrorVctr = 0;
@ -104,8 +104,8 @@ void JLog::addEventErrorEntry()
}
if (m_ErrorVctr != 0)
{
JulianLogErrorVector * evtVctr = 0;
evtVctr = new JulianLogErrorVector();
nsCalLogErrorVector * evtVctr = 0;
evtVctr = new nsCalLogErrorVector();
if (evtVctr != 0)
{
m_ErrorVctr->Add(evtVctr);
@ -126,7 +126,7 @@ void JLog::setCurrentEventLogValidity(t_bool b)
//---------------------------------------------------------------------
void JLog::setCurrentEventLogComponentType(JulianLogErrorVector::ECompType iComponentType)
void JLog::setCurrentEventLogComponentType(nsCalLogErrorVector::ECompType iComponentType)
{
if (m_CurrentEventLogVctr != 0)
{
@ -169,13 +169,13 @@ JLog::getEventErrorLog(t_int32 index) const
//---------------------------------------------------------------------
#if 0
JulianLogIterator *
JLog::createIterator(JLog * aLog, JulianLogErrorVector::ECompType iComponentType, t_bool bValid)
nsCalLogIterator *
JLog::createIterator(JLog * aLog, nsCalLogErrorVector::ECompType iComponentType, t_bool bValid)
{
if (aLog->GetErrorVector() == 0)
return 0;
else
return JulianLogIterator::createIterator(aLog->GetErrorVector(), iComponentType, bValid);
return nsCalLogIterator::createIterator(aLog->GetErrorVector(), iComponentType, bValid);
}
#endif
//---------------------------------------------------------------------
@ -210,13 +210,13 @@ void JLog::logError(const t_int32 errorID,
UnicodeString & paramValue,
t_int32 level)
{
JulianLogError * error = 0;
nsCalLogError * error = 0;
UnicodeString shortReturnStatus = "3.0";
UnicodeString offendingData;
offendingData += propName; offendingData += ':'; offendingData += paramName;
offendingData += ':'; offendingData += paramValue;
error = new JulianLogError(errorID, shortReturnStatus, offendingData, level);
error = new nsCalLogError(errorID, shortReturnStatus, offendingData, level);
if (error != 0)
{
t_bool bAdded;

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

@ -27,7 +27,7 @@
//---------------------------------------------------------------------
#if 0
JulianLogError::JulianLogError(UnicodeString & errorString,
nsCalLogError::nsCalLogError(UnicodeString & errorString,
t_int32 errorPriority)
{
m_ErrorString = errorString;
@ -36,7 +36,7 @@ JulianLogError::JulianLogError(UnicodeString & errorString,
}
#endif
//---------------------------------------------------------------------
JulianLogError::JulianLogError(t_int32 errorID,
nsCalLogError::nsCalLogError(t_int32 errorID,
UnicodeString & shortReturnStatusCode,
UnicodeString & offendingData,
t_int32 errorPriority)
@ -47,14 +47,14 @@ JulianLogError::JulianLogError(t_int32 errorID,
m_Priority = errorPriority;
}
//---------------------------------------------------------------------
void JulianLogError::deleteJulianLogErrorVector(JulianPtrArray * errors)
void nsCalLogError::deleteNsCalLogErrorVector(JulianPtrArray * errors)
{
if (errors != 0)
{
t_int32 i;
for (i = errors->GetSize() - 1; i >= 0; i--)
{
delete ((JulianLogError *) errors->GetAt(i));
delete ((nsCalLogError *) errors->GetAt(i));
}
}
}

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

@ -27,8 +27,8 @@
#include "jlogitr.h"
//---------------------------------------------------------------------
JulianLogIterator::JulianLogIterator(JulianPtrArray * toIterate,
JulianLogErrorVector::ECompType iComponentType,
nsCalLogIterator::nsCalLogIterator(JulianPtrArray * toIterate,
nsCalLogErrorVector::ECompType iComponentType,
t_bool bValid):
m_LogToIterateOver(toIterate),
m_iComponentType(iComponentType),
@ -38,51 +38,51 @@ m_bValid(bValid)
//---------------------------------------------------------------------
JulianLogIterator::JulianLogIterator()
nsCalLogIterator::nsCalLogIterator()
{
}
//---------------------------------------------------------------------
JulianLogIterator *
JulianLogIterator::createIterator(JulianPtrArray * toIterate,
JulianLogErrorVector::ECompType iComponentType,
nsCalLogIterator *
nsCalLogIterator::createIterator(JulianPtrArray * toIterate,
nsCalLogErrorVector::ECompType iComponentType,
t_bool bValid)
{
if (toIterate == 0)
return 0;
else
return new JulianLogIterator(toIterate, iComponentType, bValid);
return new nsCalLogIterator(toIterate, iComponentType, bValid);
}
//---------------------------------------------------------------------
JulianLogErrorVector *
JulianLogIterator::firstElement()
nsCalLogErrorVector *
nsCalLogIterator::firstElement()
{
return findNextElement(0);
}
//---------------------------------------------------------------------
JulianLogErrorVector *
JulianLogIterator::nextElement()
nsCalLogErrorVector *
nsCalLogIterator::nextElement()
{
return findNextElement(++m_iIndex);
}
//---------------------------------------------------------------------
JulianLogErrorVector *
JulianLogIterator::findNextElement(t_int32 startIndex)
nsCalLogErrorVector *
nsCalLogIterator::findNextElement(t_int32 startIndex)
{
if (m_LogToIterateOver != 0)
{
JulianLogErrorVector * errVctr = 0;
nsCalLogErrorVector * errVctr = 0;
t_int32 i;
for (i = startIndex; i < m_LogToIterateOver->GetSize(); i++)
{
errVctr = (JulianLogErrorVector *) m_LogToIterateOver->GetAt(i);
errVctr = (nsCalLogErrorVector *) m_LogToIterateOver->GetAt(i);
if ((errVctr->GetComponentType() == m_iComponentType) &&
(errVctr->IsValid() == m_bValid))
{

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

@ -26,30 +26,30 @@
#include "jlogvctr.h"
//---------------------------------------------------------------------
JulianLogErrorVector::JulianLogErrorVector()
nsCalLogErrorVector::nsCalLogErrorVector()
{
m_ICalComponentType = ECompType_NSCALENDAR;
m_ErrorVctr = 0;
m_bValidEvent = TRUE;
}
//---------------------------------------------------------------------
JulianLogErrorVector::JulianLogErrorVector(ECompType iICalComponentType)
nsCalLogErrorVector::nsCalLogErrorVector(ECompType iICalComponentType)
{
m_ICalComponentType = iICalComponentType;
m_ErrorVctr = 0;
m_bValidEvent = TRUE;
}
//---------------------------------------------------------------------
JulianLogErrorVector::~JulianLogErrorVector()
nsCalLogErrorVector::~nsCalLogErrorVector()
{
if (m_ErrorVctr != 0)
{
JulianLogError::deleteJulianLogErrorVector(m_ErrorVctr);
nsCalLogError::deleteNsCalLogErrorVector(m_ErrorVctr);
delete m_ErrorVctr; m_ErrorVctr = 0;
}
}
//---------------------------------------------------------------------
void JulianLogErrorVector::AddError(JulianLogError * error)
void nsCalLogErrorVector::AddError(nsCalLogError * error)
{
if (m_ErrorVctr == 0)
m_ErrorVctr = new JulianPtrArray();

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

@ -33,11 +33,11 @@
//---------------------------------------------------------------------
JulianKeyword * JulianKeyword::m_Instance = 0;
nsCalKeyword * nsCalKeyword::m_Instance = 0;
//---------------------------------------------------------------------
JulianKeyword::JulianKeyword()
nsCalKeyword::nsCalKeyword()
{
ms_sVCALENDAR = "VCALENDAR";
ms_ATOM_VCALENDAR.setString(ms_sVCALENDAR);
@ -560,17 +560,17 @@ JulianKeyword::JulianKeyword()
//---------------------------------------------------------------------
JulianKeyword * JulianKeyword::Instance()
nsCalKeyword * nsCalKeyword::Instance()
{
if (m_Instance == 0)
m_Instance = new JulianKeyword();
m_Instance = new nsCalKeyword();
PR_ASSERT(m_Instance != 0);
return m_Instance;
}
//---------------------------------------------------------------------
JulianKeyword::~JulianKeyword()
nsCalKeyword::~nsCalKeyword()
{
/*
if (m_Instance != 0)
@ -581,14 +581,14 @@ JulianKeyword::~JulianKeyword()
}
//---------------------------------------------------------------------
// JulianAtomRange
// nsCalAtomRange
//---------------------------------------------------------------------
JulianAtomRange * JulianAtomRange::m_Instance = 0;
nsCalAtomRange * nsCalAtomRange::m_Instance = 0;
//---------------------------------------------------------------------
JulianAtomRange::~JulianAtomRange()
nsCalAtomRange::~nsCalAtomRange()
{
/*
if (m_Instance != 0)
@ -600,106 +600,106 @@ JulianAtomRange::~JulianAtomRange()
//---------------------------------------------------------------------
JulianAtomRange *
JulianAtomRange::Instance()
nsCalAtomRange *
nsCalAtomRange::Instance()
{
if (m_Instance == 0)
m_Instance = new JulianAtomRange();
m_Instance = new nsCalAtomRange();
PR_ASSERT(m_Instance != 0);
return m_Instance;
}
//---------------------------------------------------------------------
JulianAtomRange::JulianAtomRange()
nsCalAtomRange::nsCalAtomRange()
{
// ATOM RANGES
ms_asAltrepLanguageParamRange[0] = JulianKeyword::Instance()->ms_ATOM_ALTREP;
ms_asAltrepLanguageParamRange[1] = JulianKeyword::Instance()->ms_ATOM_LANGUAGE;
ms_asAltrepLanguageParamRange[0] = nsCalKeyword::Instance()->ms_ATOM_ALTREP;
ms_asAltrepLanguageParamRange[1] = nsCalKeyword::Instance()->ms_ATOM_LANGUAGE;
ms_asAltrepLanguageParamRangeSize = 2;
ms_asTZIDValueParamRange[0] = JulianKeyword::Instance()->ms_ATOM_VALUE;
ms_asTZIDValueParamRange[1] = JulianKeyword::Instance()->ms_ATOM_TZID;
ms_asTZIDValueParamRange[0] = nsCalKeyword::Instance()->ms_ATOM_VALUE;
ms_asTZIDValueParamRange[1] = nsCalKeyword::Instance()->ms_ATOM_TZID;
ms_asTZIDValueParamRangeSize = 2;
ms_asLanguageParamRange[0] = JulianKeyword::Instance()->ms_ATOM_LANGUAGE;
ms_asLanguageParamRange[0] = nsCalKeyword::Instance()->ms_ATOM_LANGUAGE;
ms_asLanguageParamRangeSize = 1;
ms_asEncodingValueParamRange[0] = JulianKeyword::Instance()->ms_ATOM_ENCODING;
ms_asEncodingValueParamRange[1] = JulianKeyword::Instance()->ms_ATOM_VALUE;
ms_asEncodingValueParamRange[0] = nsCalKeyword::Instance()->ms_ATOM_ENCODING;
ms_asEncodingValueParamRange[1] = nsCalKeyword::Instance()->ms_ATOM_VALUE;
ms_asEncodingValueParamRangeSize = 2;
ms_asEncodingValueFMTTypeParamRange[0] = JulianKeyword::Instance()->ms_ATOM_ENCODING;
ms_asEncodingValueFMTTypeParamRange[1] = JulianKeyword::Instance()->ms_ATOM_VALUE;
ms_asEncodingValueFMTTypeParamRange[2] = JulianKeyword::Instance()->ms_ATOM_FMTTYPE;
ms_asEncodingValueFMTTypeParamRange[0] = nsCalKeyword::Instance()->ms_ATOM_ENCODING;
ms_asEncodingValueFMTTypeParamRange[1] = nsCalKeyword::Instance()->ms_ATOM_VALUE;
ms_asEncodingValueFMTTypeParamRange[2] = nsCalKeyword::Instance()->ms_ATOM_FMTTYPE;
ms_asEncodingValueFMTTypeParamRangeSize = 3;
ms_asSentByParamRange[0] = JulianKeyword::Instance()->ms_ATOM_SENTBY;
ms_asSentByParamRange[0] = nsCalKeyword::Instance()->ms_ATOM_SENTBY;
ms_asSentByParamRangeSize = 1;
ms_asReltypeParamRange[0] = JulianKeyword::Instance()->ms_ATOM_RELTYPE;
ms_asReltypeParamRange[0] = nsCalKeyword::Instance()->ms_ATOM_RELTYPE;
ms_asReltypeParamRangeSize = 1;
ms_asRelatedValueParamRange[0] = JulianKeyword::Instance()->ms_ATOM_VALUE;
ms_asRelatedValueParamRange[1] = JulianKeyword::Instance()->ms_ATOM_RELATED;
ms_asRelatedValueParamRange[0] = nsCalKeyword::Instance()->ms_ATOM_VALUE;
ms_asRelatedValueParamRange[1] = nsCalKeyword::Instance()->ms_ATOM_RELATED;
ms_asRelatedValueParamRangeSize = 2;
ms_asBinaryURIValueRange[0] = JulianKeyword::Instance()->ms_ATOM_BINARY;
ms_asBinaryURIValueRange[1] = JulianKeyword::Instance()->ms_ATOM_URI;
ms_asBinaryURIValueRange[0] = nsCalKeyword::Instance()->ms_ATOM_BINARY;
ms_asBinaryURIValueRange[1] = nsCalKeyword::Instance()->ms_ATOM_URI;
ms_asBinaryURIValueRangeSize = 2;
ms_asDateDateTimeValueRange[0] = JulianKeyword::Instance()->ms_ATOM_DATE;
ms_asDateDateTimeValueRange[1] = JulianKeyword::Instance()->ms_ATOM_DATETIME;
ms_asDateDateTimeValueRange[0] = nsCalKeyword::Instance()->ms_ATOM_DATE;
ms_asDateDateTimeValueRange[1] = nsCalKeyword::Instance()->ms_ATOM_DATETIME;
ms_asDateDateTimeValueRangeSize = 2;
ms_asDurationDateTimeValueRange[0] = JulianKeyword::Instance()->ms_ATOM_DURATION;
ms_asDurationDateTimeValueRange[1] = JulianKeyword::Instance()->ms_ATOM_DATETIME;
ms_asDurationDateTimeValueRange[0] = nsCalKeyword::Instance()->ms_ATOM_DURATION;
ms_asDurationDateTimeValueRange[1] = nsCalKeyword::Instance()->ms_ATOM_DATETIME;
ms_asDurationDateTimeValueRangeSize = 2;
ms_asDateDateTimePeriodValueRange[0] = JulianKeyword::Instance()->ms_ATOM_DATE;
ms_asDateDateTimePeriodValueRange[1] = JulianKeyword::Instance()->ms_ATOM_DATETIME;
ms_asDateDateTimePeriodValueRange[2] = JulianKeyword::Instance()->ms_ATOM_PERIOD;
ms_asDateDateTimePeriodValueRange[0] = nsCalKeyword::Instance()->ms_ATOM_DATE;
ms_asDateDateTimePeriodValueRange[1] = nsCalKeyword::Instance()->ms_ATOM_DATETIME;
ms_asDateDateTimePeriodValueRange[2] = nsCalKeyword::Instance()->ms_ATOM_PERIOD;
ms_asDateDateTimePeriodValueRangeSize = 3;
ms_asRelTypeRange[0] = JulianKeyword::Instance()->ms_ATOM_PARENT;
ms_asRelTypeRange[1] = JulianKeyword::Instance()->ms_ATOM_CHILD;
ms_asRelTypeRange[2] = JulianKeyword::Instance()->ms_ATOM_SIBLING;
ms_asRelTypeRange[0] = nsCalKeyword::Instance()->ms_ATOM_PARENT;
ms_asRelTypeRange[1] = nsCalKeyword::Instance()->ms_ATOM_CHILD;
ms_asRelTypeRange[2] = nsCalKeyword::Instance()->ms_ATOM_SIBLING;
ms_iRelTypeRangeSize = 3;
ms_asRelatedRange[0] = JulianKeyword::Instance()->ms_ATOM_START;
ms_asRelatedRange[1] = JulianKeyword::Instance()->ms_ATOM_END;
ms_asRelatedRange[0] = nsCalKeyword::Instance()->ms_ATOM_START;
ms_asRelatedRange[1] = nsCalKeyword::Instance()->ms_ATOM_END;
ms_iRelatedRangeSize = 2;
ms_asParameterRange[0] = JulianKeyword::Instance()->ms_ATOM_ALTREP;
ms_asParameterRange[1] = JulianKeyword::Instance()->ms_ATOM_ENCODING;
ms_asParameterRange[2] = JulianKeyword::Instance()->ms_ATOM_LANGUAGE;
ms_asParameterRange[3] = JulianKeyword::Instance()->ms_ATOM_TZID;
ms_asParameterRange[4] = JulianKeyword::Instance()->ms_ATOM_VALUE;
ms_asParameterRange[0] = nsCalKeyword::Instance()->ms_ATOM_ALTREP;
ms_asParameterRange[1] = nsCalKeyword::Instance()->ms_ATOM_ENCODING;
ms_asParameterRange[2] = nsCalKeyword::Instance()->ms_ATOM_LANGUAGE;
ms_asParameterRange[3] = nsCalKeyword::Instance()->ms_ATOM_TZID;
ms_asParameterRange[4] = nsCalKeyword::Instance()->ms_ATOM_VALUE;
ms_iParameterRangeSize = 5;
ms_asIrregularProperties[0] = JulianKeyword::Instance()->ms_ATOM_ATTENDEE;
ms_asIrregularProperties[1] = JulianKeyword::Instance()->ms_ATOM_FREEBUSY;
ms_asIrregularProperties[2] = JulianKeyword::Instance()->ms_ATOM_RECURRENCEID;
ms_asIrregularProperties[3] = JulianKeyword::Instance()->ms_ATOM_ORGANIZER;
ms_asIrregularProperties[0] = nsCalKeyword::Instance()->ms_ATOM_ATTENDEE;
ms_asIrregularProperties[1] = nsCalKeyword::Instance()->ms_ATOM_FREEBUSY;
ms_asIrregularProperties[2] = nsCalKeyword::Instance()->ms_ATOM_RECURRENCEID;
ms_asIrregularProperties[3] = nsCalKeyword::Instance()->ms_ATOM_ORGANIZER;
ms_iIrregularPropertiesSize = 4;
ms_asValueRange[0] = JulianKeyword::Instance()->ms_ATOM_BINARY;
ms_asValueRange[1] = JulianKeyword::Instance()->ms_ATOM_BOOLEAN;
ms_asValueRange[2] = JulianKeyword::Instance()->ms_ATOM_CALADDRESS;
ms_asValueRange[3] = JulianKeyword::Instance()->ms_ATOM_DATE;
ms_asValueRange[4] = JulianKeyword::Instance()->ms_ATOM_DATETIME;
ms_asValueRange[5] = JulianKeyword::Instance()->ms_ATOM_DURATION;
ms_asValueRange[6] = JulianKeyword::Instance()->ms_ATOM_FLOAT;
ms_asValueRange[7] = JulianKeyword::Instance()->ms_ATOM_INTEGER;
ms_asValueRange[8] = JulianKeyword::Instance()->ms_ATOM_PERIOD;
ms_asValueRange[9] = JulianKeyword::Instance()->ms_ATOM_RECUR;
ms_asValueRange[10] = JulianKeyword::Instance()->ms_ATOM_TEXT;
ms_asValueRange[11] = JulianKeyword::Instance()->ms_ATOM_TIME;
ms_asValueRange[12] = JulianKeyword::Instance()->ms_ATOM_URI;
ms_asValueRange[13] = JulianKeyword::Instance()->ms_ATOM_UTCOFFSET;
ms_asValueRange[0] = nsCalKeyword::Instance()->ms_ATOM_BINARY;
ms_asValueRange[1] = nsCalKeyword::Instance()->ms_ATOM_BOOLEAN;
ms_asValueRange[2] = nsCalKeyword::Instance()->ms_ATOM_CALADDRESS;
ms_asValueRange[3] = nsCalKeyword::Instance()->ms_ATOM_DATE;
ms_asValueRange[4] = nsCalKeyword::Instance()->ms_ATOM_DATETIME;
ms_asValueRange[5] = nsCalKeyword::Instance()->ms_ATOM_DURATION;
ms_asValueRange[6] = nsCalKeyword::Instance()->ms_ATOM_FLOAT;
ms_asValueRange[7] = nsCalKeyword::Instance()->ms_ATOM_INTEGER;
ms_asValueRange[8] = nsCalKeyword::Instance()->ms_ATOM_PERIOD;
ms_asValueRange[9] = nsCalKeyword::Instance()->ms_ATOM_RECUR;
ms_asValueRange[10] = nsCalKeyword::Instance()->ms_ATOM_TEXT;
ms_asValueRange[11] = nsCalKeyword::Instance()->ms_ATOM_TIME;
ms_asValueRange[12] = nsCalKeyword::Instance()->ms_ATOM_URI;
ms_asValueRange[13] = nsCalKeyword::Instance()->ms_ATOM_UTCOFFSET;
ms_iValueRangeSize = 14;
ms_asEncodingRange[0] = JulianKeyword::Instance()->ms_ATOM_8bit;
ms_asEncodingRange[1] = JulianKeyword::Instance()->ms_ATOM_Base64;
ms_asEncodingRange[0] = nsCalKeyword::Instance()->ms_ATOM_8bit;
ms_asEncodingRange[1] = nsCalKeyword::Instance()->ms_ATOM_Base64;
ms_iEncodingRangeSize = 2;
};
@ -709,23 +709,23 @@ JulianAtomRange::JulianAtomRange()
//---------------------------------------------------------------------
JulianLogErrorMessage * JulianLogErrorMessage::m_Instance = 0;
t_int32 JulianLogErrorMessage::ms_iStaticErrorNumber = 10000;
nsCalLogErrorMessage * nsCalLogErrorMessage::m_Instance = 0;
t_int32 nsCalLogErrorMessage::ms_iStaticErrorNumber = 10000;
//---------------------------------------------------------------------
JulianLogErrorMessage *
JulianLogErrorMessage::Instance()
nsCalLogErrorMessage *
nsCalLogErrorMessage::Instance()
{
if (m_Instance == 0)
m_Instance = new JulianLogErrorMessage();
m_Instance = new nsCalLogErrorMessage();
PR_ASSERT(m_Instance != 0);
return m_Instance;
}
//---------------------------------------------------------------------
JulianLogErrorMessage::~JulianLogErrorMessage()
nsCalLogErrorMessage::~nsCalLogErrorMessage()
{
/*
if (m_Instance != 0)
@ -737,7 +737,7 @@ JulianLogErrorMessage::~JulianLogErrorMessage()
//---------------------------------------------------------------------
JulianLogErrorMessage::JulianLogErrorMessage()
nsCalLogErrorMessage::nsCalLogErrorMessage()
{
#if 0
ms_sDTEndBeforeDTStart = "error: DTEnd before DTStart. Setting DTEnd equal to DTStart.";
@ -1076,25 +1076,25 @@ JulianLogErrorMessage::JulianLogErrorMessage()
//---------------------------------------------------------------------
//---------------------------------------------------------------------
// JulianFormatString
// nsCalFormatString
//---------------------------------------------------------------------
JulianFormatString * JulianFormatString::m_Instance = 0;
nsCalFormatString * nsCalFormatString::m_Instance = 0;
//---------------------------------------------------------------------
JulianFormatString *
JulianFormatString::Instance()
nsCalFormatString *
nsCalFormatString::Instance()
{
if (m_Instance == 0)
m_Instance = new JulianFormatString();
m_Instance = new nsCalFormatString();
PR_ASSERT(m_Instance != 0);
return m_Instance;
}
//---------------------------------------------------------------------
JulianFormatString::~JulianFormatString()
nsCalFormatString::~nsCalFormatString()
{
/*
if (m_Instance != 0)
@ -1106,7 +1106,7 @@ JulianFormatString::~JulianFormatString()
//---------------------------------------------------------------------
JulianFormatString::JulianFormatString()
nsCalFormatString::nsCalFormatString()
{
ms_sDateTimeISO8601Pattern = "yyyyMMdd'T'HHmmss'Z'";
ms_sDateTimeISO8601LocalPattern = "yyyyMMdd'T'HHmmss";