Bug 579517 - Part 6: Automated conversion of NSPR numeric types to stdint types in Gecko; r=mconley
This patch was generated by a script. Here's the source of the script for future reference: function convert() { echo "Converting $1 to $2..." find . ! -wholename "*/mozilla*" \ ! -wholename "*ldap/sdks/c-sdk*" \ ! -wholename "*/.hg*" \ ! -wholename "obj-tb-dbg*" \ ! -wholename "obj-sm-dbg*" \ -type f \ \( -iname "*.cpp" \ -o -iname "*.h" \ -o -iname "*.c" \ -o -iname "*.cc" \ -o -iname "*.idl" \ -o -iname "*.ipdl" \ -o -iname "*.ipdlh" \ -o -iname "*.mm" \) | \ xargs -n 1 sed -i -e "s/\b$1\b/$2/g" } convert PRInt8 int8_t convert PRUint8 uint8_t convert PRInt16 int16_t convert PRUint16 uint16_t convert PRInt32 int32_t convert PRUint32 uint32_t convert PRInt64 int64_t convert PRUint64 uint64_t convert PRIntn int convert PRUintn unsigned convert PRSize size_t convert PROffset32 int32_t convert PROffset64 int64_t convert PRPtrdiff ptrdiff_t convert PRFloat64 double
This commit is contained in:
Родитель
1a0180af79
Коммит
eafa99c563
|
@ -117,7 +117,7 @@ interface calIAlarm : nsISupports
|
|||
void addAttendee(in calIAttendee aAttendee);
|
||||
void deleteAttendee(in calIAttendee aAttendee);
|
||||
void clearAttendees();
|
||||
void getAttendees(out PRUint32 count,
|
||||
void getAttendees(out uint32_t count,
|
||||
[array,size_is(count),retval] out calIAttendee attendees);
|
||||
|
||||
/**
|
||||
|
@ -129,7 +129,7 @@ interface calIAlarm : nsISupports
|
|||
void addAttachment(in calIAttachment aAttachment);
|
||||
void deleteAttachment(in calIAttachment aAttachment);
|
||||
void clearAttachments();
|
||||
void getAttachments(out PRUint32 count,
|
||||
void getAttachments(out uint32_t count,
|
||||
[array,size_is(count),retval] out calIAttachment attachments);
|
||||
|
||||
/**
|
||||
|
|
|
@ -505,7 +505,7 @@ interface calICompositeCalendar : calICalendar
|
|||
calICalendar getCalendarById(in AUTF8String aId);
|
||||
|
||||
/* return a list of all calendars currently registered */
|
||||
void getCalendars(out PRUint32 count,
|
||||
void getCalendars(out uint32_t count,
|
||||
[array, size_is(count), retval] out calICalendar aCalendars);
|
||||
|
||||
/**
|
||||
|
@ -625,6 +625,6 @@ interface calIOperationListener : nsISupports
|
|||
in nsresult aStatus,
|
||||
in nsIIDRef aItemType,
|
||||
in nsIVariant aDetail,
|
||||
in PRUint32 aCount,
|
||||
in uint32_t aCount,
|
||||
[array, size_is(aCount), iid_is(aItemType)] in nsQIResult aItems );
|
||||
};
|
||||
|
|
|
@ -50,16 +50,16 @@ interface calICalendarACLEntry : nsISupports
|
|||
|
||||
/* Returns the list of user ids matching the user accessing the
|
||||
calendar. */
|
||||
void getUserAddresses(out PRUint32 aCount,
|
||||
void getUserAddresses(out uint32_t aCount,
|
||||
[array, size_is(aCount), retval] out wstring aAddresses);
|
||||
|
||||
/* Returns the list of instantiated identities for the user accessing the
|
||||
calendar. */
|
||||
void getUserIdentities(out PRUint32 aCount,
|
||||
void getUserIdentities(out uint32_t aCount,
|
||||
[array, size_is(aCount), retval] out nsIMsgIdentity aIdentities);
|
||||
/* Returns the list of instantiated identities for the user representing
|
||||
the calendar owner. */
|
||||
void getOwnerIdentities(out PRUint32 aCount,
|
||||
void getOwnerIdentities(out uint32_t aCount,
|
||||
[array, size_is(aCount), retval] out nsIMsgIdentity aIdentities);
|
||||
|
||||
/* Helper method that forces a cleanup of any cache and a reload of the
|
||||
|
|
|
@ -17,17 +17,17 @@ interface calICalendarManager : nsISupports
|
|||
/**
|
||||
* Gives the number of registered calendars that require network access.
|
||||
*/
|
||||
readonly attribute PRUint32 networkCalendarCount;
|
||||
readonly attribute uint32_t networkCalendarCount;
|
||||
|
||||
/***
|
||||
* Gives the number of registered readonly calendars.
|
||||
*/
|
||||
readonly attribute PRUint32 readOnlyCalendarCount;
|
||||
readonly attribute uint32_t readOnlyCalendarCount;
|
||||
|
||||
/**
|
||||
* Gives the number of registered calendars
|
||||
*/
|
||||
readonly attribute PRUint32 calendarCount;
|
||||
readonly attribute uint32_t calendarCount;
|
||||
/*
|
||||
* create a new calendar
|
||||
* aType is the type ("caldav", "storage", etc)
|
||||
|
@ -47,7 +47,7 @@ interface calICalendarManager : nsISupports
|
|||
calICalendar getCalendarById(in AUTF8String aId);
|
||||
|
||||
/* return a list of all calendars currently registered */
|
||||
void getCalendars(out PRUint32 count,
|
||||
void getCalendars(out uint32_t count,
|
||||
[array, size_is(count), retval] out calICalendar aCalendars);
|
||||
|
||||
/** Add an observer for the calendar manager, i.e when calendars are registered */
|
||||
|
|
|
@ -50,7 +50,7 @@ interface calICalendarSearchService : calICalendarSearchProvider
|
|||
/**
|
||||
* Gets the currently registered set of search providers.
|
||||
*/
|
||||
void getProviders(out PRUint32 aCount,
|
||||
void getProviders(out uint32_t aCount,
|
||||
[array, size_is(aCount), retval] out calICalendarSearchProvider aProviders);
|
||||
|
||||
/**
|
||||
|
|
|
@ -81,12 +81,12 @@ interface calICalendarView : nsISupports
|
|||
/**
|
||||
* Zoom view in one level. Defaults to one level.
|
||||
*/
|
||||
void zoomIn([optional] in PRUint32 level);
|
||||
void zoomIn([optional] in uint32_t level);
|
||||
|
||||
/**
|
||||
* Zoom view out one level. Defaults to one level.
|
||||
*/
|
||||
void zoomOut([optional] in PRUint32 level);
|
||||
void zoomOut([optional] in uint32_t level);
|
||||
|
||||
/**
|
||||
* Reset view zoom.
|
||||
|
|
|
@ -63,7 +63,7 @@ interface calICalendarViewController : nsISupports
|
|||
* @param aDoNotConfirm If set, the events will be deleted without
|
||||
* confirmation.
|
||||
*/
|
||||
void deleteOccurrences (in PRUint32 aCount,
|
||||
void deleteOccurrences (in uint32_t aCount,
|
||||
[array, size_is(aCount)] in calIItemBase aOccurrences,
|
||||
in boolean aUseParentItems,
|
||||
in boolean aDoNotConfirm);
|
||||
|
|
|
@ -100,7 +100,7 @@ interface calISyncWriteCalendar : calICalendar {
|
|||
/**
|
||||
* Gets all meta data. The returned arrays are of the same length.
|
||||
*/
|
||||
void getAllMetaData(out PRUint32 count,
|
||||
void getAllMetaData(out uint32_t count,
|
||||
[array, size_is(count)] out wstring ids,
|
||||
[array, size_is(count)] out wstring values);
|
||||
};
|
||||
|
|
|
@ -51,7 +51,7 @@ interface calIDateTime : nsISupports
|
|||
* nativeTime will be 00:00:00 in the timezone of that date, not 00:00:00 in
|
||||
* UTC.
|
||||
*/
|
||||
attribute PRInt64 nativeTime;
|
||||
attribute int64_t nativeTime;
|
||||
|
||||
/**
|
||||
* Full 4-digit year value (e.g. "1989", "2004")
|
||||
|
|
|
@ -37,7 +37,7 @@ interface calIIcalComponent : nsISupports
|
|||
* This is the value that an integer-valued getter will provide if
|
||||
* there is no such property on the wrapped ical structure.
|
||||
*/
|
||||
const PRInt32 INVALID_VALUE = -1;
|
||||
const int32_t INVALID_VALUE = -1;
|
||||
|
||||
/**
|
||||
* @param kind ANY, XROOT, VCALENDAR, VEVENT, etc.
|
||||
|
@ -67,7 +67,7 @@ interface calIIcalComponent : nsISupports
|
|||
attribute AUTF8String categories;
|
||||
attribute AUTF8String URL;
|
||||
|
||||
attribute PRInt32 priority;
|
||||
attribute int32_t priority;
|
||||
|
||||
attribute calIDateTime startTime;
|
||||
attribute calIDateTime endTime;
|
||||
|
@ -133,7 +133,7 @@ interface calIIcalComponent : nsISupports
|
|||
* These are the timezones that are in use by this
|
||||
* component and its children.
|
||||
*/
|
||||
void getReferencedTimezones(out PRUint32 aCount,
|
||||
void getReferencedTimezones(out uint32_t aCount,
|
||||
[array,size_is(aCount),retval] out calITimezone aTimezones);
|
||||
|
||||
/**
|
||||
|
|
|
@ -74,7 +74,7 @@ interface calIIcsParser : nsISupports
|
|||
* @param aItems
|
||||
* The items
|
||||
*/
|
||||
void getItems(out PRUint32 aCount,
|
||||
void getItems(out uint32_t aCount,
|
||||
[array,size_is(aCount),retval] out calIItemBase aItems);
|
||||
|
||||
/**
|
||||
|
@ -87,7 +87,7 @@ interface calIIcsParser : nsISupports
|
|||
* @param aItems
|
||||
* The items
|
||||
*/
|
||||
void getParentlessItems(out PRUint32 aCount,
|
||||
void getParentlessItems(out uint32_t aCount,
|
||||
[array,size_is(aCount),retval] out calIItemBase aItems);
|
||||
|
||||
/**
|
||||
|
@ -97,7 +97,7 @@ interface calIIcsParser : nsISupports
|
|||
* @param aProperties
|
||||
* The properties
|
||||
*/
|
||||
void getProperties(out PRUint32 aCount,
|
||||
void getProperties(out uint32_t aCount,
|
||||
[array,size_is(aCount),retval] out calIIcalProperty aProperties);
|
||||
|
||||
/**
|
||||
|
@ -107,6 +107,6 @@ interface calIIcsParser : nsISupports
|
|||
* @param aComponents
|
||||
* The components
|
||||
*/
|
||||
void getComponents(out PRUint32 aCount,
|
||||
void getComponents(out uint32_t aCount,
|
||||
[array,size_is(aCount),retval] out calIIcalComponent aComponents);
|
||||
};
|
||||
|
|
|
@ -69,7 +69,7 @@ interface calIItemBase : nsISupports
|
|||
//
|
||||
// the generation number of this item
|
||||
//
|
||||
attribute PRUint32 generation;
|
||||
attribute uint32_t generation;
|
||||
|
||||
// the time when this item was created
|
||||
readonly attribute calIDateTime creationDate;
|
||||
|
@ -115,7 +115,7 @@ interface calIItemBase : nsISupports
|
|||
* @param count The number of alarms
|
||||
* @param aAlarms The array of calIAlarms
|
||||
*/
|
||||
void getAlarms(out PRUint32 count, [array, size_is(count), retval] out calIAlarm aAlarms);
|
||||
void getAlarms(out uint32_t count, [array, size_is(count), retval] out calIAlarm aAlarms);
|
||||
|
||||
/**
|
||||
* Add an alarm to the item
|
||||
|
@ -259,7 +259,7 @@ interface calIItemBase : nsISupports
|
|||
|
||||
// The array returned here is not live; it will not reflect calls to
|
||||
// removeAttendee/addAttendee that follow the call to getAttendees.
|
||||
void getAttendees(out PRUint32 count,
|
||||
void getAttendees(out uint32_t count,
|
||||
[array,size_is(count),retval] out calIAttendee attendees);
|
||||
|
||||
/**
|
||||
|
@ -275,7 +275,7 @@ interface calIItemBase : nsISupports
|
|||
//
|
||||
// Attachments
|
||||
//
|
||||
void getAttachments(out PRUint32 count,
|
||||
void getAttachments(out uint32_t count,
|
||||
[array,size_is(count),retval] out calIAttachment attachments);
|
||||
void addAttachment(in calIAttachment attachment);
|
||||
void removeAttachment(in calIAttachment attachment);
|
||||
|
@ -288,13 +288,13 @@ interface calIItemBase : nsISupports
|
|||
/**
|
||||
* Gets the array of categories this item belongs to.
|
||||
*/
|
||||
void getCategories(out PRUint32 aCount,
|
||||
void getCategories(out uint32_t aCount,
|
||||
[array, size_is(aCount), retval] out wstring aCategories);
|
||||
|
||||
/**
|
||||
* Sets the array of categories this item belongs to.
|
||||
*/
|
||||
void setCategories(in PRUint32 aCount,
|
||||
void setCategories(in uint32_t aCount,
|
||||
[array, size_is(aCount)] in wstring aCategories);
|
||||
|
||||
//
|
||||
|
@ -305,7 +305,7 @@ interface calIItemBase : nsISupports
|
|||
* This gives back every relation where the item is neighter the owner of the
|
||||
* relation nor the referred relation
|
||||
*/
|
||||
void getRelations(out PRUint32 count,
|
||||
void getRelations(out uint32_t count,
|
||||
[array,size_is(count),retval] out calIRelation relations);
|
||||
|
||||
/**
|
||||
|
@ -331,7 +331,7 @@ interface calIItemBase : nsISupports
|
|||
* returned are the same type as this one, as proxies.
|
||||
*/
|
||||
void getOccurrencesBetween (in calIDateTime aStartDate, in calIDateTime aEndDate,
|
||||
out PRUint32 aCount,
|
||||
out uint32_t aCount,
|
||||
[array,size_is(aCount),retval] out calIItemBase aOccurrences);
|
||||
|
||||
/**
|
||||
|
|
|
@ -42,7 +42,7 @@ interface calIItipTransport : nsISupports
|
|||
* @param recipientArray array of recipients
|
||||
* @param calIItipItem set of calIItems encapsulated as calIItipItems
|
||||
*/
|
||||
void sendItems(in PRUint32 count,
|
||||
void sendItems(in uint32_t count,
|
||||
[array, size_is(count)] in calIAttendee recipientArray,
|
||||
in calIItipItem item);
|
||||
};
|
||||
|
|
|
@ -66,12 +66,12 @@ calDateTime::Clone(calIDateTime **aResult)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
calDateTime::ResetTo(PRInt16 year,
|
||||
PRInt16 month,
|
||||
PRInt16 day,
|
||||
PRInt16 hour,
|
||||
PRInt16 minute,
|
||||
PRInt16 second,
|
||||
calDateTime::ResetTo(int16_t year,
|
||||
int16_t month,
|
||||
int16_t day,
|
||||
int16_t hour,
|
||||
int16_t minute,
|
||||
int16_t second,
|
||||
calITimezone * tz)
|
||||
{
|
||||
NS_ENSURE_FALSE(mImmutable, NS_ERROR_OBJECT_IS_IMMUTABLE);
|
||||
|
@ -107,17 +107,17 @@ calDateTime::Reset()
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
CAL_VALUETYPE_ATTR(calDateTime, PRInt16, Year)
|
||||
CAL_VALUETYPE_ATTR(calDateTime, PRInt16, Month)
|
||||
CAL_VALUETYPE_ATTR(calDateTime, PRInt16, Day)
|
||||
CAL_VALUETYPE_ATTR(calDateTime, PRInt16, Hour)
|
||||
CAL_VALUETYPE_ATTR(calDateTime, PRInt16, Minute)
|
||||
CAL_VALUETYPE_ATTR(calDateTime, PRInt16, Second)
|
||||
CAL_VALUETYPE_ATTR(calDateTime, int16_t, Year)
|
||||
CAL_VALUETYPE_ATTR(calDateTime, int16_t, Month)
|
||||
CAL_VALUETYPE_ATTR(calDateTime, int16_t, Day)
|
||||
CAL_VALUETYPE_ATTR(calDateTime, int16_t, Hour)
|
||||
CAL_VALUETYPE_ATTR(calDateTime, int16_t, Minute)
|
||||
CAL_VALUETYPE_ATTR(calDateTime, int16_t, Second)
|
||||
CAL_VALUETYPE_ATTR(calDateTime, bool, IsDate)
|
||||
CAL_VALUETYPE_ATTR_GETTER(calDateTime, bool, IsValid)
|
||||
CAL_VALUETYPE_ATTR_GETTER(calDateTime, PRTime, NativeTime)
|
||||
CAL_VALUETYPE_ATTR_GETTER(calDateTime, PRInt16, Weekday)
|
||||
CAL_VALUETYPE_ATTR_GETTER(calDateTime, PRInt16, Yearday)
|
||||
CAL_VALUETYPE_ATTR_GETTER(calDateTime, int16_t, Weekday)
|
||||
CAL_VALUETYPE_ATTR_GETTER(calDateTime, int16_t, Yearday)
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -141,7 +141,7 @@ calDateTime::SetTimezone(calITimezone *aValue)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
calDateTime::GetTimezoneOffset(PRInt32 *aResult)
|
||||
calDateTime::GetTimezoneOffset(int32_t *aResult)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aResult);
|
||||
icaltimetype icalt;
|
||||
|
@ -191,7 +191,7 @@ calDateTime::SubtractDate(calIDateTime *aDate, calIDuration **aDuration)
|
|||
// for a duration, need to convert the difference in microseconds (prtime)
|
||||
// to seconds (libical), so divide by one million.
|
||||
icaldurationtype const idt = icaldurationtype_from_int(
|
||||
static_cast<int>((mNativeTime - t2t) / PRInt64(PR_USEC_PER_SEC)));
|
||||
static_cast<int>((mNativeTime - t2t) / int64_t(PR_USEC_PER_SEC)));
|
||||
|
||||
calDuration * const dur = new calDuration(&idt);
|
||||
CAL_ENSURE_MEMORY(dur);
|
||||
|
@ -208,11 +208,11 @@ calDateTime::ToString(nsACString & aResult)
|
|||
ensureTimezone();
|
||||
mTimezone->GetTzid(tzid);
|
||||
|
||||
PRUint32 const length = PR_snprintf(
|
||||
uint32_t const length = PR_snprintf(
|
||||
buffer, sizeof(buffer), "%04hd/%02hd/%02hd %02hd:%02hd:%02hd %s isDate=%01hd nativeTime=%lld",
|
||||
mYear, mMonth + 1, mDay, mHour, mMinute, mSecond,
|
||||
tzid.get(), static_cast<PRInt16>(mIsDate), mNativeTime);
|
||||
if (length != static_cast<PRUint32>(-1))
|
||||
tzid.get(), static_cast<int16_t>(mIsDate), mNativeTime);
|
||||
if (length != static_cast<uint32_t>(-1))
|
||||
aResult.Assign(buffer, length);
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -464,12 +464,12 @@ void calDateTime::FromIcalTime(icaltimetype const* icalt, calITimezone * tz)
|
|||
t = icaltime_normalize(t);
|
||||
}
|
||||
|
||||
mYear = static_cast<PRInt16>(t.year);
|
||||
mMonth = static_cast<PRInt16>(t.month - 1);
|
||||
mDay = static_cast<PRInt16>(t.day);
|
||||
mHour = static_cast<PRInt16>(t.hour);
|
||||
mMinute = static_cast<PRInt16>(t.minute);
|
||||
mSecond = static_cast<PRInt16>(t.second);
|
||||
mYear = static_cast<int16_t>(t.year);
|
||||
mMonth = static_cast<int16_t>(t.month - 1);
|
||||
mDay = static_cast<int16_t>(t.day);
|
||||
mHour = static_cast<int16_t>(t.hour);
|
||||
mMinute = static_cast<int16_t>(t.minute);
|
||||
mSecond = static_cast<int16_t>(t.second);
|
||||
|
||||
if (tz) {
|
||||
mTimezone = tz;
|
||||
|
@ -495,8 +495,8 @@ void calDateTime::FromIcalTime(icaltimetype const* icalt, calITimezone * tz)
|
|||
}
|
||||
#endif
|
||||
|
||||
mWeekday = static_cast<PRInt16>(icaltime_day_of_week(t) - 1);
|
||||
mYearday = static_cast<PRInt16>(icaltime_day_of_year(t));
|
||||
mWeekday = static_cast<int16_t>(icaltime_day_of_week(t) - 1);
|
||||
mYearday = static_cast<int16_t>(icaltime_day_of_year(t));
|
||||
|
||||
// mNativeTime: not moving the existing date to UTC,
|
||||
// but merely representing it a UTC-based way.
|
||||
|
@ -533,9 +533,9 @@ PRTime calDateTime::IcaltimeToPRTime(icaltimetype const* icalt, icaltimezone con
|
|||
et.tm_min = tt.minute;
|
||||
et.tm_hour = tt.hour;
|
||||
}
|
||||
et.tm_mday = static_cast<PRInt16>(tt.day);
|
||||
et.tm_month = static_cast<PRInt16>(tt.month-1);
|
||||
et.tm_year = static_cast<PRInt16>(tt.year);
|
||||
et.tm_mday = static_cast<int16_t>(tt.day);
|
||||
et.tm_month = static_cast<int16_t>(tt.month-1);
|
||||
et.tm_year = static_cast<int16_t>(tt.year);
|
||||
|
||||
return PR_ImplodeTime(&et);
|
||||
}
|
||||
|
@ -573,7 +573,7 @@ void calDateTime::PRTimeToIcaltime(PRTime time, bool isdate,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
calDateTime::Compare(calIDateTime * aOther, PRInt32 * aResult)
|
||||
calDateTime::Compare(calIDateTime * aOther, int32_t * aResult)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aOther);
|
||||
NS_ENSURE_ARG_POINTER(aResult);
|
||||
|
|
|
@ -26,14 +26,14 @@ protected:
|
|||
bool mIsValid;
|
||||
bool mIsDate;
|
||||
|
||||
PRInt16 mYear;
|
||||
PRInt16 mMonth;
|
||||
PRInt16 mDay;
|
||||
PRInt16 mHour;
|
||||
PRInt16 mMinute;
|
||||
PRInt16 mSecond;
|
||||
PRInt16 mWeekday;
|
||||
PRInt16 mYearday;
|
||||
int16_t mYear;
|
||||
int16_t mMonth;
|
||||
int16_t mDay;
|
||||
int16_t mHour;
|
||||
int16_t mMinute;
|
||||
int16_t mSecond;
|
||||
int16_t mWeekday;
|
||||
int16_t mYearday;
|
||||
|
||||
PRTime mNativeTime;
|
||||
nsCOMPtr<calITimezone> mTimezone;
|
||||
|
|
|
@ -101,60 +101,60 @@ NS_IMETHODIMP calDuration::SetIsNegative(bool aValue)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP calDuration::GetWeeks(PRInt16 *_retval)
|
||||
NS_IMETHODIMP calDuration::GetWeeks(int16_t *_retval)
|
||||
{
|
||||
*_retval = (PRInt16)mDuration.weeks;
|
||||
*_retval = (int16_t)mDuration.weeks;
|
||||
return NS_OK;
|
||||
}
|
||||
NS_IMETHODIMP calDuration::SetWeeks(PRInt16 aValue)
|
||||
NS_IMETHODIMP calDuration::SetWeeks(int16_t aValue)
|
||||
{
|
||||
if (mImmutable) return NS_ERROR_CALENDAR_IMMUTABLE;
|
||||
mDuration.weeks = aValue;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP calDuration::GetDays(PRInt16 *_retval)
|
||||
NS_IMETHODIMP calDuration::GetDays(int16_t *_retval)
|
||||
{
|
||||
*_retval = (PRInt16)mDuration.days;
|
||||
*_retval = (int16_t)mDuration.days;
|
||||
return NS_OK;
|
||||
}
|
||||
NS_IMETHODIMP calDuration::SetDays(PRInt16 aValue)
|
||||
NS_IMETHODIMP calDuration::SetDays(int16_t aValue)
|
||||
{
|
||||
if (mImmutable) return NS_ERROR_CALENDAR_IMMUTABLE;
|
||||
mDuration.days = aValue;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP calDuration::GetHours(PRInt16 *_retval)
|
||||
NS_IMETHODIMP calDuration::GetHours(int16_t *_retval)
|
||||
{
|
||||
*_retval = (PRInt16)mDuration.hours;
|
||||
*_retval = (int16_t)mDuration.hours;
|
||||
return NS_OK;
|
||||
}
|
||||
NS_IMETHODIMP calDuration::SetHours(PRInt16 aValue)
|
||||
NS_IMETHODIMP calDuration::SetHours(int16_t aValue)
|
||||
{
|
||||
if (mImmutable) return NS_ERROR_CALENDAR_IMMUTABLE;
|
||||
mDuration.hours = aValue;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP calDuration::GetMinutes(PRInt16 *_retval)
|
||||
NS_IMETHODIMP calDuration::GetMinutes(int16_t *_retval)
|
||||
{
|
||||
*_retval = (PRInt16)mDuration.minutes;
|
||||
*_retval = (int16_t)mDuration.minutes;
|
||||
return NS_OK;
|
||||
}
|
||||
NS_IMETHODIMP calDuration::SetMinutes(PRInt16 aValue)
|
||||
NS_IMETHODIMP calDuration::SetMinutes(int16_t aValue)
|
||||
{
|
||||
if (mImmutable) return NS_ERROR_CALENDAR_IMMUTABLE;
|
||||
mDuration.minutes = aValue;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP calDuration::GetSeconds(PRInt16 *_retval)
|
||||
NS_IMETHODIMP calDuration::GetSeconds(int16_t *_retval)
|
||||
{
|
||||
*_retval = (PRInt16)mDuration.seconds;
|
||||
*_retval = (int16_t)mDuration.seconds;
|
||||
return NS_OK;
|
||||
}
|
||||
NS_IMETHODIMP calDuration::SetSeconds(PRInt16 aValue)
|
||||
NS_IMETHODIMP calDuration::SetSeconds(int16_t aValue)
|
||||
{
|
||||
if (mImmutable) return NS_ERROR_CALENDAR_IMMUTABLE;
|
||||
mDuration.seconds = aValue;
|
||||
|
@ -162,21 +162,21 @@ NS_IMETHODIMP calDuration::SetSeconds(PRInt16 aValue)
|
|||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP calDuration::GetInSeconds(PRInt32 *_retval)
|
||||
NS_IMETHODIMP calDuration::GetInSeconds(int32_t *_retval)
|
||||
{
|
||||
PRInt32 retval =
|
||||
(((PRInt32)((PRInt16)mDuration.weeks * SECONDS_PER_WEEK)) +
|
||||
((PRInt32)((PRInt16)mDuration.days * SECONDS_PER_DAY)) +
|
||||
((PRInt32)((PRInt16)mDuration.hours * SECONDS_PER_HOUR)) +
|
||||
((PRInt32)((PRInt16)mDuration.minutes * SECONDS_PER_MINUTE)) +
|
||||
((PRInt32)((PRInt16)mDuration.seconds)));
|
||||
int32_t retval =
|
||||
(((int32_t)((int16_t)mDuration.weeks * SECONDS_PER_WEEK)) +
|
||||
((int32_t)((int16_t)mDuration.days * SECONDS_PER_DAY)) +
|
||||
((int32_t)((int16_t)mDuration.hours * SECONDS_PER_HOUR)) +
|
||||
((int32_t)((int16_t)mDuration.minutes * SECONDS_PER_MINUTE)) +
|
||||
((int32_t)((int16_t)mDuration.seconds)));
|
||||
if (mDuration.is_neg)
|
||||
retval=-retval;
|
||||
*_retval = retval;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
NS_IMETHODIMP calDuration::SetInSeconds(PRInt32 aValue)
|
||||
NS_IMETHODIMP calDuration::SetInSeconds(int32_t aValue)
|
||||
{
|
||||
if (mImmutable) return NS_ERROR_CALENDAR_IMMUTABLE;
|
||||
|
||||
|
@ -239,7 +239,7 @@ calDuration::Normalize()
|
|||
if (mImmutable)
|
||||
return NS_ERROR_CALENDAR_IMMUTABLE;
|
||||
|
||||
PRInt32 totalInSeconds;
|
||||
int32_t totalInSeconds;
|
||||
GetInSeconds(&totalInSeconds);
|
||||
SetInSeconds(totalInSeconds);
|
||||
|
||||
|
@ -298,9 +298,9 @@ calDuration::SetIcalString(const nsACString& aIcalString)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
calDuration::Compare(calIDuration *aOther, PRInt32 *aResult)
|
||||
calDuration::Compare(calIDuration *aOther, int32_t *aResult)
|
||||
{
|
||||
PRInt32 thisInSeconds, otherInSeconds;
|
||||
int32_t thisInSeconds, otherInSeconds;
|
||||
|
||||
// cast to void because these calls can't fail
|
||||
(void)GetInSeconds(&thisInSeconds);
|
||||
|
|
|
@ -491,12 +491,12 @@ TimezoneHashToTimezoneArray(nsACString const& /*tzid*/, calITimezone * tz, void
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
calIcalComponent::GetReferencedTimezones(PRUint32 * aCount, calITimezone *** aTimezones)
|
||||
calIcalComponent::GetReferencedTimezones(uint32_t * aCount, calITimezone *** aTimezones)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aCount);
|
||||
NS_ENSURE_ARG_POINTER(aTimezones);
|
||||
|
||||
PRUint32 const count = mReferencedTimezones.Count();
|
||||
uint32_t const count = mReferencedTimezones.Count();
|
||||
if (count == 0) {
|
||||
*aCount = 0;
|
||||
*aTimezones = nullptr;
|
||||
|
@ -547,7 +547,7 @@ calIcalComponent::SetProperty(icalproperty_kind kind, icalproperty *prop)
|
|||
NS_IMETHODIMP \
|
||||
calIcalComponent::Get##Attrname(nsACString &str) \
|
||||
{ \
|
||||
PRInt32 val; \
|
||||
int32_t val; \
|
||||
nsresult rv = GetIntProperty(ICAL_##ICALNAME##_PROPERTY, &val); \
|
||||
if (NS_FAILED(rv)) \
|
||||
return rv; \
|
||||
|
@ -604,26 +604,26 @@ calIcalComponent::Set##Attrname(const nsACString &str) \
|
|||
|
||||
#define COMP_GENERAL_INT_ATTRIBUTE(Attrname, ICALNAME) \
|
||||
NS_IMETHODIMP \
|
||||
calIcalComponent::Get##Attrname(PRInt32 *valp) \
|
||||
calIcalComponent::Get##Attrname(int32_t *valp) \
|
||||
{ \
|
||||
return GetIntProperty(ICAL_##ICALNAME##_PROPERTY, valp); \
|
||||
} \
|
||||
\
|
||||
NS_IMETHODIMP \
|
||||
calIcalComponent::Set##Attrname(PRInt32 val) \
|
||||
calIcalComponent::Set##Attrname(int32_t val) \
|
||||
{ \
|
||||
return SetIntProperty(ICAL_##ICALNAME##_PROPERTY, val); \
|
||||
}
|
||||
|
||||
#define COMP_ENUM_ATTRIBUTE(Attrname, ICALNAME, lcname) \
|
||||
NS_IMETHODIMP \
|
||||
calIcalComponent::Get##Attrname(PRInt32 *valp) \
|
||||
calIcalComponent::Get##Attrname(int32_t *valp) \
|
||||
{ \
|
||||
return GetIntProperty(ICAL_##ICALNAME##_PROPERTY, valp); \
|
||||
} \
|
||||
\
|
||||
NS_IMETHODIMP \
|
||||
calIcalComponent::Set##Attrname(PRInt32 val) \
|
||||
calIcalComponent::Set##Attrname(int32_t val) \
|
||||
{ \
|
||||
icalproperty *prop = \
|
||||
icalproperty_new_##lcname((icalproperty_##lcname)val); \
|
||||
|
@ -632,13 +632,13 @@ calIcalComponent::Set##Attrname(PRInt32 val) \
|
|||
|
||||
#define COMP_INT_ATTRIBUTE(Attrname, ICALNAME, lcname) \
|
||||
NS_IMETHODIMP \
|
||||
calIcalComponent::Get##Attrname(PRInt32 *valp) \
|
||||
calIcalComponent::Get##Attrname(int32_t *valp) \
|
||||
{ \
|
||||
return GetIntProperty(ICAL_##ICALNAME##_PROPERTY, valp); \
|
||||
} \
|
||||
\
|
||||
NS_IMETHODIMP \
|
||||
calIcalComponent::Set##Attrname(PRInt32 val) \
|
||||
calIcalComponent::Set##Attrname(int32_t val) \
|
||||
{ \
|
||||
icalproperty *prop = icalproperty_new_##lcname(val); \
|
||||
return SetProperty(ICAL_##ICALNAME##_PROPERTY, prop); \
|
||||
|
@ -668,17 +668,17 @@ nsresult calIcalComponent::SetStringProperty(icalproperty_kind kind,
|
|||
return SetPropertyValue(kind, val);
|
||||
}
|
||||
|
||||
nsresult calIcalComponent::GetIntProperty(icalproperty_kind kind, PRInt32 *valp)
|
||||
nsresult calIcalComponent::GetIntProperty(icalproperty_kind kind, int32_t *valp)
|
||||
{
|
||||
icalproperty *prop = icalcomponent_get_first_property(mComponent, kind);
|
||||
if (!prop)
|
||||
*valp = calIIcalComponent::INVALID_VALUE;
|
||||
else
|
||||
*valp = (PRInt32)icalvalue_get_integer(icalproperty_get_value(prop));
|
||||
*valp = (int32_t)icalvalue_get_integer(icalproperty_get_value(prop));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult calIcalComponent::SetIntProperty(icalproperty_kind kind, PRInt32 i)
|
||||
nsresult calIcalComponent::SetIntProperty(icalproperty_kind kind, int32_t i)
|
||||
{
|
||||
icalvalue *val = icalvalue_new_integer(i);
|
||||
if (!val)
|
||||
|
@ -1040,14 +1040,14 @@ calIcalComponent::AddSubcomponent(calIIcalComponent *comp)
|
|||
*/
|
||||
calIcalComponent * const ical = toIcalComponent(comp);
|
||||
|
||||
PRUint32 tzCount = 0;
|
||||
uint32_t tzCount = 0;
|
||||
calITimezone ** timezones = nullptr;
|
||||
nsresult rv = ical->GetReferencedTimezones(&tzCount, &timezones);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
calIcalComponent * const vcal = getParentVCalendarOrThis();
|
||||
bool failed = false;
|
||||
for (PRUint32 i = 0; i < tzCount; i++) {
|
||||
for (uint32_t i = 0; i < tzCount; i++) {
|
||||
if (!failed) {
|
||||
rv = vcal->AddTimezoneReference(timezones[i]);
|
||||
if (NS_FAILED(rv))
|
||||
|
|
|
@ -150,8 +150,8 @@ protected:
|
|||
nsresult GetStringProperty(icalproperty_kind kind, nsACString &str);
|
||||
nsresult SetStringProperty(icalproperty_kind kind, const nsACString &str);
|
||||
|
||||
nsresult GetIntProperty(icalproperty_kind kind, PRInt32 *valp);
|
||||
nsresult SetIntProperty(icalproperty_kind kind, PRInt32 i);
|
||||
nsresult GetIntProperty(icalproperty_kind kind, int32_t *valp);
|
||||
nsresult SetIntProperty(icalproperty_kind kind, int32_t i);
|
||||
|
||||
void ClearAllProperties(icalproperty_kind kind);
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ calRecurrenceDate::GetNextOccurrence(calIDateTime *aStartTime,
|
|||
NS_ENSURE_ARG_POINTER(_retval);
|
||||
|
||||
if (mDate) {
|
||||
PRInt32 result;
|
||||
int32_t result;
|
||||
if (NS_SUCCEEDED(mDate->Compare(aStartTime, &result)) && result > 0) {
|
||||
NS_ADDREF (*_retval = mDate);
|
||||
return NS_OK;
|
||||
|
@ -138,13 +138,13 @@ NS_IMETHODIMP
|
|||
calRecurrenceDate::GetOccurrences(calIDateTime *aStartTime,
|
||||
calIDateTime *aRangeStart,
|
||||
calIDateTime *aRangeEnd,
|
||||
PRUint32 aMaxCount,
|
||||
PRUint32 *aCount, calIDateTime ***aDates)
|
||||
uint32_t aMaxCount,
|
||||
uint32_t *aCount, calIDateTime ***aDates)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aStartTime);
|
||||
NS_ENSURE_ARG_POINTER(aRangeStart);
|
||||
|
||||
PRInt32 r1, r2;
|
||||
int32_t r1, r2;
|
||||
|
||||
if (mDate) {
|
||||
if (NS_SUCCEEDED(mDate->Compare(aRangeStart, &r1)) && r1 >= 0 &&
|
||||
|
|
|
@ -101,7 +101,7 @@ calRecurrenceDateSet::GetIsFinite(bool *_retval)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
calRecurrenceDateSet::GetDates(PRUint32 *aCount, calIDateTime ***aDates)
|
||||
calRecurrenceDateSet::GetDates(uint32_t *aCount, calIDateTime ***aDates)
|
||||
{
|
||||
if (mDates.Count() == 0) {
|
||||
*aDates = nullptr;
|
||||
|
@ -126,12 +126,12 @@ calRecurrenceDateSet::GetDates(PRUint32 *aCount, calIDateTime ***aDates)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
calRecurrenceDateSet::SetDates(PRUint32 aCount, calIDateTime **aDates)
|
||||
calRecurrenceDateSet::SetDates(uint32_t aCount, calIDateTime **aDates)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aDates);
|
||||
|
||||
mDates.Clear();
|
||||
for (PRUint32 i = 0; i < aCount; i++) {
|
||||
for (uint32_t i = 0; i < aCount; i++) {
|
||||
mDates.AppendObject(aDates[i]);
|
||||
}
|
||||
|
||||
|
@ -157,7 +157,7 @@ calDateTimeComparator (calIDateTime *aElement1,
|
|||
calIDateTime *aElement2,
|
||||
void *aData)
|
||||
{
|
||||
PRInt32 result;
|
||||
int32_t result;
|
||||
aElement1->Compare(aElement2, &result);
|
||||
return result;
|
||||
}
|
||||
|
@ -182,8 +182,8 @@ calRecurrenceDateSet::GetNextOccurrence(calIDateTime *aStartTime,
|
|||
|
||||
EnsureSorted();
|
||||
|
||||
PRInt32 i;
|
||||
PRInt32 result;
|
||||
int32_t i;
|
||||
int32_t result;
|
||||
|
||||
// we ignore aStartTime
|
||||
for (i = 0; i < mDates.Count(); i++) {
|
||||
|
@ -201,16 +201,16 @@ NS_IMETHODIMP
|
|||
calRecurrenceDateSet::GetOccurrences(calIDateTime *aStartTime,
|
||||
calIDateTime *aRangeStart,
|
||||
calIDateTime *aRangeEnd,
|
||||
PRUint32 aMaxCount,
|
||||
PRUint32 *aCount, calIDateTime ***aDates)
|
||||
uint32_t aMaxCount,
|
||||
uint32_t *aCount, calIDateTime ***aDates)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aStartTime);
|
||||
NS_ENSURE_ARG_POINTER(aRangeStart);
|
||||
|
||||
nsCOMArray<calIDateTime> dates;
|
||||
|
||||
PRInt32 i;
|
||||
PRInt32 result;
|
||||
int32_t i;
|
||||
int32_t result;
|
||||
nsresult rv;
|
||||
|
||||
for (i = 0; i < mDates.Count(); i++) {
|
||||
|
@ -237,7 +237,7 @@ calRecurrenceDateSet::GetOccurrences(calIDateTime *aStartTime,
|
|||
break;
|
||||
}
|
||||
|
||||
PRInt32 count = dates.Count();
|
||||
int32_t count = dates.Count();
|
||||
if (count) {
|
||||
calIDateTime **dateArray = (calIDateTime **) nsMemory::Alloc(sizeof(calIDateTime*) * count);
|
||||
for (int i = 0; i < count; i++) {
|
||||
|
|
|
@ -135,7 +135,7 @@ calRecurrenceRule::SetType(const nsACString &aType)
|
|||
|
||||
/* attribute long count; */
|
||||
NS_IMETHODIMP
|
||||
calRecurrenceRule::GetCount(PRInt32 *aRecurCount)
|
||||
calRecurrenceRule::GetCount(int32_t *aRecurCount)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aRecurCount);
|
||||
|
||||
|
@ -155,7 +155,7 @@ calRecurrenceRule::GetCount(PRInt32 *aRecurCount)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
calRecurrenceRule::SetCount(PRInt32 aRecurCount)
|
||||
calRecurrenceRule::SetCount(int32_t aRecurCount)
|
||||
{
|
||||
if (aRecurCount != -1) {
|
||||
if (aRecurCount < 0 || aRecurCount > INT_MAX)
|
||||
|
@ -230,7 +230,7 @@ calRecurrenceRule::GetIsByCount (bool *aIsByCount)
|
|||
|
||||
/* attribute long interval; */
|
||||
NS_IMETHODIMP
|
||||
calRecurrenceRule::GetInterval(PRInt32 *aInterval)
|
||||
calRecurrenceRule::GetInterval(int32_t *aInterval)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aInterval);
|
||||
*aInterval = mIcalRecur.interval;
|
||||
|
@ -238,7 +238,7 @@ calRecurrenceRule::GetInterval(PRInt32 *aInterval)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
calRecurrenceRule::SetInterval(PRInt32 aInterval)
|
||||
calRecurrenceRule::SetInterval(int32_t aInterval)
|
||||
{
|
||||
if (aInterval < 0 || aInterval > SHRT_MAX)
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
|
@ -248,7 +248,7 @@ calRecurrenceRule::SetInterval(PRInt32 aInterval)
|
|||
|
||||
/* void getComponent (in AUTF8String aComponentType, out unsigned long aCount, [array, size_is (aCount), retval] out long aValues); */
|
||||
NS_IMETHODIMP
|
||||
calRecurrenceRule::GetComponent(const nsACString &aComponentType, PRUint32 *aCount, PRInt16 **aValues)
|
||||
calRecurrenceRule::GetComponent(const nsACString &aComponentType, uint32_t *aCount, int16_t **aValues)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aCount);
|
||||
NS_ENSURE_ARG_POINTER(aValues);
|
||||
|
@ -263,8 +263,8 @@ calRecurrenceRule::GetComponent(const nsACString &aComponentType, PRUint32 *aCou
|
|||
break; \
|
||||
} \
|
||||
if (count) { \
|
||||
*aValues = (PRInt16*) nsMemory::Clone(mIcalRecur._icalvar, \
|
||||
count * sizeof(PRInt16)); \
|
||||
*aValues = (int16_t*) nsMemory::Clone(mIcalRecur._icalvar, \
|
||||
count * sizeof(int16_t)); \
|
||||
if (!*aValues) return NS_ERROR_OUT_OF_MEMORY; \
|
||||
} else { \
|
||||
*aValues = nullptr; \
|
||||
|
@ -292,7 +292,7 @@ calRecurrenceRule::GetComponent(const nsACString &aComponentType, PRUint32 *aCou
|
|||
|
||||
/* void setComponent (in AUTF8String aComponentType, in unsigned long aCount, [array, size_is (aCount)] in long aValues); */
|
||||
NS_IMETHODIMP
|
||||
calRecurrenceRule::SetComponent(const nsACString& aComponentType, PRUint32 aCount, PRInt16 *aValues)
|
||||
calRecurrenceRule::SetComponent(const nsACString& aComponentType, uint32_t aCount, int16_t *aValues)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aValues);
|
||||
|
||||
|
@ -301,7 +301,7 @@ calRecurrenceRule::SetComponent(const nsACString& aComponentType, PRUint32 aCoun
|
|||
if (aComponentType.EqualsLiteral( #_comptype )) { \
|
||||
if (aCount > _icalmax) \
|
||||
return NS_ERROR_FAILURE; \
|
||||
memcpy(mIcalRecur._icalvar, aValues, aCount * sizeof(PRInt16)); \
|
||||
memcpy(mIcalRecur._icalvar, aValues, aCount * sizeof(int16_t)); \
|
||||
if (aCount < _icalmax) \
|
||||
mIcalRecur._icalvar[aCount] = ICAL_RECURRENCE_ARRAY_MAX; \
|
||||
}
|
||||
|
@ -385,8 +385,8 @@ NS_IMETHODIMP
|
|||
calRecurrenceRule::GetOccurrences(calIDateTime *aStartTime,
|
||||
calIDateTime *aRangeStart,
|
||||
calIDateTime *aRangeEnd,
|
||||
PRUint32 aMaxCount,
|
||||
PRUint32 *aCount, calIDateTime ***aDates)
|
||||
uint32_t aMaxCount,
|
||||
uint32_t *aCount, calIDateTime ***aDates)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aStartTime);
|
||||
NS_ENSURE_ARG_POINTER(aRangeStart);
|
||||
|
@ -435,7 +435,7 @@ calRecurrenceRule::GetOccurrences(calIDateTime *aStartTime,
|
|||
if (!recur_iter)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
PRUint32 count = 0;
|
||||
uint32_t count = 0;
|
||||
|
||||
for (icaltimetype next = icalrecur_iterator_next(recur_iter);
|
||||
!icaltime_is_null_time(next);
|
||||
|
@ -476,7 +476,7 @@ calRecurrenceRule::GetOccurrences(calIDateTime *aStartTime,
|
|||
calIDateTime ** const dateArray =
|
||||
static_cast<calIDateTime **>(nsMemory::Alloc(sizeof(calIDateTime*) * count));
|
||||
CAL_ENSURE_MEMORY(dateArray);
|
||||
for (PRUint32 i = 0; i < count; ++i) {
|
||||
for (uint32_t i = 0; i < count; ++i) {
|
||||
NS_ADDREF(dateArray[i] = dates[i]);
|
||||
}
|
||||
*aDates = dateArray;
|
||||
|
|
|
@ -26,7 +26,7 @@ interface calIGoogleRequest : calIOperation {
|
|||
/**
|
||||
* The type of request. Must be one of the above constants.
|
||||
*/
|
||||
attribute PRUint32 type;
|
||||
attribute uint32_t type;
|
||||
|
||||
/**
|
||||
* The request uri string
|
||||
|
@ -112,7 +112,7 @@ interface calIGoogleRequest : calIOperation {
|
|||
* @param aCode The error code to use.
|
||||
* @param aMessage The error message to use.
|
||||
*/
|
||||
void fail(in PRUint32 aCode, in AUTF8String aMessage);
|
||||
void fail(in uint32_t aCode, in AUTF8String aMessage);
|
||||
|
||||
/**
|
||||
* Tell listeners that the operation succeeded.
|
||||
|
|
|
@ -47,8 +47,8 @@
|
|||
typedef unsigned char mdb_u1; // make sure this is one byte
|
||||
typedef unsigned short mdb_u2; // make sure this is two bytes
|
||||
typedef short mdb_i2; // make sure this is two bytes
|
||||
typedef PRUint32 mdb_u4; // make sure this is four bytes
|
||||
typedef PRInt32 mdb_i4; // make sure this is four bytes
|
||||
typedef uint32_t mdb_u4; // make sure this is four bytes
|
||||
typedef int32_t mdb_i4; // make sure this is four bytes
|
||||
typedef PRWord mdb_ip; // make sure sizeof(mdb_ip) == sizeof(void*)
|
||||
|
||||
typedef mdb_u1 mdb_bool; // unsigned byte with zero=false, nonzero=true
|
||||
|
|
|
@ -81,8 +81,8 @@
|
|||
typedef unsigned char mork_u1; // make sure this is one byte
|
||||
typedef unsigned short mork_u2; // make sure this is two bytes
|
||||
typedef short mork_i2; // make sure this is two bytes
|
||||
typedef PRUint32 mork_u4; // make sure this is four bytes
|
||||
typedef PRInt32 mork_i4; // make sure this is four bytes
|
||||
typedef uint32_t mork_u4; // make sure this is four bytes
|
||||
typedef int32_t mork_i4; // make sure this is four bytes
|
||||
typedef PRWord mork_ip; // make sure sizeof(mork_ip) == sizeof(void*)
|
||||
|
||||
typedef mork_u1 mork_ch; // small byte-sized character (never wide)
|
||||
|
|
|
@ -20,7 +20,7 @@ interface nsIArray;
|
|||
|
||||
// XXXdmose check to make sure ctl-related err codes documented
|
||||
|
||||
typedef PRUint32 PRIntervalTime;
|
||||
typedef uint32_t PRIntervalTime;
|
||||
|
||||
[scriptable, uuid(4dfb1b19-fc8f-4525-92e7-f97b78a9747a)]
|
||||
interface nsILDAPOperation : nsISupports
|
||||
|
@ -251,9 +251,9 @@ interface nsILDAPOperation : nsISupports
|
|||
* @exception NS_ERROR_LDAP_FILTER_ERROR
|
||||
* @exception NS_ERROR_UNEXPECTED
|
||||
*/
|
||||
void searchExt(in AUTF8String aBaseDn, in PRInt32 aScope,
|
||||
void searchExt(in AUTF8String aBaseDn, in int32_t aScope,
|
||||
in AUTF8String aFilter, in ACString aAttributes,
|
||||
in PRIntervalTime aTimeOut, in PRInt32 aSizeLimit);
|
||||
in PRIntervalTime aTimeOut, in int32_t aSizeLimit);
|
||||
|
||||
/**
|
||||
* Cancels an async operation that is in progress.
|
||||
|
|
|
@ -40,8 +40,8 @@ nsLDAPBERElement::Init(nsILDAPBERValue *aValue)
|
|||
|
||||
/* void putString (in AUTF8String aString, in unsigned long aTag); */
|
||||
NS_IMETHODIMP
|
||||
nsLDAPBERElement::PutString(const nsACString & aString, PRUint32 aTag,
|
||||
PRUint32 *aBytesWritten)
|
||||
nsLDAPBERElement::PutString(const nsACString & aString, uint32_t aTag,
|
||||
uint32_t *aBytesWritten)
|
||||
{
|
||||
// XXX if the string translation feature of the C SDK is ever used,
|
||||
// this const_cast will break
|
||||
|
@ -58,7 +58,7 @@ nsLDAPBERElement::PutString(const nsACString & aString, PRUint32 aTag,
|
|||
}
|
||||
|
||||
/* void startSet (); */
|
||||
NS_IMETHODIMP nsLDAPBERElement::StartSet(PRUint32 aTag)
|
||||
NS_IMETHODIMP nsLDAPBERElement::StartSet(uint32_t aTag)
|
||||
{
|
||||
int i = ber_start_set(mElement, aTag);
|
||||
|
||||
|
@ -70,7 +70,7 @@ NS_IMETHODIMP nsLDAPBERElement::StartSet(PRUint32 aTag)
|
|||
}
|
||||
|
||||
/* void putSet (); */
|
||||
NS_IMETHODIMP nsLDAPBERElement::PutSet(PRUint32 *aBytesWritten)
|
||||
NS_IMETHODIMP nsLDAPBERElement::PutSet(uint32_t *aBytesWritten)
|
||||
{
|
||||
int i = ber_put_set(mElement);
|
||||
|
||||
|
@ -100,7 +100,7 @@ NS_IMETHODIMP nsLDAPBERElement::GetAsValue(nsILDAPBERValue **_retval)
|
|||
}
|
||||
|
||||
nsresult rv = berValue->Set(bv->bv_len,
|
||||
reinterpret_cast<PRUint8 *>(bv->bv_val));
|
||||
reinterpret_cast<uint8_t *>(bv->bv_val));
|
||||
|
||||
// whether or not we've succeeded, we're done with the ldap c sdk struct
|
||||
ber_bvfree(bv);
|
||||
|
|
|
@ -24,14 +24,14 @@ nsLDAPBERValue::~nsLDAPBERValue()
|
|||
// void get (out unsigned long aCount,
|
||||
// [array, size_is (aCount), retval] out octet aRetVal); */
|
||||
NS_IMETHODIMP
|
||||
nsLDAPBERValue::Get(PRUint32 *aCount, PRUint8 **aRetVal)
|
||||
nsLDAPBERValue::Get(uint32_t *aCount, uint8_t **aRetVal)
|
||||
{
|
||||
// if mSize = 0, return a count of a 0 and a null pointer
|
||||
|
||||
if (mSize) {
|
||||
// get a buffer to hold a copy of the data
|
||||
//
|
||||
PRUint8 *array = static_cast<PRUint8 *>(nsMemory::Alloc(mSize));
|
||||
uint8_t *array = static_cast<uint8_t *>(nsMemory::Alloc(mSize));
|
||||
|
||||
if (!array) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
@ -52,7 +52,7 @@ nsLDAPBERValue::Get(PRUint32 *aCount, PRUint8 **aRetVal)
|
|||
// void set(in unsigned long aCount,
|
||||
// [array, size_is(aCount)] in octet aValue);
|
||||
NS_IMETHODIMP
|
||||
nsLDAPBERValue::Set(PRUint32 aCount, PRUint8 *aValue)
|
||||
nsLDAPBERValue::Set(uint32_t aCount, uint8_t *aValue)
|
||||
{
|
||||
// get rid of any old value being held here
|
||||
//
|
||||
|
@ -65,7 +65,7 @@ nsLDAPBERValue::Set(PRUint32 aCount, PRUint8 *aValue)
|
|||
if (aCount) {
|
||||
// get a buffer to hold a copy of this data
|
||||
//
|
||||
mValue = static_cast<PRUint8 *>(nsMemory::Alloc(aCount));
|
||||
mValue = static_cast<uint8_t *>(nsMemory::Alloc(aCount));
|
||||
if (!mValue) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ nsLDAPBERValue::SetFromUTF8(const nsACString & aValue)
|
|||
//
|
||||
mSize = aValue.Length();
|
||||
if (mSize) {
|
||||
mValue = reinterpret_cast<PRUint8 *>(ToNewCString(aValue));
|
||||
mValue = reinterpret_cast<uint8_t *>(ToNewCString(aValue));
|
||||
} else {
|
||||
mValue = 0;
|
||||
}
|
||||
|
|
|
@ -33,8 +33,8 @@ protected:
|
|||
*/
|
||||
friend class nsLDAPControl;
|
||||
|
||||
PRUint8 *mValue; // pointer to an array
|
||||
PRUint32 mSize; // size of the value, in bytes
|
||||
uint8_t *mValue; // pointer to an array
|
||||
uint32_t mSize; // size of the value, in bytes
|
||||
};
|
||||
|
||||
#endif // _nsLDAPBERValue_h_
|
||||
|
|
|
@ -69,7 +69,7 @@ NS_IMPL_CI_INTERFACE_GETTER4(nsLDAPConnection, nsILDAPConnection,
|
|||
NS_IMETHODIMP
|
||||
nsLDAPConnection::Init(nsILDAPURL *aUrl, const nsACString &aBindName,
|
||||
nsILDAPMessageListener *aMessageListener,
|
||||
nsISupports *aClosure, PRUint32 aVersion)
|
||||
nsISupports *aClosure, uint32_t aVersion)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aUrl);
|
||||
NS_ENSURE_ARG_POINTER(aMessageListener);
|
||||
|
@ -104,7 +104,7 @@ nsLDAPConnection::Init(nsILDAPURL *aUrl, const nsACString &aBindName,
|
|||
rv = aUrl->GetPort(&mPort);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRUint32 options;
|
||||
uint32_t options;
|
||||
rv = aUrl->GetOptions(&options);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -144,7 +144,7 @@ nsLDAPConnection::Init(nsILDAPURL *aUrl, const nsACString &aBindName,
|
|||
// at least the first one work.
|
||||
LdapCompressWhitespace(mDNSHost);
|
||||
|
||||
PRInt32 spacePos = mDNSHost.FindChar(' ');
|
||||
int32_t spacePos = mDNSHost.FindChar(' ');
|
||||
// trim off trailing host(s)
|
||||
if (spacePos != kNotFound)
|
||||
mDNSHost.SetLength(spacePos);
|
||||
|
@ -211,7 +211,7 @@ nsLDAPConnection::Close()
|
|||
* \param userArg pointer to nsTArray<nsILDAPOperation*>
|
||||
*/
|
||||
PLDHashOperator
|
||||
GetListOfPendingOperations(const PRUint32 &key, nsILDAPOperation *op, void *userArg)
|
||||
GetListOfPendingOperations(const uint32_t &key, nsILDAPOperation *op, void *userArg)
|
||||
{
|
||||
nsTArray<nsILDAPOperation*>* pending_operations = static_cast<nsTArray<nsILDAPOperation*>* >(userArg);
|
||||
pending_operations->AppendElement(op);
|
||||
|
@ -232,7 +232,7 @@ nsLDAPConnection::Observe(nsISupports *aSubject, const char *aTopic,
|
|||
*/
|
||||
nsTArray<nsILDAPOperation*> pending_operations;
|
||||
mPendingOperations.EnumerateRead(GetListOfPendingOperations, (void *) (&pending_operations));
|
||||
for (PRUint32 i = 0; i < pending_operations.Length(); i++) {
|
||||
for (uint32_t i = 0; i < pending_operations.Length(); i++) {
|
||||
pending_operations[i]->AbandonExt();
|
||||
}
|
||||
}
|
||||
|
@ -277,7 +277,7 @@ nsLDAPConnection::GetBindName(nsACString& _retval)
|
|||
//
|
||||
NS_IMETHODIMP
|
||||
nsLDAPConnection::GetLdErrno(nsACString& matched, nsACString& errString,
|
||||
PRInt32 *_retval)
|
||||
int32_t *_retval)
|
||||
{
|
||||
char *match, *err;
|
||||
|
||||
|
@ -321,13 +321,13 @@ nsLDAPConnection::GetErrorString(PRUnichar **_retval)
|
|||
* nsLDAPOperation code.
|
||||
*/
|
||||
nsresult
|
||||
nsLDAPConnection::AddPendingOperation(PRUint32 aOperationID, nsILDAPOperation *aOperation)
|
||||
nsLDAPConnection::AddPendingOperation(uint32_t aOperationID, nsILDAPOperation *aOperation)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aOperation);
|
||||
|
||||
nsIRunnable* runnable = new nsLDAPConnectionRunnable(aOperationID, aOperation,
|
||||
this);
|
||||
mPendingOperations.Put((PRUint32)aOperationID, aOperation);
|
||||
mPendingOperations.Put((uint32_t)aOperationID, aOperation);
|
||||
|
||||
nsresult rv;
|
||||
if (!mThread)
|
||||
|
@ -360,7 +360,7 @@ nsLDAPConnection::AddPendingOperation(PRUint32 aOperationID, nsILDAPOperation *a
|
|||
* void removePendingOperation(in nsILDAPOperation aOperation);
|
||||
*/
|
||||
nsresult
|
||||
nsLDAPConnection::RemovePendingOperation(PRUint32 aOperationID)
|
||||
nsLDAPConnection::RemovePendingOperation(uint32_t aOperationID)
|
||||
{
|
||||
NS_ENSURE_TRUE(aOperationID > 0, NS_ERROR_UNEXPECTED);
|
||||
|
||||
|
@ -426,7 +426,7 @@ NS_IMETHODIMP nsOnLDAPInitMessageRunnable::Run()
|
|||
nsresult
|
||||
nsLDAPConnection::InvokeMessageCallback(LDAPMessage *aMsgHandle,
|
||||
nsILDAPMessage *aMsg,
|
||||
PRInt32 aOperation,
|
||||
int32_t aOperation,
|
||||
bool aRemoveOpFromConnQ)
|
||||
{
|
||||
#if defined(DEBUG)
|
||||
|
@ -437,7 +437,7 @@ nsLDAPConnection::InvokeMessageCallback(LDAPMessage *aMsgHandle,
|
|||
nsresult rv;
|
||||
// Get the operation.
|
||||
nsCOMPtr<nsILDAPOperation> operation;
|
||||
mPendingOperations.Get((PRUint32)aOperation, getter_AddRefs(operation));
|
||||
mPendingOperations.Get((uint32_t)aOperation, getter_AddRefs(operation));
|
||||
|
||||
NS_ENSURE_TRUE(operation, NS_ERROR_NULL_POINTER);
|
||||
|
||||
|
@ -491,7 +491,7 @@ nsLDAPConnection::OnLookupComplete(nsICancelable *aRequest,
|
|||
//
|
||||
mResolvedIP.Truncate();
|
||||
|
||||
PRInt32 index = 0;
|
||||
int32_t index = 0;
|
||||
char addrbuf[64];
|
||||
PRNetAddr addr;
|
||||
|
||||
|
@ -623,7 +623,7 @@ nsLDAPConnection::OnLookupComplete(nsICancelable *aRequest,
|
|||
return rv;
|
||||
}
|
||||
|
||||
nsLDAPConnectionRunnable::nsLDAPConnectionRunnable(PRInt32 aOperationID,
|
||||
nsLDAPConnectionRunnable::nsLDAPConnectionRunnable(int32_t aOperationID,
|
||||
nsILDAPOperation *aOperation,
|
||||
nsLDAPConnection *aConnection)
|
||||
: mOperationID(aOperationID), mConnection(aConnection)
|
||||
|
@ -650,7 +650,7 @@ NS_IMETHODIMP nsLDAPConnectionRunnable::Run()
|
|||
struct timeval timeout = { 0, 0 };
|
||||
|
||||
nsCOMPtr<nsIThread> thread = do_GetCurrentThread();
|
||||
PRInt32 returnCode = ldap_result(mConnection->mConnectionHandle, mOperationID, LDAP_MSG_ONE, &timeout, &msgHandle);
|
||||
int32_t returnCode = ldap_result(mConnection->mConnectionHandle, mOperationID, LDAP_MSG_ONE, &timeout, &msgHandle);
|
||||
switch (returnCode)
|
||||
{
|
||||
// timeout
|
||||
|
@ -679,7 +679,7 @@ NS_IMETHODIMP nsLDAPConnectionRunnable::Run()
|
|||
{
|
||||
case NS_OK:
|
||||
{
|
||||
PRInt32 errorCode;
|
||||
int32_t errorCode;
|
||||
msg->GetErrorCode(&errorCode);
|
||||
|
||||
// maybe a version error, e.g., using v3 on a v2 server.
|
||||
|
@ -712,7 +712,7 @@ NS_IMETHODIMP nsLDAPConnectionRunnable::Run()
|
|||
&creds, 0);
|
||||
|
||||
nsCOMPtr<nsILDAPOperation> operation;
|
||||
mConnection->mPendingOperations.Get((PRUint32)mOperationID, getter_AddRefs(operation));
|
||||
mConnection->mPendingOperations.Get((uint32_t)mOperationID, getter_AddRefs(operation));
|
||||
|
||||
NS_ENSURE_TRUE(operation, NS_ERROR_NULL_POINTER);
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ class nsLDAPConnection : public nsILDAPConnection,
|
|||
//
|
||||
nsresult InvokeMessageCallback(LDAPMessage *aMsgHandle,
|
||||
nsILDAPMessage *aMsg,
|
||||
PRInt32 aOperation,
|
||||
int32_t aOperation,
|
||||
bool aRemoveOpFromConnQ);
|
||||
/**
|
||||
* Add an nsILDAPOperation to the list of operations pending on
|
||||
|
@ -72,7 +72,7 @@ class nsLDAPConnection : public nsILDAPConnection,
|
|||
* unique to this connection
|
||||
* @exception NS_ERROR_OUT_OF_MEMORY out of memory
|
||||
*/
|
||||
nsresult AddPendingOperation(PRUint32 aOperationID, nsILDAPOperation *aOperation);
|
||||
nsresult AddPendingOperation(uint32_t aOperationID, nsILDAPOperation *aOperation);
|
||||
|
||||
/**
|
||||
* Remove an nsILDAPOperation from the list of operations pending on this
|
||||
|
@ -83,7 +83,7 @@ class nsLDAPConnection : public nsILDAPConnection,
|
|||
* @exception NS_ERROR_OUT_OF_MEMORY out of memory
|
||||
* @exception NS_ERROR_FAILURE could not delete the operation
|
||||
*/
|
||||
nsresult RemovePendingOperation(PRUint32 aOperationID);
|
||||
nsresult RemovePendingOperation(uint32_t aOperationID);
|
||||
|
||||
void Close(); // close the connection
|
||||
LDAP *mConnectionHandle; // the LDAP C SDK's connection object
|
||||
|
@ -92,9 +92,9 @@ class nsLDAPConnection : public nsILDAPConnection,
|
|||
|
||||
nsInterfaceHashtableMT<nsUint32HashKey, nsILDAPOperation> mPendingOperations;
|
||||
|
||||
PRInt32 mPort; // The LDAP port we're binding to
|
||||
int32_t mPort; // The LDAP port we're binding to
|
||||
bool mSSL; // the options
|
||||
PRUint32 mVersion; // LDAP protocol version
|
||||
uint32_t mVersion; // LDAP protocol version
|
||||
|
||||
nsCString mResolvedIP; // Preresolved list of host IPs
|
||||
nsCOMPtr<nsILDAPMessageListener> mInitListener; // Init callback
|
||||
|
@ -109,7 +109,7 @@ class nsLDAPConnectionRunnable : public nsIRunnable
|
|||
friend class nsLDAPMessage;
|
||||
|
||||
public:
|
||||
nsLDAPConnectionRunnable(PRInt32 aOperationID,
|
||||
nsLDAPConnectionRunnable(int32_t aOperationID,
|
||||
nsILDAPOperation *aOperation,
|
||||
nsLDAPConnection *aConnection);
|
||||
virtual ~nsLDAPConnectionRunnable();
|
||||
|
@ -117,7 +117,7 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIRUNNABLE
|
||||
|
||||
PRInt32 mOperationID;
|
||||
int32_t mOperationID;
|
||||
nsRefPtr<nsLDAPConnection> mConnection;
|
||||
};
|
||||
|
||||
|
|
|
@ -209,7 +209,7 @@ nsLDAPMessage::Init(nsILDAPConnection *aConnection, LDAPMessage *aMsgHandle)
|
|||
* readonly attribute long errorCode;
|
||||
*/
|
||||
NS_IMETHODIMP
|
||||
nsLDAPMessage::GetErrorCode(PRInt32 *aErrorCode)
|
||||
nsLDAPMessage::GetErrorCode(int32_t *aErrorCode)
|
||||
{
|
||||
if (!aErrorCode) {
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
|
@ -220,7 +220,7 @@ nsLDAPMessage::GetErrorCode(PRInt32 *aErrorCode)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsLDAPMessage::GetType(PRInt32 *aType)
|
||||
nsLDAPMessage::GetType(int32_t *aType)
|
||||
{
|
||||
if (!aType) {
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
|
@ -238,7 +238,7 @@ nsLDAPMessage::GetType(PRInt32 *aType)
|
|||
// handler for IterateAttributes().
|
||||
//
|
||||
nsresult
|
||||
nsLDAPMessage::IterateAttrErrHandler(PRInt32 aLderrno, PRUint32 *aAttrCount,
|
||||
nsLDAPMessage::IterateAttrErrHandler(int32_t aLderrno, uint32_t *aAttrCount,
|
||||
char** *aAttributes, BerElement *position)
|
||||
{
|
||||
|
||||
|
@ -287,7 +287,7 @@ nsLDAPMessage::IterateAttrErrHandler(PRInt32 aLderrno, PRUint32 *aAttrCount,
|
|||
// wrapper for ldap_first_attribute
|
||||
//
|
||||
NS_IMETHODIMP
|
||||
nsLDAPMessage::GetAttributes(PRUint32 *aAttrCount, char** *aAttributes)
|
||||
nsLDAPMessage::GetAttributes(uint32_t *aAttrCount, char** *aAttributes)
|
||||
{
|
||||
return IterateAttributes(aAttrCount, aAttributes, true);
|
||||
}
|
||||
|
@ -299,7 +299,7 @@ nsLDAPMessage::GetAttributes(PRUint32 *aAttrCount, char** *aAttributes)
|
|||
// if getP is false, just fill in *attrCount and return
|
||||
//
|
||||
nsresult
|
||||
nsLDAPMessage::IterateAttributes(PRUint32 *aAttrCount, char** *aAttributes,
|
||||
nsLDAPMessage::IterateAttributes(uint32_t *aAttrCount, char** *aAttributes,
|
||||
bool getP)
|
||||
{
|
||||
BerElement *position;
|
||||
|
@ -374,7 +374,7 @@ nsLDAPMessage::IterateAttributes(PRUint32 *aAttrCount, char** *aAttributes,
|
|||
|
||||
// bail out if there's an error
|
||||
//
|
||||
PRInt32 lderrno = ldap_get_lderrno(mConnectionHandle, 0, 0);
|
||||
int32_t lderrno = ldap_get_lderrno(mConnectionHandle, 0, 0);
|
||||
if (lderrno != LDAP_SUCCESS) {
|
||||
return IterateAttrErrHandler(lderrno, aAttrCount, aAttributes,
|
||||
position);
|
||||
|
@ -421,7 +421,7 @@ NS_IMETHODIMP nsLDAPMessage::GetDn(nsACString& aDn)
|
|||
char *rawDn = ldap_get_dn(mConnectionHandle, mMsgHandle);
|
||||
|
||||
if (!rawDn) {
|
||||
PRInt32 lderrno = ldap_get_lderrno(mConnectionHandle, 0, 0);
|
||||
int32_t lderrno = ldap_get_lderrno(mConnectionHandle, 0, 0);
|
||||
|
||||
switch (lderrno) {
|
||||
|
||||
|
@ -448,7 +448,7 @@ NS_IMETHODIMP nsLDAPMessage::GetDn(nsACString& aDn)
|
|||
// wrapper for ldap_get_values()
|
||||
//
|
||||
NS_IMETHODIMP
|
||||
nsLDAPMessage::GetValues(const char *aAttr, PRUint32 *aCount,
|
||||
nsLDAPMessage::GetValues(const char *aAttr, uint32_t *aCount,
|
||||
PRUnichar ***aValues)
|
||||
{
|
||||
char **values;
|
||||
|
@ -464,7 +464,7 @@ nsLDAPMessage::GetValues(const char *aAttr, PRUint32 *aCount,
|
|||
// bail out if there was a problem
|
||||
//
|
||||
if (!values) {
|
||||
PRInt32 lderrno = ldap_get_lderrno(mConnectionHandle, 0, 0);
|
||||
int32_t lderrno = ldap_get_lderrno(mConnectionHandle, 0, 0);
|
||||
|
||||
if ( lderrno == LDAP_DECODING_ERROR ) {
|
||||
// this may not be an error; it could just be that the
|
||||
|
@ -487,7 +487,7 @@ nsLDAPMessage::GetValues(const char *aAttr, PRUint32 *aCount,
|
|||
|
||||
// count the values
|
||||
//
|
||||
PRUint32 numVals = ldap_count_values(values);
|
||||
uint32_t numVals = ldap_count_values(values);
|
||||
|
||||
// create an array of the appropriate size
|
||||
//
|
||||
|
@ -500,7 +500,7 @@ nsLDAPMessage::GetValues(const char *aAttr, PRUint32 *aCount,
|
|||
// clone the array (except for the trailing NULL entry) using the
|
||||
// shared allocator for XPCOM correctness
|
||||
//
|
||||
PRUint32 i;
|
||||
uint32_t i;
|
||||
for ( i = 0 ; i < numVals ; i++ ) {
|
||||
nsDependentCString sValue(values[i]);
|
||||
if (IsUTF8(sValue))
|
||||
|
@ -525,7 +525,7 @@ nsLDAPMessage::GetValues(const char *aAttr, PRUint32 *aCount,
|
|||
// wrapper for get_values_len
|
||||
//
|
||||
NS_IMETHODIMP
|
||||
nsLDAPMessage::GetBinaryValues(const char *aAttr, PRUint32 *aCount,
|
||||
nsLDAPMessage::GetBinaryValues(const char *aAttr, uint32_t *aCount,
|
||||
nsILDAPBERValue ***aValues)
|
||||
{
|
||||
struct berval **values;
|
||||
|
@ -542,7 +542,7 @@ nsLDAPMessage::GetBinaryValues(const char *aAttr, PRUint32 *aCount,
|
|||
// bail out if there was a problem
|
||||
//
|
||||
if (!values) {
|
||||
PRInt32 lderrno = ldap_get_lderrno(mConnectionHandle, 0, 0);
|
||||
int32_t lderrno = ldap_get_lderrno(mConnectionHandle, 0, 0);
|
||||
|
||||
if ( lderrno == LDAP_DECODING_ERROR ) {
|
||||
// this may not be an error; it could just be that the
|
||||
|
@ -565,7 +565,7 @@ nsLDAPMessage::GetBinaryValues(const char *aAttr, PRUint32 *aCount,
|
|||
|
||||
// count the values
|
||||
//
|
||||
PRUint32 numVals = ldap_count_values_len(values);
|
||||
uint32_t numVals = ldap_count_values_len(values);
|
||||
|
||||
// create the out array
|
||||
//
|
||||
|
@ -579,7 +579,7 @@ nsLDAPMessage::GetBinaryValues(const char *aAttr, PRUint32 *aCount,
|
|||
// clone the array (except for the trailing NULL entry) using the
|
||||
// shared allocator for XPCOM correctness
|
||||
//
|
||||
PRUint32 i;
|
||||
uint32_t i;
|
||||
nsresult rv;
|
||||
for ( i = 0 ; i < numVals ; i++ ) {
|
||||
|
||||
|
@ -597,7 +597,7 @@ nsLDAPMessage::GetBinaryValues(const char *aAttr, PRUint32 *aCount,
|
|||
// copy the value from the struct into the nsBERValue
|
||||
//
|
||||
rv = berValue->Set(values[i]->bv_len,
|
||||
reinterpret_cast<PRUint8 *>(values[i]->bv_val));
|
||||
reinterpret_cast<uint8_t *>(values[i]->bv_val));
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_ERROR("nsLDAPMessage::GetBinaryValues(): error setting"
|
||||
" nsBERValue");
|
||||
|
|
|
@ -35,9 +35,9 @@ class nsLDAPMessage : public nsILDAPMessage
|
|||
virtual ~nsLDAPMessage();
|
||||
|
||||
protected:
|
||||
nsresult IterateAttrErrHandler(PRInt32 aLderrno, PRUint32 *aAttrCount,
|
||||
nsresult IterateAttrErrHandler(int32_t aLderrno, uint32_t *aAttrCount,
|
||||
char** *aAttributes, BerElement *position);
|
||||
nsresult IterateAttributes(PRUint32 *aAttrCount, char** *aAttributes,
|
||||
nsresult IterateAttributes(uint32_t *aAttrCount, char** *aAttributes,
|
||||
bool getP);
|
||||
nsresult Init(nsILDAPConnection *aConnection,
|
||||
LDAPMessage *aMsgHandle);
|
||||
|
|
|
@ -33,7 +33,7 @@ nsLDAPModification::Init()
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsLDAPModification::GetOperation(PRInt32 *aOperation)
|
||||
nsLDAPModification::GetOperation(int32_t *aOperation)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aOperation);
|
||||
|
||||
|
@ -41,7 +41,7 @@ nsLDAPModification::GetOperation(PRInt32 *aOperation)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsLDAPModification::SetOperation(PRInt32 aOperation)
|
||||
NS_IMETHODIMP nsLDAPModification::SetOperation(int32_t aOperation)
|
||||
{
|
||||
mOperation = aOperation;
|
||||
return NS_OK;
|
||||
|
@ -117,7 +117,7 @@ nsLDAPModification::SetValues(nsIArray* aValues)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsLDAPModification::SetUpModification(PRInt32 aOperation,
|
||||
nsLDAPModification::SetUpModification(int32_t aOperation,
|
||||
const nsACString &aType,
|
||||
nsIArray *aValues)
|
||||
{
|
||||
|
@ -134,7 +134,7 @@ nsLDAPModification::SetUpModification(PRInt32 aOperation,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsLDAPModification::SetUpModificationOneValue(PRInt32 aOperation,
|
||||
nsLDAPModification::SetUpModificationOneValue(int32_t aOperation,
|
||||
const nsACString &aType,
|
||||
nsILDAPBERValue *aValue)
|
||||
{
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
nsresult Init();
|
||||
|
||||
private:
|
||||
PRInt32 mOperation;
|
||||
int32_t mOperation;
|
||||
nsCString mType;
|
||||
nsCOMPtr<nsIMutableArray> mValues;
|
||||
mozilla::Mutex mValuesLock;
|
||||
|
|
|
@ -209,7 +209,7 @@ nsLDAPOperation::SaslBind(const nsACString &service,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsLDAPOperation::SaslStep(const char *token, PRUint32 tokenLen)
|
||||
nsLDAPOperation::SaslStep(const char *token, uint32_t tokenLen)
|
||||
{
|
||||
nsresult rv;
|
||||
nsCAutoString bindName;
|
||||
|
@ -262,7 +262,7 @@ nsLDAPOperation::SimpleBind(const nsACString& passwd)
|
|||
// See https://bugzilla.mozilla.org/show_bug.cgi?id=557928#c1
|
||||
nsresult rv;
|
||||
nsCAutoString bindName;
|
||||
PRInt32 originalMsgID = mMsgID;
|
||||
int32_t originalMsgID = mMsgID;
|
||||
// Ugly hack alert:
|
||||
// the first time we get called with a passwd, remember it.
|
||||
// Then, if we get called again w/o a password, use the
|
||||
|
@ -330,7 +330,7 @@ static nsresult
|
|||
convertControlArray(nsIArray *aXpcomArray, LDAPControl ***aArray)
|
||||
{
|
||||
// get the size of the original array
|
||||
PRUint32 length;
|
||||
uint32_t length;
|
||||
nsresult rv = aXpcomArray->GetLength(&length);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -357,7 +357,7 @@ convertControlArray(nsIArray *aXpcomArray, LDAPControl ***aArray)
|
|||
rv = enumerator->HasMoreElements(&moreElements);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRUint32 i = 0;
|
||||
uint32_t i = 0;
|
||||
while (moreElements) {
|
||||
|
||||
// get the next array element
|
||||
|
@ -397,10 +397,10 @@ convertControlArray(nsIArray *aXpcomArray, LDAPControl ***aArray)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsLDAPOperation::SearchExt(const nsACString& aBaseDn, PRInt32 aScope,
|
||||
nsLDAPOperation::SearchExt(const nsACString& aBaseDn, int32_t aScope,
|
||||
const nsACString& aFilter,
|
||||
const nsACString &aAttributes,
|
||||
PRIntervalTime aTimeOut, PRInt32 aSizeLimit)
|
||||
PRIntervalTime aTimeOut, int32_t aSizeLimit)
|
||||
{
|
||||
if (!mMessageListener) {
|
||||
NS_ERROR("nsLDAPOperation::SearchExt(): mMessageListener not set");
|
||||
|
@ -444,14 +444,14 @@ nsLDAPOperation::SearchExt(const nsACString& aBaseDn, PRInt32 aScope,
|
|||
nsTArray<nsCString> attrArray;
|
||||
ParseString(aAttributes, ',', attrArray);
|
||||
char **attrs = nullptr;
|
||||
PRUint32 origLength = attrArray.Length();
|
||||
uint32_t origLength = attrArray.Length();
|
||||
if (origLength)
|
||||
{
|
||||
attrs = static_cast<char **> (NS_Alloc((origLength + 1) * sizeof(char *)));
|
||||
if (!attrs)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
for (PRUint32 i = 0; i < origLength; ++i)
|
||||
for (uint32_t i = 0; i < origLength; ++i)
|
||||
attrs[i] = ToNewCString(attrArray[i]);
|
||||
|
||||
attrs[origLength] = 0;
|
||||
|
@ -495,7 +495,7 @@ nsLDAPOperation::SearchExt(const nsACString& aBaseDn, PRInt32 aScope,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsLDAPOperation::GetMessageID(PRInt32 *aMsgID)
|
||||
nsLDAPOperation::GetMessageID(int32_t *aMsgID)
|
||||
{
|
||||
if (!aMsgID) {
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
|
@ -598,7 +598,7 @@ nsLDAPOperation::AddExt(const char *base,
|
|||
|
||||
LDAPMod **attrs = 0;
|
||||
int retVal = LDAP_SUCCESS;
|
||||
PRUint32 modCount = 0;
|
||||
uint32_t modCount = 0;
|
||||
nsresult rv = mods->GetLength(&modCount);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -611,7 +611,7 @@ nsLDAPOperation::AddExt(const char *base,
|
|||
}
|
||||
|
||||
nsCAutoString type;
|
||||
PRUint32 index;
|
||||
uint32_t index;
|
||||
for (index = 0; index < modCount && NS_SUCCEEDED(rv); ++index) {
|
||||
attrs[index] = new LDAPMod();
|
||||
|
||||
|
@ -623,7 +623,7 @@ nsLDAPOperation::AddExt(const char *base,
|
|||
break;
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
PRInt32 operation;
|
||||
int32_t operation;
|
||||
NS_ASSERTION(NS_SUCCEEDED(modif->GetOperation(&operation)) &&
|
||||
((operation & ~LDAP_MOD_BVALUES) == LDAP_MOD_ADD),
|
||||
"AddExt can only add.");
|
||||
|
@ -653,7 +653,7 @@ nsLDAPOperation::AddExt(const char *base,
|
|||
modCount = index;
|
||||
}
|
||||
|
||||
for (PRUint32 counter = 0; counter < modCount; ++counter)
|
||||
for (uint32_t counter = 0; counter < modCount; ++counter)
|
||||
delete attrs[counter];
|
||||
|
||||
nsMemory::Free(attrs);
|
||||
|
@ -763,7 +763,7 @@ nsLDAPOperation::ModifyExt(const char *base,
|
|||
|
||||
LDAPMod **attrs = 0;
|
||||
int retVal = 0;
|
||||
PRUint32 modCount = 0;
|
||||
uint32_t modCount = 0;
|
||||
nsresult rv = mods->GetLength(&modCount);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (modCount && mods) {
|
||||
|
@ -775,7 +775,7 @@ nsLDAPOperation::ModifyExt(const char *base,
|
|||
}
|
||||
|
||||
nsCAutoString type;
|
||||
PRUint32 index;
|
||||
uint32_t index;
|
||||
for (index = 0; index < modCount && NS_SUCCEEDED(rv); ++index) {
|
||||
attrs[index] = new LDAPMod();
|
||||
if (!attrs[index])
|
||||
|
@ -785,7 +785,7 @@ nsLDAPOperation::ModifyExt(const char *base,
|
|||
if (NS_FAILED(rv))
|
||||
break;
|
||||
|
||||
PRInt32 operation;
|
||||
int32_t operation;
|
||||
nsresult rv = modif->GetOperation(&operation);
|
||||
if (NS_FAILED(rv))
|
||||
break;
|
||||
|
@ -815,7 +815,7 @@ nsLDAPOperation::ModifyExt(const char *base,
|
|||
|
||||
}
|
||||
|
||||
for (PRUint32 counter = 0; counter < modCount; ++counter)
|
||||
for (uint32_t counter = 0; counter < modCount; ++counter)
|
||||
delete attrs[counter];
|
||||
|
||||
nsMemory::Free(attrs);
|
||||
|
@ -935,7 +935,7 @@ nsLDAPOperation::CopyValues(nsILDAPModification* aMod, berval*** aBValues)
|
|||
nsresult rv = aMod->GetValues(getter_AddRefs(values));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRUint32 valuesCount;
|
||||
uint32_t valuesCount;
|
||||
rv = values->GetLength(&valuesCount);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -945,13 +945,13 @@ nsLDAPOperation::CopyValues(nsILDAPModification* aMod, berval*** aBValues)
|
|||
if (!*aBValues)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
PRUint32 valueIndex;
|
||||
uint32_t valueIndex;
|
||||
for (valueIndex = 0; valueIndex < valuesCount; ++valueIndex) {
|
||||
nsCOMPtr<nsILDAPBERValue> value(do_QueryElementAt(values, valueIndex, &rv));
|
||||
|
||||
berval* bval = new berval;
|
||||
if (NS_FAILED(rv) || !bval) {
|
||||
for (PRUint32 counter = 0;
|
||||
for (uint32_t counter = 0;
|
||||
counter < valueIndex && counter < valuesCount;
|
||||
++counter)
|
||||
delete (*aBValues)[valueIndex];
|
||||
|
@ -960,8 +960,8 @@ nsLDAPOperation::CopyValues(nsILDAPModification* aMod, berval*** aBValues)
|
|||
delete bval;
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
value->Get((PRUint32*)&bval->bv_len,
|
||||
(PRUint8**)&bval->bv_val);
|
||||
value->Get((uint32_t*)&bval->bv_len,
|
||||
(uint8_t**)&bval->bv_val);
|
||||
(*aBValues)[valueIndex] = bval;
|
||||
}
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ class nsLDAPOperation : public nsILDAPOperation
|
|||
nsCString mSavePassword;
|
||||
nsCString mMechanism;
|
||||
nsCOMPtr<nsIAuthModule> mAuthModule;
|
||||
PRInt32 mMsgID; // opaque handle to outbound message for this op
|
||||
int32_t mMsgID; // opaque handle to outbound message for this op
|
||||
|
||||
nsCOMPtr<nsIMutableArray> mClientControls;
|
||||
nsCOMPtr<nsIMutableArray> mServerControls;
|
||||
|
|
|
@ -76,7 +76,7 @@ NS_IMETHODIMP nsLDAPServer::SetBinddn(const nsACString& aBindDN)
|
|||
}
|
||||
|
||||
// attribute unsigned long sizelimit;
|
||||
NS_IMETHODIMP nsLDAPServer::GetSizelimit(PRUint32 *_retval)
|
||||
NS_IMETHODIMP nsLDAPServer::GetSizelimit(uint32_t *_retval)
|
||||
{
|
||||
if (!_retval) {
|
||||
NS_ERROR("nsLDAPServer::GetSizelimit: null pointer ");
|
||||
|
@ -86,7 +86,7 @@ NS_IMETHODIMP nsLDAPServer::GetSizelimit(PRUint32 *_retval)
|
|||
*_retval = mSizeLimit;
|
||||
return NS_OK;
|
||||
}
|
||||
NS_IMETHODIMP nsLDAPServer::SetSizelimit(PRUint32 aSizeLimit)
|
||||
NS_IMETHODIMP nsLDAPServer::SetSizelimit(uint32_t aSizeLimit)
|
||||
{
|
||||
mSizeLimit = aSizeLimit;
|
||||
return NS_OK;
|
||||
|
@ -110,7 +110,7 @@ NS_IMETHODIMP nsLDAPServer::SetUrl(nsILDAPURL *aURL)
|
|||
}
|
||||
|
||||
// attribute long protocolVersion
|
||||
NS_IMETHODIMP nsLDAPServer::GetProtocolVersion(PRUint32 *_retval)
|
||||
NS_IMETHODIMP nsLDAPServer::GetProtocolVersion(uint32_t *_retval)
|
||||
{
|
||||
if (!_retval) {
|
||||
NS_ERROR("nsLDAPServer::GetProtocolVersion: null pointer ");
|
||||
|
@ -120,7 +120,7 @@ NS_IMETHODIMP nsLDAPServer::GetProtocolVersion(PRUint32 *_retval)
|
|||
*_retval = mProtocolVersion;
|
||||
return NS_OK;
|
||||
}
|
||||
NS_IMETHODIMP nsLDAPServer::SetProtocolVersion(PRUint32 aVersion)
|
||||
NS_IMETHODIMP nsLDAPServer::SetProtocolVersion(uint32_t aVersion)
|
||||
{
|
||||
if (aVersion != nsILDAPConnection::VERSION2 &&
|
||||
aVersion != nsILDAPConnection::VERSION3) {
|
||||
|
|
|
@ -30,8 +30,8 @@ class nsLDAPServer : public nsILDAPServer
|
|||
nsCString mUsername; // Username / UID
|
||||
nsCString mPassword; // Password to bind with
|
||||
nsCString mBindDN; // DN associated with the UID above
|
||||
PRUint32 mSizeLimit; // Limit the LDAP search to this # of entries
|
||||
PRUint32 mProtocolVersion; // What version of LDAP to use?
|
||||
uint32_t mSizeLimit; // Limit the LDAP search to this # of entries
|
||||
uint32_t mProtocolVersion; // What version of LDAP to use?
|
||||
// This "links" to a LDAP URL object, which holds further information
|
||||
// related to the LDAP server. Like Host, port, base-DN and scope.
|
||||
nsCOMPtr<nsILDAPURL> mURL;
|
||||
|
|
|
@ -74,7 +74,7 @@ bool nsLDAPServiceEntry::DecrementLeases()
|
|||
|
||||
return true;
|
||||
}
|
||||
PRUint32 nsLDAPServiceEntry::GetLeases()
|
||||
uint32_t nsLDAPServiceEntry::GetLeases()
|
||||
{
|
||||
return mLeases;
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ void nsLDAPServiceEntry::SetMessage(nsILDAPMessage *aMessage)
|
|||
already_AddRefed<nsILDAPMessageListener> nsLDAPServiceEntry::PopListener()
|
||||
{
|
||||
nsILDAPMessageListener *listener;
|
||||
PRInt32 count = mListeners.Count();
|
||||
int32_t count = mListeners.Count();
|
||||
if (!count) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -503,7 +503,7 @@ nsLDAPService::OnLDAPMessage(nsILDAPMessage *aMessage)
|
|||
{
|
||||
nsCOMPtr<nsILDAPOperation> operation;
|
||||
nsCOMPtr<nsILDAPConnection> connection;
|
||||
PRInt32 messageType;
|
||||
int32_t messageType;
|
||||
|
||||
// XXXleif: NULL messages are supposedly allowed, but the semantics
|
||||
// are not definted (yet?). This is something to look out for...
|
||||
|
@ -618,7 +618,7 @@ nsLDAPService::EstablishConnection(nsLDAPServiceEntry *aEntry,
|
|||
nsCOMPtr<nsILDAPMessage> message;
|
||||
nsCAutoString binddn;
|
||||
nsCAutoString password;
|
||||
PRUint32 protocolVersion;
|
||||
uint32_t protocolVersion;
|
||||
nsresult rv;
|
||||
|
||||
server = aEntry->GetServer();
|
||||
|
@ -752,7 +752,7 @@ nsLDAPService::EstablishConnection(nsLDAPServiceEntry *aEntry,
|
|||
}
|
||||
|
||||
/* AString createFilter (in unsigned long aMaxSize, in AString aPattern, in AString aPrefix, in AString aSuffix, in AString aAttr, in AString aValue); */
|
||||
NS_IMETHODIMP nsLDAPService::CreateFilter(PRUint32 aMaxSize,
|
||||
NS_IMETHODIMP nsLDAPService::CreateFilter(uint32_t aMaxSize,
|
||||
const nsACString & aPattern,
|
||||
const nsACString & aPrefix,
|
||||
const nsACString & aSuffix,
|
||||
|
@ -769,7 +769,7 @@ NS_IMETHODIMP nsLDAPService::CreateFilter(PRUint32 aMaxSize,
|
|||
//
|
||||
const char *iter = aValue.BeginReading();
|
||||
const char *iterEnd = aValue.EndReading();
|
||||
PRUint32 numTokens = CountTokens(iter, iterEnd);
|
||||
uint32_t numTokens = CountTokens(iter, iterEnd);
|
||||
char **valueWords;
|
||||
valueWords = static_cast<char **>(nsMemory::Alloc((numTokens + 1) *
|
||||
sizeof(char *)));
|
||||
|
@ -779,7 +779,7 @@ NS_IMETHODIMP nsLDAPService::CreateFilter(PRUint32 aMaxSize,
|
|||
|
||||
// build the array of values
|
||||
//
|
||||
PRUint32 curToken = 0;
|
||||
uint32_t curToken = 0;
|
||||
while (iter != iterEnd && curToken < numTokens ) {
|
||||
valueWords[curToken] = NextToken(&iter, &iterEnd);
|
||||
if ( !valueWords[curToken] ) {
|
||||
|
@ -847,7 +847,7 @@ NS_IMETHODIMP nsLDAPService::CreateFilter(PRUint32 aMaxSize,
|
|||
NS_IMETHODIMP nsLDAPService::ParseDn(const char *aDn,
|
||||
nsACString &aRdn,
|
||||
nsACString &aBaseDn,
|
||||
PRUint32 *aRdnCount,
|
||||
uint32_t *aRdnCount,
|
||||
char ***aRdnAttrs)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aRdnCount);
|
||||
|
@ -883,7 +883,7 @@ NS_IMETHODIMP nsLDAPService::ParseDn(const char *aDn,
|
|||
}
|
||||
|
||||
// count RDN attributes
|
||||
PRUint32 rdnCount = 0;
|
||||
uint32_t rdnCount = 0;
|
||||
for (char **component = rdnComponents; *component; ++component)
|
||||
++rdnCount;
|
||||
if (rdnCount < 1) {
|
||||
|
@ -902,9 +902,9 @@ NS_IMETHODIMP nsLDAPService::ParseDn(const char *aDn,
|
|||
ldap_value_free(rdnComponents);
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
PRUint32 index = 0;
|
||||
uint32_t index = 0;
|
||||
for (char **component = rdnComponents; *component; ++component) {
|
||||
PRUint32 len = 0;
|
||||
uint32_t len = 0;
|
||||
char *p;
|
||||
for (p = *component; *p != '\0' && *p != '='; ++p)
|
||||
++len;
|
||||
|
@ -938,11 +938,11 @@ NS_IMETHODIMP nsLDAPService::ParseDn(const char *aDn,
|
|||
|
||||
// Count the number of space-separated tokens between aIter and aIterEnd
|
||||
//
|
||||
PRUint32
|
||||
uint32_t
|
||||
nsLDAPService::CountTokens(const char *aIter,
|
||||
const char *aIterEnd)
|
||||
{
|
||||
PRUint32 count(0);
|
||||
uint32_t count(0);
|
||||
|
||||
// keep iterating through the string until we hit the end
|
||||
//
|
||||
|
|
|
@ -35,7 +35,7 @@ class nsLDAPServiceEntry
|
|||
virtual ~nsLDAPServiceEntry() {};
|
||||
bool Init();
|
||||
|
||||
inline PRUint32 GetLeases();
|
||||
inline uint32_t GetLeases();
|
||||
inline void IncrementLeases();
|
||||
inline bool DecrementLeases();
|
||||
|
||||
|
@ -60,7 +60,7 @@ class nsLDAPServiceEntry
|
|||
inline bool DeleteEntry();
|
||||
|
||||
protected:
|
||||
PRUint32 mLeases; // The number of leases currently granted
|
||||
uint32_t mLeases; // The number of leases currently granted
|
||||
PRTime mTimestamp; // Last time this server was "used"
|
||||
bool mDelete; // This entry is due for deletion
|
||||
bool mRebinding; // Keep state if we are rebinding or not
|
||||
|
@ -104,7 +104,7 @@ class nsLDAPService : public nsILDAPService, public nsILDAPMessageListener
|
|||
// createFilter; note that unlike with NextToken, these params
|
||||
// are copies, not references.
|
||||
//
|
||||
PRUint32 CountTokens(const char * aIter, const char * aIterEnd);
|
||||
uint32_t CountTokens(const char * aIter, const char * aIterEnd);
|
||||
|
||||
|
||||
mozilla::Mutex mLock; // Lock mechanism
|
||||
|
|
|
@ -37,7 +37,7 @@ nsLDAPSyncQuery::~nsLDAPSyncQuery()
|
|||
NS_IMETHODIMP
|
||||
nsLDAPSyncQuery::OnLDAPMessage(nsILDAPMessage *aMessage)
|
||||
{
|
||||
PRInt32 messageType;
|
||||
int32_t messageType;
|
||||
|
||||
// just in case.
|
||||
//
|
||||
|
@ -127,7 +127,7 @@ nsresult
|
|||
nsLDAPSyncQuery::OnLDAPBind(nsILDAPMessage *aMessage)
|
||||
{
|
||||
|
||||
PRInt32 errCode;
|
||||
int32_t errCode;
|
||||
|
||||
mOperation = 0; // done with bind op; make nsCOMPtr release it
|
||||
|
||||
|
@ -158,7 +158,7 @@ nsLDAPSyncQuery::OnLDAPBind(nsILDAPMessage *aMessage)
|
|||
nsresult
|
||||
nsLDAPSyncQuery::OnLDAPSearchEntry(nsILDAPMessage *aMessage)
|
||||
{
|
||||
PRUint32 attrCount;
|
||||
uint32_t attrCount;
|
||||
char** attributes;
|
||||
nsresult rv = aMessage->GetAttributes(&attrCount, &attributes);
|
||||
if (NS_FAILED(rv))
|
||||
|
@ -170,10 +170,10 @@ nsLDAPSyncQuery::OnLDAPSearchEntry(nsILDAPMessage *aMessage)
|
|||
}
|
||||
|
||||
// Iterate through the attributes received in this message
|
||||
for (PRUint32 i = 0; i < attrCount; i++)
|
||||
for (uint32_t i = 0; i < attrCount; i++)
|
||||
{
|
||||
PRUnichar **vals;
|
||||
PRUint32 valueCount;
|
||||
uint32_t valueCount;
|
||||
|
||||
// Get the values of this attribute.
|
||||
// XXX better failure handling
|
||||
|
@ -187,7 +187,7 @@ nsLDAPSyncQuery::OnLDAPSearchEntry(nsILDAPMessage *aMessage)
|
|||
}
|
||||
|
||||
// Store all values of this attribute in the mResults.
|
||||
for (PRUint32 j = 0; j < valueCount; j++) {
|
||||
for (uint32_t j = 0; j < valueCount; j++) {
|
||||
mResults.Append(PRUnichar('\n'));
|
||||
mResults.AppendASCII(attributes[i]);
|
||||
mResults.Append(PRUnichar('='));
|
||||
|
@ -258,7 +258,7 @@ nsLDAPSyncQuery::StartLDAPSearch()
|
|||
|
||||
// and the scope
|
||||
//
|
||||
PRInt32 scope;
|
||||
int32_t scope;
|
||||
rv = mServerURL->GetScope(&scope);
|
||||
if (NS_FAILED(rv)) {
|
||||
FinishLDAPQuery();
|
||||
|
@ -338,7 +338,7 @@ nsLDAPSyncQuery::FinishLDAPQuery()
|
|||
|
||||
/* wstring getQueryResults (in nsILDAPURL aServerURL, in unsigned long aVersion); */
|
||||
NS_IMETHODIMP nsLDAPSyncQuery::GetQueryResults(nsILDAPURL *aServerURL,
|
||||
PRUint32 aProtocolVersion,
|
||||
uint32_t aProtocolVersion,
|
||||
PRUnichar **_retval)
|
||||
{
|
||||
nsresult rv;
|
||||
|
|
|
@ -37,7 +37,7 @@ class nsLDAPSyncQuery : public nsILDAPSyncQuery,
|
|||
nsCOMPtr<nsILDAPURL> mServerURL; // LDAP URL
|
||||
bool mFinished; // control variable for eventQ
|
||||
nsString mResults; // values to return
|
||||
PRUint32 mProtocolVersion; // LDAP version to use
|
||||
uint32_t mProtocolVersion; // LDAP version to use
|
||||
|
||||
nsresult InitConnection();
|
||||
// check that we bound ok and start then call StartLDAPSearch
|
||||
|
|
|
@ -31,7 +31,7 @@ nsLDAPURL::~nsLDAPURL()
|
|||
}
|
||||
|
||||
nsresult
|
||||
nsLDAPURL::Init(PRUint32 aUrlType, PRInt32 aDefaultPort,
|
||||
nsLDAPURL::Init(uint32_t aUrlType, int32_t aDefaultPort,
|
||||
const nsACString &aSpec, const char* aOriginCharset,
|
||||
nsIURI *aBaseURI)
|
||||
{
|
||||
|
@ -278,7 +278,7 @@ nsLDAPURL::SetHost(const nsACString &aHost)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsLDAPURL::GetPort(PRInt32 *_retval)
|
||||
nsLDAPURL::GetPort(int32_t *_retval)
|
||||
{
|
||||
if (!mBaseURL)
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
|
@ -287,7 +287,7 @@ nsLDAPURL::GetPort(PRInt32 *_retval)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsLDAPURL::SetPort(PRInt32 aPort)
|
||||
nsLDAPURL::SetPort(int32_t aPort)
|
||||
{
|
||||
if (!mBaseURL)
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
|
@ -351,7 +351,7 @@ NS_IMETHODIMP nsLDAPURL::Equals(nsIURI *other, bool *_retval)
|
|||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
nsCAutoString thisSpec, otherSpec;
|
||||
PRUint32 otherOptions;
|
||||
uint32_t otherOptions;
|
||||
|
||||
rv = GetSpec(thisSpec);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
@ -521,7 +521,7 @@ NS_IMETHODIMP nsLDAPURL::AddAttribute(const nsACString &aAttribute)
|
|||
// Check to see if the attribute is already stored. If it is, then also
|
||||
// check to see if it is the last attribute in the string, or if the next
|
||||
// character is a comma, this means we won't match substrings.
|
||||
PRInt32 pos = mAttributes.Find(findAttribute, CaseInsensitiveCompare);
|
||||
int32_t pos = mAttributes.Find(findAttribute, CaseInsensitiveCompare);
|
||||
if (pos != -1)
|
||||
return NS_OK;
|
||||
|
||||
|
@ -552,7 +552,7 @@ NS_IMETHODIMP nsLDAPURL::RemoveAttribute(const nsACString &aAttribute)
|
|||
mAttributes.Truncate();
|
||||
else
|
||||
{
|
||||
PRInt32 pos = mAttributes.Find(findAttribute, CaseInsensitiveCompare);
|
||||
int32_t pos = mAttributes.Find(findAttribute, CaseInsensitiveCompare);
|
||||
if (pos == -1)
|
||||
return NS_OK;
|
||||
|
||||
|
@ -580,14 +580,14 @@ NS_IMETHODIMP nsLDAPURL::HasAttribute(const nsACString &aAttribute,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsLDAPURL::GetScope(PRInt32 *_retval)
|
||||
NS_IMETHODIMP nsLDAPURL::GetScope(int32_t *_retval)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(_retval);
|
||||
*_retval = mScope;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsLDAPURL::SetScope(PRInt32 aScope)
|
||||
NS_IMETHODIMP nsLDAPURL::SetScope(int32_t aScope)
|
||||
{
|
||||
if (!mBaseURL)
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
|
@ -630,14 +630,14 @@ NS_IMETHODIMP nsLDAPURL::SetFilter(const nsACString& aFilter)
|
|||
return mBaseURL->SetPath(newPath);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsLDAPURL::GetOptions(PRUint32 *_retval)
|
||||
NS_IMETHODIMP nsLDAPURL::GetOptions(uint32_t *_retval)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(_retval);
|
||||
*_retval = mOptions;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsLDAPURL::SetOptions(PRUint32 aOptions)
|
||||
NS_IMETHODIMP nsLDAPURL::SetOptions(uint32_t aOptions)
|
||||
{
|
||||
// Secure is the only option supported at the moment
|
||||
if (mOptions & OPT_SECURE == aOptions & OPT_SECURE)
|
||||
|
|
|
@ -46,9 +46,9 @@ protected:
|
|||
nsresult SetAttributeArray(char** aAttributes);
|
||||
|
||||
nsCString mDN; // Base Distinguished Name (Base DN)
|
||||
PRInt32 mScope; // Search scope (base, one or sub)
|
||||
int32_t mScope; // Search scope (base, one or sub)
|
||||
nsCString mFilter; // LDAP search filter
|
||||
PRUint32 mOptions; // Options
|
||||
uint32_t mOptions; // Options
|
||||
nsCString mAttributes;
|
||||
nsCOMPtr<nsIURI> mBaseURL;
|
||||
};
|
||||
|
|
|
@ -45,7 +45,7 @@ inline void LdapCompressWhitespace(nsCString& aString)
|
|||
while (IS_SPACE(*wend))
|
||||
++wend;
|
||||
|
||||
PRUint32 wlen = wend - cur - 1;
|
||||
uint32_t wlen = wend - cur - 1;
|
||||
|
||||
// fix "end"
|
||||
end -= wlen;
|
||||
|
@ -69,17 +69,17 @@ bool IsUTF8(const nsACString& aString)
|
|||
{
|
||||
const char *done_reading = aString.EndReading();
|
||||
|
||||
PRInt32 state = 0;
|
||||
int32_t state = 0;
|
||||
bool overlong = false;
|
||||
bool surrogate = false;
|
||||
bool nonchar = false;
|
||||
PRUint16 olupper = 0; // overlong byte upper bound.
|
||||
PRUint16 slower = 0; // surrogate byte lower bound.
|
||||
uint16_t olupper = 0; // overlong byte upper bound.
|
||||
uint16_t slower = 0; // surrogate byte lower bound.
|
||||
|
||||
const char *ptr = aString.BeginReading();
|
||||
|
||||
while (ptr < done_reading) {
|
||||
PRUint8 c;
|
||||
uint8_t c;
|
||||
|
||||
if (0 == state) {
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ interface nsIMsgCloudFileProvider : nsISupports {
|
|||
readonly attribute long long fileSpaceUsed;
|
||||
|
||||
/// This is used by our test harness to override the urls the provider uses.
|
||||
void overrideUrls(in PRUint32 aNumUrls, [array, size_is(aNumUrls)] in string aUrls);
|
||||
void overrideUrls(in uint32_t aNumUrls, [array, size_is(aNumUrls)] in string aUrls);
|
||||
|
||||
// Error handling
|
||||
// If the cloud provider gets textual errors back from the server,
|
||||
|
|
|
@ -43,7 +43,7 @@ nsresult nsEudoraProfileMigrator::ContinueImport()
|
|||
NS_IMETHODIMP
|
||||
nsEudoraProfileMigrator::Notify(nsITimer *timer)
|
||||
{
|
||||
PRInt32 progress;
|
||||
int32_t progress;
|
||||
mGenericImporter->GetProgress(&progress);
|
||||
|
||||
nsAutoString index;
|
||||
|
@ -71,7 +71,7 @@ nsEudoraProfileMigrator::Notify(nsITimer *timer)
|
|||
// nsIMailProfileMigrator
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsEudoraProfileMigrator::Migrate(PRUint16 aItems, nsIProfileStartup* aStartup, const PRUnichar* aProfile)
|
||||
nsEudoraProfileMigrator::Migrate(uint16_t aItems, nsIProfileStartup* aStartup, const PRUnichar* aProfile)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
|
@ -96,7 +96,7 @@ nsEudoraProfileMigrator::Migrate(PRUint16 aItems, nsIProfileStartup* aStartup, c
|
|||
NS_IMETHODIMP
|
||||
nsEudoraProfileMigrator::GetMigrateData(const PRUnichar* aProfile,
|
||||
bool aReplace,
|
||||
PRUint16* aResult)
|
||||
uint16_t* aResult)
|
||||
{
|
||||
// There's no harm in assuming everything is available.
|
||||
*aResult = nsIMailProfileMigrator::ACCOUNT_SETTINGS | nsIMailProfileMigrator::ADDRESSBOOK_DATA |
|
||||
|
|
|
@ -16,7 +16,7 @@ void SetProxyPref(const nsACString& aHostPort, const char* aPref,
|
|||
const char* aPortPref, nsIPrefBranch* aPrefs)
|
||||
{
|
||||
nsCAutoString hostPort(aHostPort);
|
||||
PRInt32 portDelimOffset = hostPort.RFindChar(':');
|
||||
int32_t portDelimOffset = hostPort.RFindChar(':');
|
||||
if (portDelimOffset > 0) {
|
||||
nsCAutoString host(Substring(hostPort, 0, portDelimOffset));
|
||||
nsCAutoString port(Substring(hostPort, portDelimOffset + 1,
|
||||
|
@ -24,7 +24,7 @@ void SetProxyPref(const nsACString& aHostPort, const char* aPref,
|
|||
|
||||
aPrefs->SetCharPref(aPref, host.get());
|
||||
nsresult stringErr;
|
||||
PRInt32 portValue = port.ToInteger(&stringErr);
|
||||
int32_t portValue = port.ToInteger(&stringErr);
|
||||
aPrefs->SetIntPref(aPortPref, portValue);
|
||||
}
|
||||
else
|
||||
|
@ -38,7 +38,7 @@ void ParseOverrideServers(const char* aServers, nsIPrefBranch* aBranch)
|
|||
// or "<local>". Mozilla's format is server,server,server, and <local>
|
||||
// must be translated to "localhost,127.0.0.1"
|
||||
nsCAutoString override(aServers);
|
||||
PRInt32 left = 0, right = 0;
|
||||
int32_t left = 0, right = 0;
|
||||
for (;;) {
|
||||
right = override.FindChar(';', right);
|
||||
const nsACString& host = Substring(override, left,
|
||||
|
@ -53,9 +53,9 @@ void ParseOverrideServers(const char* aServers, nsIPrefBranch* aBranch)
|
|||
aBranch->SetCharPref("network.proxy.no_proxies_on", override.get());
|
||||
}
|
||||
|
||||
void GetMigrateDataFromArray(MigrationData* aDataArray, PRInt32 aDataArrayLength,
|
||||
void GetMigrateDataFromArray(MigrationData* aDataArray, int32_t aDataArrayLength,
|
||||
bool aReplace, nsIFile* aSourceProfile,
|
||||
PRUint16* aResult)
|
||||
uint16_t* aResult)
|
||||
{
|
||||
nsCOMPtr<nsIFile> sourceFile;
|
||||
bool exists;
|
||||
|
|
|
@ -37,16 +37,16 @@ void SetProxyPref(const nsACString& aHostPort, const char* aPref,
|
|||
|
||||
struct MigrationData {
|
||||
PRUnichar* fileName;
|
||||
PRUint32 sourceFlag;
|
||||
uint32_t sourceFlag;
|
||||
bool replaceOnly;
|
||||
};
|
||||
|
||||
class nsIFile;
|
||||
void GetMigrateDataFromArray(MigrationData* aDataArray,
|
||||
PRInt32 aDataArrayLength,
|
||||
int32_t aDataArrayLength,
|
||||
bool aReplace,
|
||||
nsIFile* aSourceProfile,
|
||||
PRUint16* aResult);
|
||||
uint16_t* aResult);
|
||||
|
||||
|
||||
// get the base directory of the *target* profile
|
||||
|
|
|
@ -357,11 +357,11 @@ void nsNetscapeProfileMigratorBase::CopyNextFolder()
|
|||
fileTransaction.newName);
|
||||
|
||||
// add to our current progress
|
||||
PRInt64 fileSize;
|
||||
int64_t fileSize;
|
||||
fileTransaction.srcFile->GetFileSize(&fileSize);
|
||||
mCurrentProgress += fileSize;
|
||||
|
||||
PRUint32 percentage = (PRUint32)(mCurrentProgress * 100 / mMaxProgress);
|
||||
uint32_t percentage = (uint32_t)(mCurrentProgress * 100 / mMaxProgress);
|
||||
|
||||
nsAutoString index;
|
||||
index.AppendInt(percentage);
|
||||
|
@ -399,7 +399,7 @@ nsNetscapeProfileMigratorBase::GetSourceHasMultipleProfiles(bool* aResult)
|
|||
GetSourceProfiles(getter_AddRefs(profiles));
|
||||
|
||||
if (profiles) {
|
||||
PRUint32 count;
|
||||
uint32_t count;
|
||||
profiles->GetLength(&count);
|
||||
*aResult = count > 1;
|
||||
}
|
||||
|
@ -416,7 +416,7 @@ nsNetscapeProfileMigratorBase::GetSourceExists(bool* aResult)
|
|||
GetSourceProfiles(getter_AddRefs(profiles));
|
||||
|
||||
if (profiles) {
|
||||
PRUint32 count;
|
||||
uint32_t count;
|
||||
profiles->GetLength(&count);
|
||||
*aResult = count > 0;
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
prefConverter prefSetterFunc;
|
||||
bool prefHasValue;
|
||||
union {
|
||||
PRInt32 intValue;
|
||||
int32_t intValue;
|
||||
bool boolValue;
|
||||
char* stringValue;
|
||||
};
|
||||
|
@ -63,10 +63,10 @@ public:
|
|||
|
||||
struct PrefBranchStruct {
|
||||
char* prefName;
|
||||
PRInt32 type;
|
||||
int32_t type;
|
||||
union {
|
||||
char* stringValue;
|
||||
PRInt32 intValue;
|
||||
int32_t intValue;
|
||||
bool boolValue;
|
||||
};
|
||||
};
|
||||
|
@ -101,10 +101,10 @@ protected:
|
|||
// List of src/destination files we still have to copy into the new profile
|
||||
// directory.
|
||||
nsTArray<fileTransactionEntry> mFileCopyTransactions;
|
||||
PRUint32 mFileCopyTransactionIndex;
|
||||
uint32_t mFileCopyTransactionIndex;
|
||||
|
||||
PRInt64 mMaxProgress;
|
||||
PRInt64 mCurrentProgress;
|
||||
int64_t mMaxProgress;
|
||||
int64_t mCurrentProgress;
|
||||
|
||||
nsCOMPtr<nsIObserverService> mObserverService;
|
||||
nsCOMPtr<nsITimer> mFileIOTimer;
|
||||
|
|
|
@ -40,7 +40,7 @@ nsresult nsOEProfileMigrator::ContinueImport()
|
|||
NS_IMETHODIMP
|
||||
nsOEProfileMigrator::Notify(nsITimer *timer)
|
||||
{
|
||||
PRInt32 progress;
|
||||
int32_t progress;
|
||||
mGenericImporter->GetProgress(&progress);
|
||||
|
||||
nsAutoString index;
|
||||
|
@ -68,7 +68,7 @@ nsOEProfileMigrator::Notify(nsITimer *timer)
|
|||
// nsIMailProfileMigrator
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsOEProfileMigrator::Migrate(PRUint16 aItems, nsIProfileStartup* aStartup, const PRUnichar* aProfile)
|
||||
nsOEProfileMigrator::Migrate(uint16_t aItems, nsIProfileStartup* aStartup, const PRUnichar* aProfile)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
|
@ -93,7 +93,7 @@ nsOEProfileMigrator::Migrate(PRUint16 aItems, nsIProfileStartup* aStartup, const
|
|||
NS_IMETHODIMP
|
||||
nsOEProfileMigrator::GetMigrateData(const PRUnichar* aProfile,
|
||||
bool aReplace,
|
||||
PRUint16* aResult)
|
||||
uint16_t* aResult)
|
||||
{
|
||||
// There's no harm in assuming everything is available.
|
||||
*aResult = nsIMailProfileMigrator::ACCOUNT_SETTINGS | nsIMailProfileMigrator::ADDRESSBOOK_DATA |
|
||||
|
|
|
@ -35,7 +35,7 @@ nsresult nsOutlookProfileMigrator::ContinueImport()
|
|||
NS_IMETHODIMP
|
||||
nsOutlookProfileMigrator::Notify(nsITimer *timer)
|
||||
{
|
||||
PRInt32 progress;
|
||||
int32_t progress;
|
||||
mGenericImporter->GetProgress(&progress);
|
||||
|
||||
nsAutoString index;
|
||||
|
@ -63,7 +63,7 @@ nsOutlookProfileMigrator::Notify(nsITimer *timer)
|
|||
// nsIMailProfileMigrator
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsOutlookProfileMigrator::Migrate(PRUint16 aItems, nsIProfileStartup* aStartup, const PRUnichar* aProfile)
|
||||
nsOutlookProfileMigrator::Migrate(uint16_t aItems, nsIProfileStartup* aStartup, const PRUnichar* aProfile)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
|
@ -87,7 +87,7 @@ nsOutlookProfileMigrator::Migrate(PRUint16 aItems, nsIProfileStartup* aStartup,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsOutlookProfileMigrator::GetMigrateData(const PRUnichar* aProfile, bool aReplace, PRUint16* aResult)
|
||||
nsOutlookProfileMigrator::GetMigrateData(const PRUnichar* aProfile, bool aReplace, uint16_t* aResult)
|
||||
{
|
||||
// There's no harm in assuming everything is available.
|
||||
*aResult = nsIMailProfileMigrator::ACCOUNT_SETTINGS | nsIMailProfileMigrator::ADDRESSBOOK_DATA |
|
||||
|
|
|
@ -116,7 +116,7 @@ nsProfileMigrator::GetDefaultMailMigratorKey(nsACString& aKey, nsCOMPtr<nsIMailP
|
|||
"eudora",
|
||||
""
|
||||
};
|
||||
for (PRUint32 i = 0; sources[i][0]; ++i)
|
||||
for (uint32_t i = 0; sources[i][0]; ++i)
|
||||
{
|
||||
migratorID = migratorPrefix;
|
||||
migratorID.Append(sources[i]);
|
||||
|
|
|
@ -35,10 +35,10 @@
|
|||
|
||||
struct PrefBranchStruct {
|
||||
char* prefName;
|
||||
PRInt32 type;
|
||||
int32_t type;
|
||||
union {
|
||||
char* stringValue;
|
||||
PRInt32 intValue;
|
||||
int32_t intValue;
|
||||
bool boolValue;
|
||||
PRUnichar* wstringValue;
|
||||
};
|
||||
|
@ -59,7 +59,7 @@ nsSeamonkeyProfileMigrator::~nsSeamonkeyProfileMigrator()
|
|||
// nsIMailProfileMigrator
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSeamonkeyProfileMigrator::Migrate(PRUint16 aItems, nsIProfileStartup* aStartup, const PRUnichar* aProfile)
|
||||
nsSeamonkeyProfileMigrator::Migrate(uint16_t aItems, nsIProfileStartup* aStartup, const PRUnichar* aProfile)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
bool aReplace = aStartup ? true : false;
|
||||
|
@ -95,11 +95,11 @@ nsSeamonkeyProfileMigrator::Migrate(PRUint16 aItems, nsIProfileStartup* aStartup
|
|||
NOTIFY_OBSERVERS(MIGRATION_ITEMBEFOREMIGRATE, index.get());
|
||||
|
||||
// Generate the max progress value now that we know all of the files we need to copy
|
||||
PRUint32 count = mFileCopyTransactions.Length();
|
||||
for (PRUint32 i = 0; i < count; ++i)
|
||||
uint32_t count = mFileCopyTransactions.Length();
|
||||
for (uint32_t i = 0; i < count; ++i)
|
||||
{
|
||||
fileTransactionEntry fileTransaction = mFileCopyTransactions.ElementAt(i);
|
||||
PRInt64 fileSize;
|
||||
int64_t fileSize;
|
||||
fileTransaction.srcFile->GetFileSize(&fileSize);
|
||||
mMaxProgress += fileSize;
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ nsSeamonkeyProfileMigrator::Migrate(PRUint16 aItems, nsIProfileStartup* aStartup
|
|||
NS_IMETHODIMP
|
||||
nsSeamonkeyProfileMigrator::GetMigrateData(const PRUnichar* aProfile,
|
||||
bool aReplace,
|
||||
PRUint16* aResult)
|
||||
uint16_t* aResult)
|
||||
{
|
||||
*aResult = 0;
|
||||
|
||||
|
@ -187,9 +187,9 @@ nsSeamonkeyProfileMigrator::GetSourceProfiles(nsIArray** aResult)
|
|||
nsresult
|
||||
nsSeamonkeyProfileMigrator::GetSourceProfile(const PRUnichar* aProfile)
|
||||
{
|
||||
PRUint32 count;
|
||||
uint32_t count;
|
||||
mProfileNames->GetLength(&count);
|
||||
for (PRUint32 i = 0; i < count; ++i) {
|
||||
for (uint32_t i = 0; i < count; ++i) {
|
||||
nsCOMPtr<nsISupportsString> str(do_QueryElementAt(mProfileNames, i));
|
||||
nsString profileName;
|
||||
str->GetData(profileName);
|
||||
|
@ -346,7 +346,7 @@ nsSeamonkeyProfileMigrator::TransformPreferences(const nsAString& aSourcePrefFil
|
|||
|
||||
// read in the various pref branch trees for accounts, identities, servers, etc.
|
||||
PBStructArray branches[NS_ARRAY_LENGTH(branchNames)];
|
||||
PRUint32 i;
|
||||
uint32_t i;
|
||||
for (i = 0; i < NS_ARRAY_LENGTH(branchNames); ++i)
|
||||
ReadBranch(branchNames[i], psvc, branches[i]);
|
||||
|
||||
|
@ -392,8 +392,8 @@ nsSeamonkeyProfileMigrator::CopyAddressBookDirectories(PBStructArray &aLdapServe
|
|||
index.AppendInt(nsIMailProfileMigrator::ADDRESSBOOK_DATA);
|
||||
NOTIFY_OBSERVERS(MIGRATION_ITEMBEFOREMIGRATE, index.get());
|
||||
|
||||
PRUint32 count = aLdapServers.Length();
|
||||
for (PRUint32 i = 0; i < count; ++i)
|
||||
uint32_t count = aLdapServers.Length();
|
||||
for (uint32_t i = 0; i < count; ++i)
|
||||
{
|
||||
PrefBranchStruct* pref = aLdapServers.ElementAt(i);
|
||||
nsDependentCString prefName(pref->prefName);
|
||||
|
@ -418,8 +418,8 @@ nsSeamonkeyProfileMigrator::CopySignatureFiles(PBStructArray &aIdentities,
|
|||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
PRUint32 count = aIdentities.Length();
|
||||
for (PRUint32 i = 0; i < count; ++i)
|
||||
uint32_t count = aIdentities.Length();
|
||||
for (uint32_t i = 0; i < count; ++i)
|
||||
{
|
||||
PrefBranchStruct* pref = aIdentities.ElementAt(i);
|
||||
nsDependentCString prefName(pref->prefName);
|
||||
|
@ -473,8 +473,8 @@ nsSeamonkeyProfileMigrator::CopyMailFolders(PBStructArray &aMailServers,
|
|||
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
PRUint32 count = aMailServers.Length();
|
||||
for (PRUint32 i = 0; i < count; ++i)
|
||||
uint32_t count = aMailServers.Length();
|
||||
for (uint32_t i = 0; i < count; ++i)
|
||||
{
|
||||
PrefBranchStruct* pref = aMailServers.ElementAt(i);
|
||||
nsDependentCString prefName(pref->prefName);
|
||||
|
@ -642,16 +642,16 @@ nsSeamonkeyProfileMigrator::ReadBranch(const char *branchName,
|
|||
nsCOMPtr<nsIPrefBranch> branch;
|
||||
aPrefService->GetBranch(branchName, getter_AddRefs(branch));
|
||||
|
||||
PRUint32 count;
|
||||
uint32_t count;
|
||||
char** prefs = nullptr;
|
||||
nsresult rv = branch->GetChildList("", &count, &prefs);
|
||||
if (NS_FAILED(rv))
|
||||
return;
|
||||
|
||||
for (PRUint32 i = 0; i < count; ++i) {
|
||||
for (uint32_t i = 0; i < count; ++i) {
|
||||
// Save each pref's value into an array
|
||||
char* currPref = prefs[i];
|
||||
PRInt32 type;
|
||||
int32_t type;
|
||||
branch->GetPrefType(currPref, &type);
|
||||
PrefBranchStruct* pref = new PrefBranchStruct;
|
||||
pref->prefName = currPref;
|
||||
|
@ -688,8 +688,8 @@ nsSeamonkeyProfileMigrator::WriteBranch(const char *branchName,
|
|||
nsCOMPtr<nsIPrefBranch> branch;
|
||||
aPrefService->GetBranch(branchName, getter_AddRefs(branch));
|
||||
|
||||
PRUint32 count = aPrefs.Length();
|
||||
for (PRUint32 i = 0; i < count; ++i) {
|
||||
uint32_t count = aPrefs.Length();
|
||||
for (uint32_t i = 0; i < count; ++i) {
|
||||
PrefBranchStruct* pref = aPrefs.ElementAt(i);
|
||||
switch (pref->type) {
|
||||
case nsIPrefBranch::PREF_STRING:
|
||||
|
|
|
@ -22,10 +22,10 @@ public:
|
|||
virtual ~nsSeamonkeyProfileMigrator();
|
||||
|
||||
// nsIMailProfileMigrator methods
|
||||
NS_IMETHOD Migrate(PRUint16 aItems, nsIProfileStartup* aStartup,
|
||||
NS_IMETHOD Migrate(uint16_t aItems, nsIProfileStartup* aStartup,
|
||||
const PRUnichar* aProfile);
|
||||
NS_IMETHOD GetMigrateData(const PRUnichar* aProfile, bool aReplace,
|
||||
PRUint16* aResult);
|
||||
uint16_t* aResult);
|
||||
NS_IMETHOD GetSourceProfiles(nsIArray** aResult);
|
||||
|
||||
protected:
|
||||
|
|
|
@ -74,7 +74,7 @@ NS_IMETHODIMP nsMailWinSearchHelper::GetFoldersInCrawlScope(bool* aResult)
|
|||
return NS_ERROR_FAILURE;
|
||||
|
||||
// We need to create appropriate URLs to check with the crawl scope manager.
|
||||
for (PRUint32 i = 0; i < NS_ARRAY_LENGTH(sFoldersToIndex); i++)
|
||||
for (uint32_t i = 0; i < NS_ARRAY_LENGTH(sFoldersToIndex); i++)
|
||||
{
|
||||
nsCOMPtr<nsIFile> subdir;
|
||||
rv = mProfD->Clone(getter_AddRefs(subdir));
|
||||
|
|
|
@ -40,7 +40,7 @@ static const char* const sFeedProtocols[] = {
|
|||
};
|
||||
|
||||
struct AppTypeAssociation {
|
||||
PRUint16 type;
|
||||
uint16_t type;
|
||||
const char * const *protocols;
|
||||
const char *mimeType;
|
||||
const char *extensions;
|
||||
|
@ -121,7 +121,7 @@ nsMailGNOMEIntegration::GetAppPathFromLauncher()
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsMailGNOMEIntegration::IsDefaultClient(bool aStartupCheck, PRUint16 aApps, bool * aIsDefaultClient)
|
||||
nsMailGNOMEIntegration::IsDefaultClient(bool aStartupCheck, uint16_t aApps, bool * aIsDefaultClient)
|
||||
{
|
||||
*aIsDefaultClient = true;
|
||||
|
||||
|
@ -140,7 +140,7 @@ nsMailGNOMEIntegration::IsDefaultClient(bool aStartupCheck, PRUint16 aApps, bool
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsMailGNOMEIntegration::SetDefaultClient(bool aForAllUsers, PRUint16 aApps)
|
||||
nsMailGNOMEIntegration::SetDefaultClient(bool aForAllUsers, uint16_t aApps)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
for (unsigned int i = 0; i < NS_ARRAY_LENGTH(sAppTypes); i++) {
|
||||
|
|
|
@ -31,7 +31,7 @@ nsMailMacIntegration::nsMailMacIntegration(): mCheckedThisSession(false)
|
|||
{}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsMailMacIntegration::IsDefaultClient(bool aStartupCheck, PRUint16 aApps, bool * aIsDefaultClient)
|
||||
nsMailMacIntegration::IsDefaultClient(bool aStartupCheck, uint16_t aApps, bool * aIsDefaultClient)
|
||||
{
|
||||
*aIsDefaultClient = true;
|
||||
if (aApps & nsIShellService::MAIL)
|
||||
|
@ -51,7 +51,7 @@ nsMailMacIntegration::IsDefaultClient(bool aStartupCheck, PRUint16 aApps, bool *
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsMailMacIntegration::SetDefaultClient(bool aForAllUsers, PRUint16 aApps)
|
||||
nsMailMacIntegration::SetDefaultClient(bool aForAllUsers, uint16_t aApps)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
if (aApps & nsIShellService::MAIL)
|
||||
|
|
|
@ -254,7 +254,7 @@ nsWindowsShellService::nsWindowsShellService()
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWindowsShellService::IsDefaultClient(bool aStartupCheck, PRUint16 aApps, bool *aIsDefaultClient)
|
||||
nsWindowsShellService::IsDefaultClient(bool aStartupCheck, uint16_t aApps, bool *aIsDefaultClient)
|
||||
{
|
||||
// If this is the first mail window, maintain internal state that we've
|
||||
// checked this session (so that subsequent window opens don't show the
|
||||
|
@ -291,7 +291,7 @@ nsWindowsShellService::IsDefaultClient(bool aStartupCheck, PRUint16 aApps, bool
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWindowsShellService::SetDefaultClient(bool aForAllUsers, PRUint16 aApps)
|
||||
nsWindowsShellService::SetDefaultClient(bool aForAllUsers, uint16_t aApps)
|
||||
{
|
||||
nsAutoString appHelperPath;
|
||||
if (NS_FAILED(GetHelperPath(appHelperPath)))
|
||||
|
@ -337,7 +337,7 @@ nsWindowsShellService::SetShouldCheckDefaultClient(bool aShouldCheck)
|
|||
|
||||
/* helper routine. Iterate over the passed in settings object. */
|
||||
bool
|
||||
nsWindowsShellService::TestForDefault(SETTING aSettings[], PRInt32 aSize)
|
||||
nsWindowsShellService::TestForDefault(SETTING aSettings[], int32_t aSize)
|
||||
{
|
||||
bool isDefault = true;
|
||||
PRUnichar currValue[MAX_BUF];
|
||||
|
@ -349,7 +349,7 @@ nsWindowsShellService::TestForDefault(SETTING aSettings[], PRInt32 aSize)
|
|||
NS_ConvertUTF8toUTF16 value(settings->valueName);
|
||||
if (settings->flags & APP_PATH_SUBSTITUTION)
|
||||
{
|
||||
PRInt32 offset = dataLongPath.Find("%APPPATH%");
|
||||
int32_t offset = dataLongPath.Find("%APPPATH%");
|
||||
dataLongPath.Replace(offset, 9, mAppLongPath);
|
||||
}
|
||||
|
||||
|
@ -381,7 +381,7 @@ nsWindowsShellService::TestForDefault(SETTING aSettings[], PRInt32 aSize)
|
|||
}
|
||||
|
||||
bool
|
||||
nsWindowsShellService::IsDefaultClientVista(PRUint16 aApps, bool* aIsDefaultClient)
|
||||
nsWindowsShellService::IsDefaultClientVista(uint16_t aApps, bool* aIsDefaultClient)
|
||||
{
|
||||
IApplicationAssociationRegistration* pAAR;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ typedef struct {
|
|||
char* valueName;
|
||||
char* valueData;
|
||||
|
||||
PRInt32 flags;
|
||||
int32_t flags;
|
||||
} SETTING;
|
||||
|
||||
class nsWindowsShellService : public nsIWindowsShellService
|
||||
|
@ -36,8 +36,8 @@ public:
|
|||
NS_DECL_NSIWINDOWSSHELLSERVICE
|
||||
|
||||
protected:
|
||||
bool TestForDefault(SETTING aSettings[], PRInt32 aSize);
|
||||
bool IsDefaultClientVista(PRUint16 aApps, bool* aIsDefaultClient);
|
||||
bool TestForDefault(SETTING aSettings[], int32_t aSize);
|
||||
bool IsDefaultClientVista(uint16_t aApps, bool* aIsDefaultClient);
|
||||
|
||||
private:
|
||||
bool mCheckedThisSession;
|
||||
|
|
|
@ -20,7 +20,7 @@ interface nsIAbLDAPProcessReplicationData : nsISupports
|
|||
/**
|
||||
* readonly attribute giving the current replication state
|
||||
*/
|
||||
readonly attribute PRInt32 replicationState;
|
||||
readonly attribute int32_t replicationState;
|
||||
|
||||
/**
|
||||
* replication states
|
||||
|
@ -41,7 +41,7 @@ interface nsIAbLDAPProcessReplicationData : nsISupports
|
|||
/**
|
||||
* readonly attribute giving the current protocol used
|
||||
*/
|
||||
readonly attribute PRInt32 protocolUsed ;
|
||||
readonly attribute int32_t protocolUsed ;
|
||||
|
||||
/**
|
||||
* replication protocols
|
||||
|
|
|
@ -57,7 +57,7 @@ interface nsIAbLDAPChangeLogQuery : nsISupports
|
|||
/**
|
||||
* Starts an LDAP ChangeLog query to find changelog entries
|
||||
*/
|
||||
void queryChangeLog(in AUTF8String aChangeLogDN, in PRInt32 aLastChangeNo);
|
||||
void queryChangeLog(in AUTF8String aChangeLogDN, in int32_t aLastChangeNo);
|
||||
|
||||
/**
|
||||
* Starts an LDAP query to find changed entries
|
||||
|
|
|
@ -198,7 +198,7 @@ interface nsIAddrDatabase : nsIAddrDBAnnouncer {
|
|||
|
||||
boolean findMailListbyUnicodeName(in wstring listName);
|
||||
|
||||
void getCardCount(out PRUint32 count);
|
||||
void getCardCount(out uint32_t count);
|
||||
|
||||
[noscript] readonly attribute nsIMdbRow newRow;
|
||||
[noscript] readonly attribute nsIMdbRow newListRow;
|
||||
|
@ -306,6 +306,6 @@ interface nsIAddrDatabase : nsIAddrDBAnnouncer {
|
|||
in nsIAbDirectory aParent,
|
||||
in nsIAbDirectory aRoot);
|
||||
void InitCardFromRow(in nsIAbCard aNewCard,in nsIMdbRow aCardRow);
|
||||
void SetListAddressTotal(in nsIMdbRow aListRow, in PRUint32 aTotal);
|
||||
void SetListAddressTotal(in nsIMdbRow aListRow, in uint32_t aTotal);
|
||||
nsIMdbRow FindRowByCard(in nsIAbCard aCard);
|
||||
};
|
||||
|
|
|
@ -83,7 +83,7 @@ nsAbAddressCollector::GetCardFromProperty(const char *aName,
|
|||
NS_IMETHODIMP
|
||||
nsAbAddressCollector::CollectAddress(const nsACString &aAddresses,
|
||||
bool aCreateCard,
|
||||
PRUint32 aSendFormat)
|
||||
uint32_t aSendFormat)
|
||||
{
|
||||
// If we've not got a valid directory, no point in going any further
|
||||
if (!mDirectory)
|
||||
|
@ -91,7 +91,7 @@ nsAbAddressCollector::CollectAddress(const nsACString &aAddresses,
|
|||
|
||||
// note that we're now setting the whole recipient list,
|
||||
// not just the pretty name of the first recipient.
|
||||
PRUint32 numAddresses;
|
||||
uint32_t numAddresses;
|
||||
char *names;
|
||||
char *addresses;
|
||||
|
||||
|
@ -108,7 +108,7 @@ nsAbAddressCollector::CollectAddress(const nsACString &aAddresses,
|
|||
char *curNamePtr = names;
|
||||
char *curAddressPtr = addresses;
|
||||
|
||||
for (PRUint32 i = 0; i < numAddresses; i++)
|
||||
for (uint32_t i = 0; i < numAddresses; i++)
|
||||
{
|
||||
nsDependentCString curAddress(curAddressPtr);
|
||||
curAddressPtr += curAddress.Length() + 1;
|
||||
|
@ -140,7 +140,7 @@ NS_IMETHODIMP
|
|||
nsAbAddressCollector::CollectSingleAddress(const nsACString &aEmail,
|
||||
const nsACString &aDisplayName,
|
||||
bool aCreateCard,
|
||||
PRUint32 aSendFormat,
|
||||
uint32_t aSendFormat,
|
||||
bool aSkipCheckExisting)
|
||||
{
|
||||
if (!mDirectory)
|
||||
|
@ -208,7 +208,7 @@ nsAbAddressCollector::CollectSingleAddress(const nsACString &aEmail,
|
|||
|
||||
if (aSendFormat != nsIAbPreferMailFormat::unknown)
|
||||
{
|
||||
PRUint32 currentFormat;
|
||||
uint32_t currentFormat;
|
||||
rv = card->GetPropertyAsUint32(kPreferMailFormatProperty,
|
||||
¤tFormat);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to get preferred mail format");
|
||||
|
@ -235,7 +235,7 @@ nsAbAddressCollector::AutoCollectScreenName(nsIAbCard *aCard,
|
|||
if (!aCard)
|
||||
return;
|
||||
|
||||
PRInt32 atPos = aEmail.FindChar('@');
|
||||
int32_t atPos = aEmail.FindChar('@');
|
||||
if (atPos == -1)
|
||||
return;
|
||||
|
||||
|
|
|
@ -111,8 +111,8 @@ nsresult nsAbBSDirectory::EnsureInitialized()
|
|||
if (!directories)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
PRInt32 count = directories->Count();
|
||||
for (PRInt32 i = 0; i < count; i++)
|
||||
int32_t count = directories->Count();
|
||||
for (int32_t i = 0; i < count; i++)
|
||||
{
|
||||
DIR_Server *server = (DIR_Server *)(directories->ElementAt(i));
|
||||
|
||||
|
@ -122,7 +122,7 @@ nsresult nsAbBSDirectory::EnsureInitialized()
|
|||
// note, the filename might be na2 for 4.x LDAP directories
|
||||
// (we used the .na2 file for replication), and we don't want to skip
|
||||
// those. see bug #127007
|
||||
PRUint32 fileNameLen = strlen(server->fileName);
|
||||
uint32_t fileNameLen = strlen(server->fileName);
|
||||
if (((fileNameLen > kABFileName_PreviousSuffixLen) &&
|
||||
strcmp(server->fileName + fileNameLen - kABFileName_PreviousSuffixLen,
|
||||
kABFileName_PreviousSuffix) == 0) &&
|
||||
|
@ -164,7 +164,7 @@ nsresult nsAbBSDirectory::EnsureInitialized()
|
|||
|
||||
NS_IMETHODIMP nsAbBSDirectory::CreateNewDirectory(const nsAString &aDirName,
|
||||
const nsACString &aURI,
|
||||
PRUint32 aType,
|
||||
uint32_t aType,
|
||||
const nsACString &aPrefName,
|
||||
nsACString &aResult)
|
||||
{
|
||||
|
@ -271,11 +271,11 @@ NS_IMETHODIMP nsAbBSDirectory::DeleteDirectory(nsIAbDirectory *directory)
|
|||
do_GetService(NS_ABDIRFACTORYSERVICE_CONTRACTID,&rv);
|
||||
NS_ENSURE_SUCCESS (rv, rv);
|
||||
|
||||
PRUint32 count = getDirectories.directories.Count();
|
||||
uint32_t count = getDirectories.directories.Count();
|
||||
|
||||
nsCOMPtr<nsIAbManager> abManager = do_GetService(NS_ABMANAGER_CONTRACTID);
|
||||
|
||||
for (PRUint32 i = 0; i < count; i++) {
|
||||
for (uint32_t i = 0; i < count; i++) {
|
||||
nsCOMPtr<nsIAbDirectory> d = getDirectories.directories[i];
|
||||
|
||||
mServers.Remove(d);
|
||||
|
|
|
@ -25,7 +25,7 @@ public:
|
|||
NS_IMETHOD GetChildNodes(nsISimpleEnumerator* *result);
|
||||
NS_IMETHOD CreateNewDirectory(const nsAString &aDirName,
|
||||
const nsACString &aURI,
|
||||
PRUint32 aType,
|
||||
uint32_t aType,
|
||||
const nsACString &aPrefName,
|
||||
nsACString &aResult);
|
||||
NS_IMETHOD CreateDirectoryByURI(const nsAString &aDisplayName,
|
||||
|
|
|
@ -36,7 +36,7 @@ nsresult nsAbBoolExprToLDAPFilter::FilterExpression (
|
|||
nsresult rv = expression->GetExpressions(getter_AddRefs(childExpressions));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRUint32 count;
|
||||
uint32_t count;
|
||||
rv = childExpressions->GetLength(&count);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -104,13 +104,13 @@ nsresult nsAbBoolExprToLDAPFilter::FilterExpressions (
|
|||
nsCString& filter,
|
||||
int flags)
|
||||
{
|
||||
PRUint32 count;
|
||||
uint32_t count;
|
||||
nsresult rv = expressions->GetLength(&count);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIAbBooleanConditionString> childCondition;
|
||||
nsCOMPtr<nsIAbBooleanExpression> childExpression;
|
||||
for (PRUint32 i = 0; i < count; i++)
|
||||
for (uint32_t i = 0; i < count; i++)
|
||||
{
|
||||
childCondition = do_QueryElementAt(expressions, i, &rv);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
|
|
|
@ -270,7 +270,7 @@ NS_IMETHODIMP nsAbCardProperty::GetPropertyAsAUTF8String(const char *name, nsACS
|
|||
variant->GetAsAUTF8String(value) : NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbCardProperty::GetPropertyAsUint32(const char *name, PRUint32 *value)
|
||||
NS_IMETHODIMP nsAbCardProperty::GetPropertyAsUint32(const char *name, uint32_t *value)
|
||||
{
|
||||
nsCOMPtr<nsIVariant> variant;
|
||||
return m_properties.Get(nsDependentCString(name), getter_AddRefs(variant)) ?
|
||||
|
@ -306,7 +306,7 @@ NS_IMETHODIMP nsAbCardProperty::SetPropertyAsAUTF8String(const char *name, const
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbCardProperty::SetPropertyAsUint32(const char *name, PRUint32 value)
|
||||
NS_IMETHODIMP nsAbCardProperty::SetPropertyAsUint32(const char *name, uint32_t value)
|
||||
{
|
||||
nsCOMPtr<nsIWritableVariant> variant = do_CreateInstance(NS_VARIANT_CONTRACTID);
|
||||
variant->SetAsUint32(value);
|
||||
|
@ -667,7 +667,7 @@ nsresult nsAbCardProperty::ConvertToEscapedVCard(nsACString &aResult)
|
|||
myAddPropValue(vObj, VCNoteProp, str.get(), &vCardHasData);
|
||||
}
|
||||
|
||||
PRUint32 format;
|
||||
uint32_t format;
|
||||
rv = GetPropertyAsUint32(kPreferMailFormatProperty, &format);
|
||||
if (NS_SUCCEEDED(rv) && format == nsIAbPreferMailFormat::html) {
|
||||
myAddPropValue(vObj, VCUseHTML, NS_LITERAL_STRING("TRUE").get(), &vCardHasData);
|
||||
|
@ -745,7 +745,7 @@ nsresult nsAbCardProperty::ConvertToXMLPrintData(nsAString &aXMLSubstr)
|
|||
nsCOMPtr<nsIPrefBranch> prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
|
||||
PRInt32 generatedNameFormat;
|
||||
int32_t generatedNameFormat;
|
||||
rv = prefBranch->GetIntPref(PREF_MAIL_ADDR_BOOK_LASTNAMEFIRST, &generatedNameFormat);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -825,10 +825,10 @@ nsresult nsAbCardProperty::ConvertToXMLPrintData(nsAString &aXMLSubstr)
|
|||
nsCOMPtr<nsIMutableArray> addresses;
|
||||
rv = mailList->GetAddressLists(getter_AddRefs(addresses));
|
||||
if (addresses) {
|
||||
PRUint32 total = 0;
|
||||
uint32_t total = 0;
|
||||
addresses->GetLength(&total);
|
||||
if (total) {
|
||||
PRUint32 i;
|
||||
uint32_t i;
|
||||
nsAutoString displayName;
|
||||
nsAutoString primaryEmail;
|
||||
for (i = 0; i < total; i++) {
|
||||
|
@ -876,7 +876,7 @@ nsresult nsAbCardProperty::ConvertToXMLPrintData(nsAString &aXMLSubstr)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsAbCardProperty::AppendSection(const AppendItem *aArray, PRInt16 aCount, const nsString& aHeading,
|
||||
nsresult nsAbCardProperty::AppendSection(const AppendItem *aArray, int16_t aCount, const nsString& aHeading,
|
||||
nsIStringBundle *aBundle,
|
||||
mozITXTToHTMLConv *aConv,
|
||||
nsString &aResult)
|
||||
|
@ -888,7 +888,7 @@ nsresult nsAbCardProperty::AppendSection(const AppendItem *aArray, PRInt16 aCoun
|
|||
nsString attrValue;
|
||||
bool sectionIsEmpty = true;
|
||||
|
||||
PRInt16 i = 0;
|
||||
int16_t i = 0;
|
||||
for (i=0;i<aCount;i++) {
|
||||
rv = GetPropertyAsAString(aArray[i].mColumn, attrValue);
|
||||
if (NS_SUCCEEDED(rv) && !attrValue.IsEmpty())
|
||||
|
@ -1059,7 +1059,7 @@ nsresult nsAbCardProperty::AppendCityStateZip(const AppendItem &aItem,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbCardProperty::GenerateName(PRInt32 aGenerateFormat,
|
||||
NS_IMETHODIMP nsAbCardProperty::GenerateName(int32_t aGenerateFormat,
|
||||
nsIStringBundle* aBundle,
|
||||
nsAString &aResult)
|
||||
{
|
||||
|
@ -1128,7 +1128,7 @@ NS_IMETHODIMP nsAbCardProperty::GenerateName(PRInt32 aGenerateFormat,
|
|||
// use the userid from the email address
|
||||
// it is better than nothing.
|
||||
GetPrimaryEmail(aResult);
|
||||
PRInt32 index = aResult.FindChar('@');
|
||||
int32_t index = aResult.FindChar('@');
|
||||
if (index != -1)
|
||||
aResult.SetLength(index);
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ protected:
|
|||
|
||||
nsCString m_directoryId, m_localId;
|
||||
private:
|
||||
nsresult AppendSection(const AppendItem *aArray, PRInt16 aCount, const nsString& aHeading, nsIStringBundle *aBundle, mozITXTToHTMLConv *aConv, nsString &aResult);
|
||||
nsresult AppendSection(const AppendItem *aArray, int16_t aCount, const nsString& aHeading, nsIStringBundle *aBundle, mozITXTToHTMLConv *aConv, nsString &aResult);
|
||||
nsresult AppendLine(const AppendItem &aItem, mozITXTToHTMLConv *aConv, nsString &aResult);
|
||||
nsresult AppendLabel(const AppendItem &aItem, nsIStringBundle *aBundle, mozITXTToHTMLConv *aConv, nsString &aResult);
|
||||
nsresult AppendCityStateZip(const AppendItem &aItem, nsIStringBundle *aBundle, mozITXTToHTMLConv *aConv, nsString &aResult);
|
||||
|
|
|
@ -130,7 +130,7 @@ nsAbContentHandler::HandleContent(const char *aContentType,
|
|||
NS_IMETHODIMP
|
||||
nsAbContentHandler::OnStreamComplete(nsIStreamLoader *aLoader,
|
||||
nsISupports *aContext, nsresult aStatus,
|
||||
PRUint32 datalen, const PRUint8 *data)
|
||||
uint32_t datalen, const uint8_t *data)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aContext);
|
||||
NS_ENSURE_SUCCESS(aStatus, aStatus); // don't process the vcard if we got a status error
|
||||
|
@ -143,7 +143,7 @@ nsAbContentHandler::OnStreamComplete(nsIStreamLoader *aLoader,
|
|||
nsAutoPtr<VObject> vObj(vCardService->Parse_MIME((const char *)data, datalen));
|
||||
if (vObj)
|
||||
{
|
||||
PRInt32 len = 0;
|
||||
int32_t len = 0;
|
||||
nsCString vCard;
|
||||
vCard.Adopt(vCardService->WriteMemoryVObjects(0, &len, vObj, false));
|
||||
|
||||
|
|
|
@ -31,11 +31,11 @@ nsAbDirProperty::~nsAbDirProperty(void)
|
|||
// this code causes a regression #138647
|
||||
// don't turn it on until you figure it out
|
||||
if (m_AddressList) {
|
||||
PRUint32 count;
|
||||
uint32_t count;
|
||||
nsresult rv;
|
||||
rv = m_AddressList->GetLength(&count);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "Count failed");
|
||||
PRInt32 i;
|
||||
int32_t i;
|
||||
for (i = count - 1; i >= 0; i--)
|
||||
m_AddressList->RemoveElementAt(i);
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ NS_IMETHODIMP nsAbDirProperty::GetUuid(nsACString &uuid)
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbDirProperty::GenerateName(PRInt32 aGenerateFormat,
|
||||
NS_IMETHODIMP nsAbDirProperty::GenerateName(int32_t aGenerateFormat,
|
||||
nsIStringBundle *aBundle,
|
||||
nsAString &name)
|
||||
{
|
||||
|
@ -136,7 +136,7 @@ NS_IMETHODIMP nsAbDirProperty::SetDirName(const nsAString &aDirName)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbDirProperty::GetDirType(PRInt32 *aDirType)
|
||||
NS_IMETHODIMP nsAbDirProperty::GetDirType(int32_t *aDirType)
|
||||
{
|
||||
return GetIntValue("dirType", LDAPDirectory, aDirType);
|
||||
}
|
||||
|
@ -152,19 +152,19 @@ NS_IMETHODIMP nsAbDirProperty::GetURI(nsACString &aURI)
|
|||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbDirProperty::GetPosition(PRInt32 *aPosition)
|
||||
NS_IMETHODIMP nsAbDirProperty::GetPosition(int32_t *aPosition)
|
||||
{
|
||||
return GetIntValue("position", kDefaultPosition, aPosition);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbDirProperty::GetLastModifiedDate(PRUint32 *aLastModifiedDate)
|
||||
NS_IMETHODIMP nsAbDirProperty::GetLastModifiedDate(uint32_t *aLastModifiedDate)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aLastModifiedDate);
|
||||
*aLastModifiedDate = m_LastModifiedDate;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbDirProperty::SetLastModifiedDate(PRUint32 aLastModifiedDate)
|
||||
NS_IMETHODIMP nsAbDirProperty::SetLastModifiedDate(uint32_t aLastModifiedDate)
|
||||
{
|
||||
if (aLastModifiedDate)
|
||||
{
|
||||
|
@ -263,7 +263,7 @@ nsAbDirProperty::Init(const char *aURI)
|
|||
mURI = aURI;
|
||||
mIsValidURI = true;
|
||||
|
||||
PRInt32 searchCharLocation = mURINoQuery.FindChar('?');
|
||||
int32_t searchCharLocation = mURINoQuery.FindChar('?');
|
||||
if (searchCharLocation >= 0)
|
||||
{
|
||||
mQueryString = Substring(mURINoQuery, searchCharLocation + 1);
|
||||
|
@ -298,7 +298,7 @@ nsAbDirProperty::HasDirectory(nsIAbDirectory *dir, bool *hasDir)
|
|||
NS_IMETHODIMP
|
||||
nsAbDirProperty::CreateNewDirectory(const nsAString &aDirName,
|
||||
const nsACString &aURI,
|
||||
PRUint32 aType,
|
||||
uint32_t aType,
|
||||
const nsACString &aPrefName,
|
||||
nsACString &aResult)
|
||||
{ return NS_ERROR_NOT_IMPLEMENTED; }
|
||||
|
@ -423,8 +423,8 @@ nsresult nsAbDirProperty::InitDirectoryPrefs()
|
|||
}
|
||||
|
||||
NS_IMETHODIMP nsAbDirProperty::GetIntValue(const char *aName,
|
||||
PRInt32 aDefaultValue,
|
||||
PRInt32 *aResult)
|
||||
int32_t aDefaultValue,
|
||||
int32_t *aResult)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aResult);
|
||||
|
||||
|
@ -505,7 +505,7 @@ NS_IMETHODIMP nsAbDirProperty::GetLocalizedStringValue(const char *aName,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP nsAbDirProperty::SetIntValue(const char *aName,
|
||||
PRInt32 aValue)
|
||||
int32_t aValue)
|
||||
{
|
||||
if (!m_DirectoryPrefs && NS_FAILED(InitDirectoryPrefs()))
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
|
|
|
@ -44,7 +44,7 @@ protected:
|
|||
*/
|
||||
nsresult InitDirectoryPrefs();
|
||||
|
||||
PRUint32 m_LastModifiedDate;
|
||||
uint32_t m_LastModifiedDate;
|
||||
|
||||
nsString m_ListDirName;
|
||||
nsString m_ListName;
|
||||
|
|
|
@ -71,13 +71,13 @@ NS_IMETHODIMP nsAbDirectoryQuerySimpleBooleanExpression::SetExpressions(nsIArray
|
|||
|
||||
// Ensure all the items are of the right type.
|
||||
nsresult rv;
|
||||
PRUint32 count;
|
||||
uint32_t count;
|
||||
rv = aExpressions->GetLength(&count);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIAbBooleanConditionString> queryExpression;
|
||||
|
||||
for (PRUint32 i = 0; i < count; ++i)
|
||||
for (uint32_t i = 0; i < count; ++i)
|
||||
{
|
||||
queryExpression = do_QueryElementAt(aExpressions, i, &rv);
|
||||
if (NS_FAILED(rv))
|
||||
|
@ -212,8 +212,8 @@ nsAbDirectoryQuery::~nsAbDirectoryQuery()
|
|||
NS_IMETHODIMP nsAbDirectoryQuery::DoQuery(nsIAbDirectory *aDirectory,
|
||||
nsIAbDirectoryQueryArguments* arguments,
|
||||
nsIAbDirSearchListener* listener,
|
||||
PRInt32 resultLimit, PRInt32 timeOut,
|
||||
PRInt32* _retval)
|
||||
int32_t resultLimit, int32_t timeOut,
|
||||
int32_t* _retval)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aDirectory);
|
||||
|
||||
|
@ -237,7 +237,7 @@ NS_IMETHODIMP nsAbDirectoryQuery::DoQuery(nsIAbDirectory *aDirectory,
|
|||
}
|
||||
|
||||
/* void stopQuery (in long contextID); */
|
||||
NS_IMETHODIMP nsAbDirectoryQuery::StopQuery(PRInt32 contextID)
|
||||
NS_IMETHODIMP nsAbDirectoryQuery::StopQuery(int32_t contextID)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -247,7 +247,7 @@ nsresult nsAbDirectoryQuery::query(nsIAbDirectory* directory,
|
|||
nsIAbBooleanExpression* expression,
|
||||
nsIAbDirSearchListener* listener,
|
||||
bool doSubDirectories,
|
||||
PRInt32* resultLimit)
|
||||
int32_t* resultLimit)
|
||||
{
|
||||
if (*resultLimit == 0)
|
||||
return NS_OK;
|
||||
|
@ -269,7 +269,7 @@ nsresult nsAbDirectoryQuery::queryChildren(nsIAbDirectory* directory,
|
|||
nsIAbBooleanExpression* expression,
|
||||
nsIAbDirSearchListener* listener,
|
||||
bool doSubDirectories,
|
||||
PRInt32* resultLimit)
|
||||
int32_t* resultLimit)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
|
@ -297,7 +297,7 @@ nsresult nsAbDirectoryQuery::queryChildren(nsIAbDirectory* directory,
|
|||
nsresult nsAbDirectoryQuery::queryCards(nsIAbDirectory* directory,
|
||||
nsIAbBooleanExpression* expression,
|
||||
nsIAbDirSearchListener* listener,
|
||||
PRInt32* resultLimit)
|
||||
int32_t* resultLimit)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
|
@ -337,7 +337,7 @@ nsresult nsAbDirectoryQuery::queryCards(nsIAbDirectory* directory,
|
|||
nsresult nsAbDirectoryQuery::matchCard(nsIAbCard* card,
|
||||
nsIAbBooleanExpression* expression,
|
||||
nsIAbDirSearchListener* listener,
|
||||
PRInt32* resultLimit)
|
||||
int32_t* resultLimit)
|
||||
{
|
||||
bool matchFound = false;
|
||||
nsresult rv = matchCardExpression(card, expression, &matchFound);
|
||||
|
@ -365,7 +365,7 @@ nsresult nsAbDirectoryQuery::matchCardExpression(nsIAbCard* card,
|
|||
rv = expression->GetExpressions (getter_AddRefs (childExpressions));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRUint32 count;
|
||||
uint32_t count;
|
||||
rv = childExpressions->GetLength(&count);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -377,7 +377,7 @@ nsresult nsAbDirectoryQuery::matchCardExpression(nsIAbCard* card,
|
|||
nsCOMPtr<nsIAbBooleanConditionString> childCondition;
|
||||
nsCOMPtr<nsIAbBooleanExpression> childExpression;
|
||||
|
||||
for (PRUint32 i = 0; i < count; i++)
|
||||
for (uint32_t i = 0; i < count; i++)
|
||||
{
|
||||
childCondition = do_QueryElementAt(childExpressions, i, &rv);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
|
|
|
@ -78,20 +78,20 @@ protected:
|
|||
nsIAbBooleanExpression* expression,
|
||||
nsIAbDirSearchListener* listener,
|
||||
bool doSubDirectories,
|
||||
PRInt32* resultLimit);
|
||||
int32_t* resultLimit);
|
||||
nsresult queryChildren(nsIAbDirectory* directory,
|
||||
nsIAbBooleanExpression* expression,
|
||||
nsIAbDirSearchListener* listener,
|
||||
bool doSubDirectories,
|
||||
PRInt32* resultLimit);
|
||||
int32_t* resultLimit);
|
||||
nsresult queryCards(nsIAbDirectory* directory,
|
||||
nsIAbBooleanExpression* expression,
|
||||
nsIAbDirSearchListener* listener,
|
||||
PRInt32* resultLimit);
|
||||
int32_t* resultLimit);
|
||||
nsresult matchCard(nsIAbCard* card,
|
||||
nsIAbBooleanExpression* expression,
|
||||
nsIAbDirSearchListener* listener,
|
||||
PRInt32* resultLimit);
|
||||
int32_t* resultLimit);
|
||||
nsresult matchCardExpression(nsIAbCard* card,
|
||||
nsIAbBooleanExpression* expression,
|
||||
bool* result);
|
||||
|
|
|
@ -126,11 +126,11 @@ nsAbLDAPAutoCompFormatter::Format(nsILDAPMessage *aMsg,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAbLDAPAutoCompFormatter::FormatException(PRInt32 aState,
|
||||
nsAbLDAPAutoCompFormatter::FormatException(int32_t aState,
|
||||
nsresult aErrorCode,
|
||||
nsIAutoCompleteItem **aItem)
|
||||
{
|
||||
PRInt32 errorKey;
|
||||
int32_t errorKey;
|
||||
nsresult rv;
|
||||
|
||||
// create an nsIAutoCompleteItem to hold the returned value
|
||||
|
@ -223,8 +223,8 @@ nsAbLDAPAutoCompFormatter::FormatException(PRInt32 aState,
|
|||
|
||||
// figure out the key to index into the string bundle
|
||||
//
|
||||
const PRInt32 HOST_NOT_FOUND_ERROR=5000;
|
||||
const PRInt32 GENERIC_ERROR=9999;
|
||||
const int32_t HOST_NOT_FOUND_ERROR=5000;
|
||||
const int32_t GENERIC_ERROR=9999;
|
||||
errorKey = ( (aErrorCode == NS_ERROR_UNKNOWN_HOST) ?
|
||||
HOST_NOT_FOUND_ERROR : GENERIC_ERROR );
|
||||
|
||||
|
@ -242,8 +242,8 @@ nsAbLDAPAutoCompFormatter::FormatException(PRInt32 aState,
|
|||
|
||||
// and try to find a hint about what the user should do next
|
||||
//
|
||||
const PRInt32 HINT_BASE=10000;
|
||||
const PRInt32 GENERIC_HINT_CODE = 9999;
|
||||
const int32_t HINT_BASE=10000;
|
||||
const int32_t GENERIC_HINT_CODE = 9999;
|
||||
rv = ldapACBundle->GetStringFromID(HINT_BASE + errorKey,
|
||||
getter_Copies(ldapHint));
|
||||
if (NS_FAILED(rv)) {
|
||||
|
@ -546,7 +546,7 @@ nsAbLDAPAutoCompFormatter::AppendFirstAttrValue(
|
|||
// get the attribute values for the field which will be used
|
||||
// to fill in nsIAutoCompleteItem::value
|
||||
//
|
||||
PRUint32 numVals;
|
||||
uint32_t numVals;
|
||||
PRUnichar **values;
|
||||
|
||||
nsresult rv;
|
||||
|
|
|
@ -51,9 +51,9 @@ NS_IMPL_ISUPPORTS_INHERITED1(nsAbLDAPCard, nsAbCardProperty, nsIAbLDAPCard)
|
|||
*/
|
||||
NS_IMETHODIMP nsAbLDAPCard::GetLDAPMessageInfo(
|
||||
nsIAbLDAPAttributeMap *aAttributeMap,
|
||||
const PRUint32 aClassCount,
|
||||
const uint32_t aClassCount,
|
||||
const char **aClasses,
|
||||
PRInt32 aType,
|
||||
int32_t aType,
|
||||
nsIArray **aLDAPAddMessageInfo)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aAttributeMap);
|
||||
|
@ -69,7 +69,7 @@ NS_IMETHODIMP nsAbLDAPCard::GetLDAPMessageInfo(
|
|||
// classes: if an entry has additional object classes, it's probably
|
||||
// for a good reason.
|
||||
nsCAutoString oclass;
|
||||
for (PRUint32 i = 0; i < aClassCount; ++i)
|
||||
for (uint32_t i = 0; i < aClassCount; ++i)
|
||||
{
|
||||
oclass.Assign(nsDependentCString(aClasses[i]));
|
||||
ToLowerCase(oclass);
|
||||
|
@ -89,7 +89,7 @@ NS_IMETHODIMP nsAbLDAPCard::GetLDAPMessageInfo(
|
|||
do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
for (PRUint32 i = 0; i < m_objectClass.Length(); ++i)
|
||||
for (uint32_t i = 0; i < m_objectClass.Length(); ++i)
|
||||
{
|
||||
nsCOMPtr<nsILDAPBERValue> value =
|
||||
do_CreateInstance("@mozilla.org/network/ldap-ber-value;1", &rv);
|
||||
|
@ -115,7 +115,7 @@ NS_IMETHODIMP nsAbLDAPCard::GetLDAPMessageInfo(
|
|||
|
||||
nsCAutoString attr;
|
||||
nsCString propvalue;
|
||||
for (PRUint32 i = 0; i < props.GetSize(); ++i)
|
||||
for (uint32_t i = 0; i < props.GetSize(); ++i)
|
||||
{
|
||||
// Skip some attributes that don't map to LDAP.
|
||||
//
|
||||
|
@ -145,7 +145,7 @@ NS_IMETHODIMP nsAbLDAPCard::GetLDAPMessageInfo(
|
|||
do_CreateInstance("@mozilla.org/network/ldap-modification;1", &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRUint32 index = m_attributes.IndexOf(attr);
|
||||
uint32_t index = m_attributes.IndexOf(attr);
|
||||
|
||||
rv = GetPropertyAsAUTF8String(props[i], propvalue);
|
||||
|
||||
|
@ -193,7 +193,7 @@ NS_IMETHODIMP nsAbLDAPCard::GetLDAPMessageInfo(
|
|||
}
|
||||
|
||||
NS_IMETHODIMP nsAbLDAPCard::BuildRdn(nsIAbLDAPAttributeMap *aAttributeMap,
|
||||
const PRUint32 aAttrCount,
|
||||
const uint32_t aAttrCount,
|
||||
const char **aAttributes,
|
||||
nsACString &aRdn)
|
||||
{
|
||||
|
@ -206,7 +206,7 @@ NS_IMETHODIMP nsAbLDAPCard::BuildRdn(nsIAbLDAPAttributeMap *aAttributeMap,
|
|||
nsCString propvalue;
|
||||
|
||||
aRdn.Truncate();
|
||||
for (PRUint32 i = 0; i < aAttrCount; ++i)
|
||||
for (uint32_t i = 0; i < aAttrCount; ++i)
|
||||
{
|
||||
attr.Assign(nsDependentCString(aAttributes[i]));
|
||||
|
||||
|
@ -264,7 +264,7 @@ NS_IMETHODIMP nsAbLDAPCard::SetMetaProperties(nsILDAPMessage *aMessage)
|
|||
|
||||
nsCAutoString attr;
|
||||
m_attributes.Clear();
|
||||
for (PRUint32 i = 0; i < attrs.GetSize(); ++i)
|
||||
for (uint32_t i = 0; i < attrs.GetSize(); ++i)
|
||||
{
|
||||
attr.Assign(nsDependentCString(attrs[i]));
|
||||
ToLowerCase(attr);
|
||||
|
@ -286,7 +286,7 @@ NS_IMETHODIMP nsAbLDAPCard::SetMetaProperties(nsILDAPMessage *aMessage)
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCAutoString oclass;
|
||||
for (PRUint32 i = 0; i < vals.GetSize(); ++i)
|
||||
for (uint32_t i = 0; i < vals.GetSize(); ++i)
|
||||
{
|
||||
oclass.Assign(NS_LossyConvertUTF16toASCII(nsDependentString(vals[i])));
|
||||
ToLowerCase(oclass);
|
||||
|
|
|
@ -66,7 +66,7 @@ nsresult nsAbLDAPProcessChangeLogData::OnLDAPBind(nsILDAPMessage *aMessage)
|
|||
if(!mInitialized)
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
|
||||
PRInt32 errCode;
|
||||
int32_t errCode;
|
||||
|
||||
nsresult rv = aMessage->GetErrorCode(&errCode);
|
||||
if(NS_FAILED(rv)) {
|
||||
|
@ -142,7 +142,7 @@ nsresult nsAbLDAPProcessChangeLogData::OnLDAPSearchResult(nsILDAPMessage *aMessa
|
|||
if (!mInitialized)
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
|
||||
PRInt32 errorCode;
|
||||
int32_t errorCode;
|
||||
|
||||
nsresult rv = aMessage->GetErrorCode(&errorCode);
|
||||
|
||||
|
@ -179,7 +179,7 @@ nsresult nsAbLDAPProcessChangeLogData::OnLDAPSearchResult(nsILDAPMessage *aMessa
|
|||
if (NS_FAILED(rv))
|
||||
break;
|
||||
|
||||
PRInt64 fileSize;
|
||||
int64_t fileSize;
|
||||
rv = dbPath->GetFileSize(&fileSize);
|
||||
if(NS_FAILED(rv))
|
||||
break;
|
||||
|
@ -318,7 +318,7 @@ nsresult nsAbLDAPProcessChangeLogData::ParseRootDSEEntry(nsILDAPMessage *aMessag
|
|||
if(NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
for(PRInt32 i=attrs.GetSize()-1; i >= 0; i--) {
|
||||
for(int32_t i=attrs.GetSize()-1; i >= 0; i--) {
|
||||
PRUnicharPtrArrayGuard vals;
|
||||
rv = aMessage->GetValues(attrs.GetArray()[i], vals.GetSizeAddr(), vals.GetArrayAddr());
|
||||
if(NS_FAILED(rv))
|
||||
|
@ -335,7 +335,7 @@ nsresult nsAbLDAPProcessChangeLogData::ParseRootDSEEntry(nsILDAPMessage *aMessag
|
|||
}
|
||||
}
|
||||
|
||||
PRInt32 lastChangeNumber;
|
||||
int32_t lastChangeNumber;
|
||||
mDirectory->GetLastChangeNumber(&lastChangeNumber);
|
||||
|
||||
if ((mRootDSEEntry.lastChangeNumber > 0) &&
|
||||
|
@ -399,7 +399,7 @@ nsresult nsAbLDAPProcessChangeLogData::ParseChangeLogEntries(nsILDAPMessage *aMe
|
|||
|
||||
nsAutoString targetDN;
|
||||
UpdateOp operation = NO_OP;
|
||||
for(PRInt32 i = attrs.GetSize()-1; i >= 0; i--) {
|
||||
for(int32_t i = attrs.GetSize()-1; i >= 0; i--) {
|
||||
PRUnicharPtrArrayGuard vals;
|
||||
rv = aMessage->GetValues(attrs.GetArray()[i], vals.GetSizeAddr(), vals.GetArrayAddr());
|
||||
if(NS_FAILED(rv))
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
|
||||
typedef struct {
|
||||
nsCString changeLogDN;
|
||||
PRInt32 firstChangeNumber;
|
||||
PRInt32 lastChangeNumber;
|
||||
int32_t firstChangeNumber;
|
||||
int32_t lastChangeNumber;
|
||||
nsCString dataVersion;
|
||||
} RootDSEChangeLogEntry;
|
||||
|
||||
|
@ -46,9 +46,9 @@ protected :
|
|||
|
||||
RootDSEChangeLogEntry mRootDSEEntry;
|
||||
bool mUseChangeLog;
|
||||
PRInt32 mChangeLogEntriesCount;
|
||||
int32_t mChangeLogEntriesCount;
|
||||
|
||||
PRInt32 mEntriesAddedQueryCount;
|
||||
int32_t mEntriesAddedQueryCount;
|
||||
nsStringArray mEntriesToAdd;
|
||||
};
|
||||
|
||||
|
|
|
@ -124,14 +124,14 @@ NS_IMETHODIMP nsAbLDAPChangeLogQuery::QueryRootDSE()
|
|||
sChangeLogRootDSEAttribs, 0, 0);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbLDAPChangeLogQuery::QueryChangeLog(const nsACString & aChangeLogDN, PRInt32 aLastChangeNo)
|
||||
NS_IMETHODIMP nsAbLDAPChangeLogQuery::QueryChangeLog(const nsACString & aChangeLogDN, int32_t aLastChangeNo)
|
||||
{
|
||||
if (!mInitialized)
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
if (aChangeLogDN.IsEmpty())
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
||||
PRInt32 lastChangeNumber;
|
||||
int32_t lastChangeNumber;
|
||||
nsresult rv = mDirectory->GetLastChangeNumber(&lastChangeNumber);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -161,7 +161,7 @@ NS_IMETHODIMP nsAbLDAPChangeLogQuery::QueryChangedEntries(const nsACString & aCh
|
|||
if(NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
PRInt32 scope;
|
||||
int32_t scope;
|
||||
rv = mURL->GetScope(&scope);
|
||||
if(NS_FAILED(rv))
|
||||
return rv;
|
||||
|
|
|
@ -69,7 +69,7 @@ NS_IMETHODIMP nsAbLDAPDirectory::Init(const char* aURI)
|
|||
// Find the first ? (of the search params) if there is one.
|
||||
// We know we can start at the end of the moz-abldapdirectory:// because
|
||||
// that's the URI we should have been passed.
|
||||
PRInt32 searchCharLocation = uri.FindChar('?', kLDAPDirectoryRootLen);
|
||||
int32_t searchCharLocation = uri.FindChar('?', kLDAPDirectoryRootLen);
|
||||
|
||||
if (searchCharLocation == -1)
|
||||
m_DirPrefId = Substring(uri, kLDAPDirectoryRootLen);
|
||||
|
@ -296,7 +296,7 @@ NS_IMETHODIMP nsAbLDAPDirectory::StartSearch ()
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Get the max hits to return
|
||||
PRInt32 maxHits;
|
||||
int32_t maxHits;
|
||||
rv = GetMaxHits(&maxHits);
|
||||
if (NS_FAILED(rv))
|
||||
maxHits = kDefaultMaxHits;
|
||||
|
@ -357,7 +357,7 @@ NS_IMETHODIMP nsAbLDAPDirectory::StopSearch ()
|
|||
* nsAbDirSearchListenerContext methods
|
||||
*
|
||||
*/
|
||||
NS_IMETHODIMP nsAbLDAPDirectory::OnSearchFinished(PRInt32 aResult, const nsAString &aErrorMessage)
|
||||
NS_IMETHODIMP nsAbLDAPDirectory::OnSearchFinished(int32_t aResult, const nsAString &aErrorMessage)
|
||||
{
|
||||
nsresult rv = Initiate();
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
@ -560,7 +560,7 @@ NS_IMETHODIMP nsAbLDAPDirectory::SetSearchServerControls(nsIMutableArray *aContr
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbLDAPDirectory::GetProtocolVersion(PRUint32 *aProtocolVersion)
|
||||
NS_IMETHODIMP nsAbLDAPDirectory::GetProtocolVersion(uint32_t *aProtocolVersion)
|
||||
{
|
||||
nsCAutoString versionString;
|
||||
|
||||
|
@ -568,13 +568,13 @@ NS_IMETHODIMP nsAbLDAPDirectory::GetProtocolVersion(PRUint32 *aProtocolVersion)
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
*aProtocolVersion = versionString.EqualsLiteral("3") ?
|
||||
(PRUint32)nsILDAPConnection::VERSION3 :
|
||||
(PRUint32)nsILDAPConnection::VERSION2;
|
||||
(uint32_t)nsILDAPConnection::VERSION3 :
|
||||
(uint32_t)nsILDAPConnection::VERSION2;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbLDAPDirectory::SetProtocolVersion(PRUint32 aProtocolVersion)
|
||||
NS_IMETHODIMP nsAbLDAPDirectory::SetProtocolVersion(uint32_t aProtocolVersion)
|
||||
{
|
||||
// XXX We should cancel any existing LDAP connections here and
|
||||
// be ready to re-initialise them with the new auth details.
|
||||
|
@ -583,12 +583,12 @@ NS_IMETHODIMP nsAbLDAPDirectory::SetProtocolVersion(PRUint32 aProtocolVersion)
|
|||
NS_LITERAL_CSTRING("3") : NS_LITERAL_CSTRING("2"));
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbLDAPDirectory::GetMaxHits(PRInt32 *aMaxHits)
|
||||
NS_IMETHODIMP nsAbLDAPDirectory::GetMaxHits(int32_t *aMaxHits)
|
||||
{
|
||||
return GetIntValue("maxHits", kDefaultMaxHits, aMaxHits);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbLDAPDirectory::SetMaxHits(PRInt32 aMaxHits)
|
||||
NS_IMETHODIMP nsAbLDAPDirectory::SetMaxHits(int32_t aMaxHits)
|
||||
{
|
||||
return SetIntValue("maxHits", aMaxHits);
|
||||
}
|
||||
|
@ -625,12 +625,12 @@ NS_IMETHODIMP nsAbLDAPDirectory::SetSaslMechanism(const nsACString &aSaslMechani
|
|||
return SetStringValue("auth.saslmech", aSaslMechanism);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbLDAPDirectory::GetLastChangeNumber(PRInt32 *aLastChangeNumber)
|
||||
NS_IMETHODIMP nsAbLDAPDirectory::GetLastChangeNumber(int32_t *aLastChangeNumber)
|
||||
{
|
||||
return GetIntValue("lastChangeNumber", -1, aLastChangeNumber);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbLDAPDirectory::SetLastChangeNumber(PRInt32 aLastChangeNumber)
|
||||
NS_IMETHODIMP nsAbLDAPDirectory::SetLastChangeNumber(int32_t aLastChangeNumber)
|
||||
{
|
||||
return SetIntValue("lastChangeNumber", aLastChangeNumber);
|
||||
}
|
||||
|
@ -782,8 +782,8 @@ NS_IMETHODIMP nsAbLDAPDirectory::AddCard(nsIAbCard *aUpdatedCard,
|
|||
|
||||
NS_IMETHODIMP nsAbLDAPDirectory::DeleteCards(nsIArray *aCards)
|
||||
{
|
||||
PRUint32 cardCount;
|
||||
PRUint32 i;
|
||||
uint32_t cardCount;
|
||||
uint32_t i;
|
||||
nsCAutoString cardDN;
|
||||
|
||||
nsresult rv = aCards->GetLength(&cardCount);
|
||||
|
@ -919,7 +919,7 @@ NS_IMETHODIMP nsAbLDAPDirectory::SetObjectClasses(const nsACString &aObjectClass
|
|||
|
||||
nsresult nsAbLDAPDirectory::SplitStringList(
|
||||
const nsACString& aString,
|
||||
PRUint32 *aCount,
|
||||
uint32_t *aCount,
|
||||
char ***aValues)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aCount);
|
||||
|
@ -933,7 +933,7 @@ nsresult nsAbLDAPDirectory::SplitStringList(
|
|||
strarr.Length() * sizeof(char *)))))
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
for (PRUint32 i = 0; i < strarr.Length(); ++i)
|
||||
for (uint32_t i = 0; i < strarr.Length(); ++i)
|
||||
{
|
||||
if (!(cArray[i] = ToNewCString(strarr[i])))
|
||||
{
|
||||
|
|
|
@ -56,12 +56,12 @@ protected:
|
|||
nsresult Initiate();
|
||||
|
||||
nsresult SplitStringList(const nsACString& aString,
|
||||
PRUint32 *aCount,
|
||||
uint32_t *aCount,
|
||||
char ***aValues);
|
||||
|
||||
bool mPerformingQuery;
|
||||
PRInt32 mContext;
|
||||
PRInt32 mMaxHits;
|
||||
int32_t mContext;
|
||||
int32_t mMaxHits;
|
||||
|
||||
nsInterfaceHashtable<nsISupportsHashKey, nsIAbCard> mCache;
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ class nsAbModifyLDAPMessageListener : public nsAbLDAPListenerBase
|
|||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
nsAbModifyLDAPMessageListener(const PRInt32 type,
|
||||
nsAbModifyLDAPMessageListener(const int32_t type,
|
||||
const nsACString &cardDN,
|
||||
nsIArray* modArray,
|
||||
const nsACString &newRDN,
|
||||
|
@ -33,7 +33,7 @@ public:
|
|||
nsIMutableArray* serverSearchControls,
|
||||
nsIMutableArray* clientSearchControls,
|
||||
const nsACString &login,
|
||||
const PRInt32 timeOut = 0);
|
||||
const int32_t timeOut = 0);
|
||||
virtual ~nsAbModifyLDAPMessageListener();
|
||||
|
||||
// nsILDAPMessageListener
|
||||
|
@ -47,7 +47,7 @@ protected:
|
|||
nsresult OnLDAPMessageModifyResult(nsILDAPMessage *aMessage);
|
||||
nsresult OnLDAPMessageRenameResult(nsILDAPMessage *aMessage);
|
||||
|
||||
PRInt32 mType;
|
||||
int32_t mType;
|
||||
nsCString mCardDN;
|
||||
nsCOMPtr<nsIArray> mModification;
|
||||
nsCString mNewRDN;
|
||||
|
@ -66,7 +66,7 @@ protected:
|
|||
NS_IMPL_THREADSAFE_ISUPPORTS1(nsAbModifyLDAPMessageListener, nsILDAPMessageListener)
|
||||
|
||||
nsAbModifyLDAPMessageListener::nsAbModifyLDAPMessageListener(
|
||||
const PRInt32 type,
|
||||
const int32_t type,
|
||||
const nsACString &cardDN,
|
||||
nsIArray* modArray,
|
||||
const nsACString &newRDN,
|
||||
|
@ -76,7 +76,7 @@ nsAbModifyLDAPMessageListener::nsAbModifyLDAPMessageListener(
|
|||
nsIMutableArray* serverSearchControls,
|
||||
nsIMutableArray* clientSearchControls,
|
||||
const nsACString &login,
|
||||
const PRInt32 timeOut) :
|
||||
const int32_t timeOut) :
|
||||
nsAbLDAPListenerBase(directoryUrl, connection, login, timeOut),
|
||||
mType(type),
|
||||
mCardDN(cardDN),
|
||||
|
@ -118,7 +118,7 @@ NS_IMETHODIMP nsAbModifyLDAPMessageListener::OnLDAPMessage(nsILDAPMessage *aMess
|
|||
nsresult rv = Initiate();
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRInt32 messageType;
|
||||
int32_t messageType;
|
||||
rv = aMessage->GetType(&messageType);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -234,7 +234,7 @@ nsresult nsAbModifyLDAPMessageListener::OnLDAPMessageModifyResult(nsILDAPMessage
|
|||
nsresult rv;
|
||||
NS_ENSURE_ARG_POINTER(aMessage);
|
||||
|
||||
PRInt32 errCode;
|
||||
int32_t errCode;
|
||||
rv = aMessage->GetErrorCode(&errCode);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -258,7 +258,7 @@ nsresult nsAbModifyLDAPMessageListener::OnLDAPMessageRenameResult(nsILDAPMessage
|
|||
nsresult rv;
|
||||
NS_ENSURE_ARG_POINTER(aMessage);
|
||||
|
||||
PRInt32 errCode;
|
||||
int32_t errCode;
|
||||
rv = aMessage->GetErrorCode(&errCode);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -292,7 +292,7 @@ nsAbLDAPDirectoryModify::~nsAbLDAPDirectoryModify()
|
|||
}
|
||||
|
||||
nsresult nsAbLDAPDirectoryModify::DoModify(nsIAbLDAPDirectory *directory,
|
||||
const PRInt32 &updateType,
|
||||
const int32_t &updateType,
|
||||
const nsACString &cardDN,
|
||||
nsIArray* modArray,
|
||||
const nsACString &newRDN,
|
||||
|
@ -347,7 +347,7 @@ nsresult nsAbLDAPDirectoryModify::DoModify(nsIAbLDAPDirectory *directory,
|
|||
rv = directory->GetAuthDn(login);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRUint32 protocolVersion;
|
||||
uint32_t protocolVersion;
|
||||
rv = directory->GetProtocolVersion(&protocolVersion);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public:
|
|||
|
||||
protected:
|
||||
nsresult DoModify(nsIAbLDAPDirectory *directory,
|
||||
const PRInt32 &aUpdateType,
|
||||
const int32_t &aUpdateType,
|
||||
const nsACString &aCardDN,
|
||||
nsIArray* modArray,
|
||||
const nsACString &aNewRDN,
|
||||
|
|
|
@ -42,8 +42,8 @@ public:
|
|||
nsIMutableArray* clientSearchControls,
|
||||
const nsACString &login,
|
||||
const nsACString &mechanism,
|
||||
const PRInt32 resultLimit = -1,
|
||||
const PRInt32 timeOut = 0);
|
||||
const int32_t resultLimit = -1,
|
||||
const int32_t timeOut = 0);
|
||||
virtual ~nsAbQueryLDAPMessageListener ();
|
||||
|
||||
// nsILDAPMessageListener
|
||||
|
@ -61,9 +61,9 @@ protected:
|
|||
|
||||
nsCOMPtr<nsILDAPURL> mSearchUrl;
|
||||
nsIAbDirectoryQueryResultListener *mResultListener;
|
||||
PRInt32 mContextID;
|
||||
int32_t mContextID;
|
||||
nsCOMPtr<nsIAbDirectoryQueryArguments> mQueryArguments;
|
||||
PRInt32 mResultLimit;
|
||||
int32_t mResultLimit;
|
||||
|
||||
bool mFinished;
|
||||
bool mCanceled;
|
||||
|
@ -86,8 +86,8 @@ nsAbQueryLDAPMessageListener::nsAbQueryLDAPMessageListener(
|
|||
nsIMutableArray* clientSearchControls,
|
||||
const nsACString &login,
|
||||
const nsACString &mechanism,
|
||||
const PRInt32 resultLimit,
|
||||
const PRInt32 timeOut) :
|
||||
const int32_t resultLimit,
|
||||
const int32_t timeOut) :
|
||||
nsAbLDAPListenerBase(directoryUrl, connection, login, timeOut),
|
||||
mSearchUrl(searchUrl),
|
||||
mResultListener(resultListener),
|
||||
|
@ -128,7 +128,7 @@ NS_IMETHODIMP nsAbQueryLDAPMessageListener::OnLDAPMessage(nsILDAPMessage *aMessa
|
|||
nsresult rv = Initiate();
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRInt32 messageType;
|
||||
int32_t messageType;
|
||||
rv = aMessage->GetType(&messageType);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -211,7 +211,7 @@ nsresult nsAbQueryLDAPMessageListener::DoTask()
|
|||
rv = mSearchUrl->GetDn(dn);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRInt32 scope;
|
||||
int32_t scope;
|
||||
rv = mSearchUrl->GetScope(&scope);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -277,7 +277,7 @@ nsresult nsAbQueryLDAPMessageListener::OnLDAPMessageSearchEntry(nsILDAPMessage *
|
|||
|
||||
nsresult nsAbQueryLDAPMessageListener::OnLDAPMessageSearchResult(nsILDAPMessage *aMessage)
|
||||
{
|
||||
PRInt32 errorCode;
|
||||
int32_t errorCode;
|
||||
nsresult rv = aMessage->GetErrorCode(&errorCode);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -306,9 +306,9 @@ nsAbLDAPDirectoryQuery::~nsAbLDAPDirectoryQuery()
|
|||
NS_IMETHODIMP nsAbLDAPDirectoryQuery::DoQuery(nsIAbDirectory *aDirectory,
|
||||
nsIAbDirectoryQueryArguments* aArguments,
|
||||
nsIAbDirSearchListener* aListener,
|
||||
PRInt32 aResultLimit,
|
||||
PRInt32 aTimeOut,
|
||||
PRInt32* _retval)
|
||||
int32_t aResultLimit,
|
||||
int32_t aTimeOut,
|
||||
int32_t* _retval)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aListener);
|
||||
NS_ENSURE_ARG_POINTER(aArguments);
|
||||
|
@ -338,7 +338,7 @@ NS_IMETHODIMP nsAbLDAPDirectoryQuery::DoQuery(nsIAbDirectory *aDirectory,
|
|||
rv = directory->GetSaslMechanism(saslMechanism);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRUint32 protocolVersion;
|
||||
uint32_t protocolVersion;
|
||||
rv = directory->GetProtocolVersion(&protocolVersion);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -489,7 +489,7 @@ NS_IMETHODIMP nsAbLDAPDirectoryQuery::DoQuery(nsIAbDirectory *aDirectory,
|
|||
// Now formulate the search string
|
||||
|
||||
// Get the scope
|
||||
PRInt32 scope;
|
||||
int32_t scope;
|
||||
bool doSubDirectories;
|
||||
rv = aArguments->GetQuerySubDirectories (&doSubDirectories);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
@ -559,7 +559,7 @@ NS_IMETHODIMP nsAbLDAPDirectoryQuery::DoQuery(nsIAbDirectory *aDirectory,
|
|||
}
|
||||
|
||||
/* void stopQuery (in long contextID); */
|
||||
NS_IMETHODIMP nsAbLDAPDirectoryQuery::StopQuery(PRInt32 contextID)
|
||||
NS_IMETHODIMP nsAbLDAPDirectoryQuery::StopQuery(int32_t contextID)
|
||||
{
|
||||
mInitialized = true;
|
||||
|
||||
|
@ -578,23 +578,23 @@ NS_IMETHODIMP nsAbLDAPDirectoryQuery::OnQueryFoundCard(nsIAbCard *aCard)
|
|||
{
|
||||
aCard->SetDirectoryId(mDirectoryId);
|
||||
|
||||
for (PRInt32 i = 0; i < mListeners.Count(); ++i)
|
||||
for (int32_t i = 0; i < mListeners.Count(); ++i)
|
||||
mListeners[i]->OnSearchFoundCard(aCard);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbLDAPDirectoryQuery::OnQueryResult(PRInt32 aResult,
|
||||
PRInt32 aErrorCode)
|
||||
NS_IMETHODIMP nsAbLDAPDirectoryQuery::OnQueryResult(int32_t aResult,
|
||||
int32_t aErrorCode)
|
||||
{
|
||||
PRUint32 count = mListeners.Count();
|
||||
uint32_t count = mListeners.Count();
|
||||
|
||||
// XXX: Temporary fix for crasher needs reviewing as part of bug 135231.
|
||||
// Temporarily add a reference to ourselves, in case the only thing
|
||||
// keeping us alive is the link with the listener.
|
||||
NS_ADDREF_THIS();
|
||||
|
||||
for (PRInt32 i = count - 1; i >= 0; --i)
|
||||
for (int32_t i = count - 1; i >= 0; --i)
|
||||
{
|
||||
mListeners[i]->OnSearchFinished(aResult, EmptyString());
|
||||
mListeners.RemoveObjectAt(i);
|
||||
|
|
|
@ -36,7 +36,7 @@ private:
|
|||
nsCOMArray<nsIAbDirSearchListener> mListeners;
|
||||
nsCString mCurrentLogin;
|
||||
nsCString mCurrentMechanism;
|
||||
PRUint32 mCurrentProtocolVersion;
|
||||
uint32_t mCurrentProtocolVersion;
|
||||
|
||||
bool mInitialized;
|
||||
};
|
||||
|
|
|
@ -22,7 +22,7 @@ using namespace mozilla;
|
|||
nsAbLDAPListenerBase::nsAbLDAPListenerBase(nsILDAPURL* url,
|
||||
nsILDAPConnection* connection,
|
||||
const nsACString &login,
|
||||
const PRInt32 timeOut) :
|
||||
const int32_t timeOut) :
|
||||
mDirectoryUrl(url), mConnection(connection), mLogin(login),
|
||||
mTimeOut(timeOut), mBound(false), mInitialized(false),
|
||||
mLock("nsAbLDAPListenerBase.mLock")
|
||||
|
@ -281,7 +281,7 @@ nsresult nsAbLDAPListenerBase::OnLDAPMessageBind(nsILDAPMessage *aMessage)
|
|||
|
||||
// see whether the bind actually succeeded
|
||||
//
|
||||
PRInt32 errCode;
|
||||
int32_t errCode;
|
||||
nsresult rv = aMessage->GetErrorCode(&errCode);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -308,7 +308,7 @@ nsresult nsAbLDAPListenerBase::OnLDAPMessageBind(nsILDAPMessage *aMessage)
|
|||
rv = mDirectoryUrl->GetPrePath(prePath);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRUint32 count;
|
||||
uint32_t count;
|
||||
nsILoginInfo** logins;
|
||||
|
||||
rv = loginMgr->FindLogins(&count, NS_ConvertUTF8toUTF16(prePath),
|
||||
|
@ -318,7 +318,7 @@ nsresult nsAbLDAPListenerBase::OnLDAPMessageBind(nsILDAPMessage *aMessage)
|
|||
|
||||
// Typically there should only be one-login stored for this url, however,
|
||||
// just in case there isn't.
|
||||
for (PRUint32 i = 0; i < count; ++i)
|
||||
for (uint32_t i = 0; i < count; ++i)
|
||||
{
|
||||
rv = loginMgr->RemoveLogin(logins[i]);
|
||||
if (NS_FAILED(rv))
|
||||
|
|
|
@ -22,7 +22,7 @@ public:
|
|||
nsAbLDAPListenerBase(nsILDAPURL* directoryUrl = nullptr,
|
||||
nsILDAPConnection* connection = nullptr,
|
||||
const nsACString &login = EmptyCString(),
|
||||
const PRInt32 timeOut = 0);
|
||||
const int32_t timeOut = 0);
|
||||
virtual ~nsAbLDAPListenerBase();
|
||||
|
||||
NS_IMETHOD OnLDAPInit(nsILDAPConnection *aConn, nsresult aStatus);
|
||||
|
@ -43,7 +43,7 @@ protected:
|
|||
nsILDAPConnection* mConnection;
|
||||
nsCString mLogin;
|
||||
nsCString mSaslMechanism;
|
||||
PRInt32 mTimeOut;
|
||||
int32_t mTimeOut;
|
||||
bool mBound;
|
||||
bool mInitialized;
|
||||
|
||||
|
|
|
@ -77,14 +77,14 @@ NS_IMETHODIMP nsAbLDAPProcessReplicationData::Init(
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbLDAPProcessReplicationData::GetReplicationState(PRInt32 *aReplicationState)
|
||||
NS_IMETHODIMP nsAbLDAPProcessReplicationData::GetReplicationState(int32_t *aReplicationState)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aReplicationState);
|
||||
*aReplicationState = mState;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbLDAPProcessReplicationData::GetProtocolUsed(PRInt32 *aProtocolUsed)
|
||||
NS_IMETHODIMP nsAbLDAPProcessReplicationData::GetProtocolUsed(int32_t *aProtocolUsed)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aProtocolUsed);
|
||||
*aProtocolUsed = mProtocol;
|
||||
|
@ -98,7 +98,7 @@ NS_IMETHODIMP nsAbLDAPProcessReplicationData::OnLDAPMessage(nsILDAPMessage *aMes
|
|||
if (!mInitialized)
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
|
||||
PRInt32 messageType;
|
||||
int32_t messageType;
|
||||
nsresult rv = aMessage->GetType(&messageType);
|
||||
if (NS_FAILED(rv)) {
|
||||
Done(false);
|
||||
|
@ -193,7 +193,7 @@ nsresult nsAbLDAPProcessReplicationData::DoTask()
|
|||
if (dn.IsEmpty())
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
||||
PRInt32 scope;
|
||||
int32_t scope;
|
||||
rv = mDirectoryUrl->GetScope(&scope);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
@ -296,7 +296,7 @@ nsresult nsAbLDAPProcessReplicationData::OnLDAPSearchResult(nsILDAPMessage *aMes
|
|||
if(!mInitialized)
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
|
||||
PRInt32 errorCode;
|
||||
int32_t errorCode;
|
||||
nsresult rv = aMessage->GetErrorCode(&errorCode);
|
||||
|
||||
if(NS_SUCCEEDED(rv)) {
|
||||
|
|
|
@ -44,9 +44,9 @@ protected:
|
|||
nsCOMPtr <nsIFile> mBackupReplicationFile;
|
||||
|
||||
// state of processing, protocol used and count of results
|
||||
PRInt32 mState;
|
||||
PRInt32 mProtocol;
|
||||
PRInt32 mCount;
|
||||
int32_t mState;
|
||||
int32_t mProtocol;
|
||||
int32_t mCount;
|
||||
bool mDBOpen;
|
||||
bool mInitialized;
|
||||
|
||||
|
|
|
@ -88,13 +88,13 @@ nsresult nsAbLDAPReplicationQuery::ConnectToLDAPServer()
|
|||
return NS_ERROR_UNEXPECTED;
|
||||
|
||||
// this could be a rebind call
|
||||
PRInt32 replicationState = nsIAbLDAPProcessReplicationData::kIdle;
|
||||
int32_t replicationState = nsIAbLDAPProcessReplicationData::kIdle;
|
||||
rv = mDataProcessor->GetReplicationState(&replicationState);
|
||||
if (NS_FAILED(rv) ||
|
||||
replicationState != nsIAbLDAPProcessReplicationData::kIdle)
|
||||
return rv;
|
||||
|
||||
PRUint32 protocolVersion;
|
||||
uint32_t protocolVersion;
|
||||
rv = mDirectory->GetProtocolVersion(&protocolVersion);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ NS_IMETHODIMP nsAbLDAPReplicationService::Done(bool aSuccess)
|
|||
|
||||
// XXX: This method should query the RootDSE for the changeLog attribute,
|
||||
// if it exists ChangeLog protocol is supported.
|
||||
PRInt32 nsAbLDAPReplicationService::DecideProtocol()
|
||||
int32_t nsAbLDAPReplicationService::DecideProtocol()
|
||||
{
|
||||
// Do the changeLog, it will decide if there is a need to replicate all
|
||||
// entries or only update existing DB and will do the appropriate thing.
|
||||
|
|
|
@ -20,7 +20,7 @@ public:
|
|||
nsAbLDAPReplicationService();
|
||||
virtual ~nsAbLDAPReplicationService();
|
||||
|
||||
PRInt32 DecideProtocol();
|
||||
int32_t DecideProtocol();
|
||||
|
||||
protected:
|
||||
nsCOMPtr<nsIAbLDAPReplicationQuery> mQuery;
|
||||
|
|
|
@ -60,7 +60,7 @@ static unsigned char b642nib[0x80] = {
|
|||
0x31, 0x32, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff
|
||||
};
|
||||
|
||||
NS_IMETHODIMP nsAbLDIFService::ImportLDIFFile(nsIAddrDatabase *aDb, nsIFile *aSrc, bool aStoreLocAsHome, PRUint32 *aProgress)
|
||||
NS_IMETHODIMP nsAbLDIFService::ImportLDIFFile(nsIAddrDatabase *aDb, nsIFile *aSrc, bool aStoreLocAsHome, uint32_t *aProgress)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aSrc);
|
||||
NS_ENSURE_ARG_POINTER(aDb);
|
||||
|
@ -69,13 +69,13 @@ NS_IMETHODIMP nsAbLDIFService::ImportLDIFFile(nsIAddrDatabase *aDb, nsIFile *aSr
|
|||
|
||||
char buf[1024];
|
||||
char* pBuf = &buf[0];
|
||||
PRInt32 startPos = 0;
|
||||
PRUint32 len = 0;
|
||||
int32_t startPos = 0;
|
||||
uint32_t len = 0;
|
||||
nsVoidArray listPosArray; // where each list/group starts in ldif file
|
||||
nsVoidArray listSizeArray; // size of the list/group info
|
||||
PRInt32 savedStartPos = 0;
|
||||
PRInt32 filePos = 0;
|
||||
PRUint64 bytesLeft = 0;
|
||||
int32_t savedStartPos = 0;
|
||||
int32_t filePos = 0;
|
||||
uint64_t bytesLeft = 0;
|
||||
|
||||
nsCOMPtr<nsIInputStream> inputStream;
|
||||
nsresult rv = NS_NewLocalFileInputStream(getter_AddRefs(inputStream), aSrc);
|
||||
|
@ -105,7 +105,7 @@ NS_IMETHODIMP nsAbLDIFService::ImportLDIFFile(nsIAddrDatabase *aDb, nsIFile *aSr
|
|||
}
|
||||
filePos += len;
|
||||
if (aProgress)
|
||||
*aProgress = (PRUint32)filePos;
|
||||
*aProgress = (uint32_t)filePos;
|
||||
}
|
||||
}
|
||||
//last row
|
||||
|
@ -113,9 +113,9 @@ NS_IMETHODIMP nsAbLDIFService::ImportLDIFFile(nsIAddrDatabase *aDb, nsIFile *aSr
|
|||
AddLdifRowToDatabase(aDb, false);
|
||||
|
||||
// mail Lists
|
||||
PRInt32 i, pos;
|
||||
PRUint32 size;
|
||||
PRInt32 listTotal = listPosArray.Count();
|
||||
int32_t i, pos;
|
||||
uint32_t size;
|
||||
int32_t listTotal = listPosArray.Count();
|
||||
char *listBuf;
|
||||
ClearLdifRecordBuffer(); // make sure the buffer is clean
|
||||
|
||||
|
@ -297,7 +297,7 @@ char* nsAbLDIFService::str_getline(char **next) const
|
|||
return( lineStr );
|
||||
}
|
||||
|
||||
nsresult nsAbLDIFService::GetLdifStringRecord(char* buf, PRInt32 len, PRInt32& stopPos)
|
||||
nsresult nsAbLDIFService::GetLdifStringRecord(char* buf, int32_t len, int32_t& stopPos)
|
||||
{
|
||||
for (; stopPos < len; stopPos++)
|
||||
{
|
||||
|
@ -504,7 +504,7 @@ void nsAbLDIFService::AddLdifColToDatabase(nsIAddrDatabase *aDatabase,
|
|||
// This will remove the label and place the URI as the work URL
|
||||
else if (colType.EqualsLiteral("labeleduri"))
|
||||
{
|
||||
PRInt32 index = column.FindChar(' ');
|
||||
int32_t index = column.FindChar(' ');
|
||||
if (index != -1)
|
||||
column.SetLength(index);
|
||||
|
||||
|
@ -778,14 +778,14 @@ NS_IMETHODIMP nsAbLDIFService::IsLDIFFile(nsIFile *pSrc, bool *_retval)
|
|||
nsCOMPtr<nsILineInputStream> lineInputStream(do_QueryInterface(fileStream, &rv));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRInt32 lineLen = 0;
|
||||
PRInt32 lineCount = 0;
|
||||
PRInt32 ldifFields = 0; // total number of legal ldif fields.
|
||||
int32_t lineLen = 0;
|
||||
int32_t lineCount = 0;
|
||||
int32_t ldifFields = 0; // total number of legal ldif fields.
|
||||
char field[kMaxLDIFLen];
|
||||
PRInt32 fLen = 0;
|
||||
int32_t fLen = 0;
|
||||
const char *pChar;
|
||||
PRInt32 recCount = 0; // total number of records.
|
||||
PRInt32 i;
|
||||
int32_t recCount = 0; // total number of records.
|
||||
int32_t i;
|
||||
bool gotLDIF = false;
|
||||
bool more = true;
|
||||
nsCString line;
|
||||
|
@ -858,7 +858,7 @@ NS_IMETHODIMP nsAbLDIFService::IsLDIFFile(nsIFile *pSrc, bool *_retval)
|
|||
|
||||
void nsAbLDIFService::SplitCRLFAddressField(nsCString &inputAddress, nsCString &outputLine1, nsCString &outputLine2) const
|
||||
{
|
||||
PRInt32 crlfPos = inputAddress.Find("\r\n");
|
||||
int32_t crlfPos = inputAddress.Find("\r\n");
|
||||
if (crlfPos != -1)
|
||||
{
|
||||
outputLine1 = Substring(inputAddress, 0, crlfPos);
|
||||
|
|
|
@ -21,7 +21,7 @@ public:
|
|||
private:
|
||||
nsresult str_parse_line(char *line, char **type, char **value, int *vlen) const;
|
||||
char * str_getline(char **next) const;
|
||||
nsresult GetLdifStringRecord(char* buf, PRInt32 len, PRInt32& stopPos);
|
||||
nsresult GetLdifStringRecord(char* buf, int32_t len, int32_t& stopPos);
|
||||
void AddLdifRowToDatabase(nsIAddrDatabase *aDatabase, bool aIsList);
|
||||
void AddLdifColToDatabase(nsIAddrDatabase *aDatabase, nsIMdbRow* newRow,
|
||||
char* typeSlot, char* valueSlot, bool bIsList);
|
||||
|
@ -30,8 +30,8 @@ private:
|
|||
|
||||
bool mStoreLocAsHome;
|
||||
nsCString mLdifLine;
|
||||
PRInt32 mLFCount;
|
||||
PRInt32 mCRCount;
|
||||
int32_t mLFCount;
|
||||
int32_t mCRCount;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -35,7 +35,7 @@ NS_IMETHODIMP nsAbMDBCard::Equals(nsIAbCard *card, bool *result)
|
|||
// true result. If not, then DbRowID should be unset and we can definitively
|
||||
// return false.
|
||||
|
||||
PRUint32 row;
|
||||
uint32_t row;
|
||||
nsresult rv = card->GetPropertyAsUint32("DbRowID", &row);
|
||||
if (NS_FAILED(rv))
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ NS_IMETHODIMP nsAbMDBCard::Equals(nsIAbCard *card, bool *result)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
PRUint32 ourRow;
|
||||
uint32_t ourRow;
|
||||
rv = GetPropertyAsUint32("DbRowID", &ourRow);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
|
|
@ -86,11 +86,11 @@ NS_IMETHODIMP nsAbMDBDirFactory::DeleteDirectory(nsIAbDirectory *directory)
|
|||
rv = directory->GetAddressLists(getter_AddRefs(pAddressLists));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRUint32 total;
|
||||
uint32_t total;
|
||||
rv = pAddressLists->GetLength(&total);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
for (PRUint32 i = 0; i < total; i++)
|
||||
for (uint32_t i = 0; i < total; i++)
|
||||
{
|
||||
nsCOMPtr<nsIAbDirectory> listDir(do_QueryElementAt(pAddressLists, i, &rv));
|
||||
if (NS_FAILED(rv))
|
||||
|
|
|
@ -36,13 +36,13 @@ NS_IMPL_ISUPPORTS_INHERITED3(nsAbMDBDirProperty, nsAbDirProperty,
|
|||
|
||||
// nsIAbMDBDirectory attributes
|
||||
|
||||
NS_IMETHODIMP nsAbMDBDirProperty::GetDbRowID(PRUint32 *aDbRowID)
|
||||
NS_IMETHODIMP nsAbMDBDirProperty::GetDbRowID(uint32_t *aDbRowID)
|
||||
{
|
||||
*aDbRowID = m_dbRowID;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbMDBDirProperty::SetDbRowID(PRUint32 aDbRowID)
|
||||
NS_IMETHODIMP nsAbMDBDirProperty::SetDbRowID(uint32_t aDbRowID)
|
||||
{
|
||||
m_dbRowID = aDbRowID;
|
||||
return NS_OK;
|
||||
|
@ -61,7 +61,7 @@ NS_IMETHODIMP nsAbMDBDirProperty::AddMailListToDirectory(nsIAbDirectory *mailLis
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
PRUint32 position;
|
||||
uint32_t position;
|
||||
if (NS_FAILED(m_AddressList->IndexOf(0, mailList, &position)))
|
||||
m_AddressList->AppendElement(mailList, false);
|
||||
|
||||
|
@ -78,7 +78,7 @@ NS_IMETHODIMP nsAbMDBDirProperty::AddAddressToList(nsIAbCard *card)
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
PRUint32 position;
|
||||
uint32_t position;
|
||||
if (NS_FAILED(m_AddressList->IndexOf(0, card, &position)))
|
||||
m_AddressList->AppendElement(card, false);
|
||||
|
||||
|
@ -94,7 +94,7 @@ NS_IMETHODIMP nsAbMDBDirProperty::CopyDBMailList(nsIAbMDBDirectory* srcListDB)
|
|||
|
||||
CopyMailList (srcList);
|
||||
|
||||
PRUint32 rowID;
|
||||
uint32_t rowID;
|
||||
srcListDB->GetDbRowID(&rowID);
|
||||
SetDbRowID(rowID);
|
||||
|
||||
|
@ -117,7 +117,7 @@ NS_IMETHODIMP nsAbMDBDirProperty::RemoveElementsFromAddressList()
|
|||
}
|
||||
|
||||
/* void removeEmailAddressAt (in unsigned long aIndex); */
|
||||
NS_IMETHODIMP nsAbMDBDirProperty::RemoveEmailAddressAt(PRUint32 aIndex)
|
||||
NS_IMETHODIMP nsAbMDBDirProperty::RemoveEmailAddressAt(uint32_t aIndex)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
PRUint32 m_dbRowID;
|
||||
uint32_t m_dbRowID;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -62,7 +62,7 @@ NS_IMETHODIMP nsAbMDBDirectory::Init(const char *aUri)
|
|||
// Find the first ? (of the search params) if there is one.
|
||||
// We know we can start at the end of the moz-abmdbdirectory:// because
|
||||
// that's the URI we should have been passed.
|
||||
PRInt32 searchCharLocation = uri.FindChar('?', kMDBDirectoryRootLen);
|
||||
int32_t searchCharLocation = uri.FindChar('?', kMDBDirectoryRootLen);
|
||||
|
||||
nsCAutoString filename;
|
||||
|
||||
|
@ -83,8 +83,8 @@ NS_IMETHODIMP nsAbMDBDirectory::Init(const char *aUri)
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
char** childArray;
|
||||
PRUint32 childCount, i;
|
||||
PRInt32 dotOffset;
|
||||
uint32_t childCount, i;
|
||||
int32_t dotOffset;
|
||||
nsCString childValue;
|
||||
nsDependentCString child;
|
||||
|
||||
|
@ -127,8 +127,8 @@ NS_IMETHODIMP nsAbMDBDirectory::Init(const char *aUri)
|
|||
nsresult nsAbMDBDirectory::RemoveCardFromAddressList(nsIAbCard* card)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
PRUint32 listTotal;
|
||||
PRInt32 i, j;
|
||||
uint32_t listTotal;
|
||||
int32_t i, j;
|
||||
|
||||
// These checks ensure we don't run into null pointers
|
||||
// as we did when we caused bug 280463.
|
||||
|
@ -166,7 +166,7 @@ nsresult nsAbMDBDirectory::RemoveCardFromAddressList(nsIAbCard* card)
|
|||
listDir->GetAddressLists(getter_AddRefs(pAddressLists));
|
||||
if (pAddressLists)
|
||||
{
|
||||
PRUint32 total;
|
||||
uint32_t total;
|
||||
rv = pAddressLists->GetLength(&total);
|
||||
for (j = total - 1; j >= 0; j--)
|
||||
{
|
||||
|
@ -195,7 +195,7 @@ NS_IMETHODIMP nsAbMDBDirectory::DeleteDirectory(nsIAbDirectory *directory)
|
|||
if (NS_SUCCEEDED(rv))
|
||||
database->Commit(nsAddrDBCommitType::kLargeCommit);
|
||||
|
||||
PRUint32 dirIndex;
|
||||
uint32_t dirIndex;
|
||||
if (m_AddressList && NS_SUCCEEDED(m_AddressList->IndexOf(0, directory, &dirIndex)))
|
||||
m_AddressList->RemoveElementAt(dirIndex);
|
||||
// XXX Cast from bool to nsresult
|
||||
|
@ -271,11 +271,11 @@ NS_IMETHODIMP nsAbMDBDirectory::RemoveElementsFromAddressList()
|
|||
|
||||
if (m_AddressList)
|
||||
{
|
||||
PRUint32 count;
|
||||
uint32_t count;
|
||||
nsresult rv;
|
||||
rv = m_AddressList->GetLength(&count);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "Count failed");
|
||||
PRInt32 i;
|
||||
int32_t i;
|
||||
for (i = count - 1; i >= 0; i--)
|
||||
m_AddressList->RemoveElementAt(i);
|
||||
}
|
||||
|
@ -283,7 +283,7 @@ NS_IMETHODIMP nsAbMDBDirectory::RemoveElementsFromAddressList()
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbMDBDirectory::RemoveEmailAddressAt(PRUint32 aIndex)
|
||||
NS_IMETHODIMP nsAbMDBDirectory::RemoveEmailAddressAt(uint32_t aIndex)
|
||||
{
|
||||
if (mIsQueryURI)
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
|
@ -461,8 +461,8 @@ NS_IMETHODIMP nsAbMDBDirectory::DeleteCards(nsIArray *aCards)
|
|||
|
||||
if (NS_SUCCEEDED(rv) && mDatabase)
|
||||
{
|
||||
PRUint32 cardCount;
|
||||
PRUint32 i;
|
||||
uint32_t cardCount;
|
||||
uint32_t i;
|
||||
rv = aCards->GetLength(&cardCount);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
for (i = 0; i < cardCount; i++)
|
||||
|
@ -472,7 +472,7 @@ NS_IMETHODIMP nsAbMDBDirectory::DeleteCards(nsIArray *aCards)
|
|||
|
||||
if (card)
|
||||
{
|
||||
PRUint32 rowID;
|
||||
uint32_t rowID;
|
||||
rv = card->GetPropertyAsUint32("DbRowID", &rowID);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -480,8 +480,8 @@ NS_IMETHODIMP nsAbMDBDirectory::DeleteCards(nsIArray *aCards)
|
|||
{
|
||||
mDatabase->DeleteCardFromMailList(this, card, true);
|
||||
|
||||
PRUint32 cardTotal = 0;
|
||||
PRInt32 i;
|
||||
uint32_t cardTotal = 0;
|
||||
int32_t i;
|
||||
if (m_AddressList)
|
||||
rv = m_AddressList->GetLength(&cardTotal);
|
||||
for (i = cardTotal - 1; i >= 0; i--)
|
||||
|
@ -490,7 +490,7 @@ NS_IMETHODIMP nsAbMDBDirectory::DeleteCards(nsIArray *aCards)
|
|||
if (arrayCard)
|
||||
{
|
||||
// No card can have a row ID of 0
|
||||
PRUint32 arrayRowID = 0;
|
||||
uint32_t arrayRowID = 0;
|
||||
arrayCard->GetPropertyAsUint32("DbRowID", &arrayRowID);
|
||||
if (rowID == arrayRowID)
|
||||
m_AddressList->RemoveElementAt(i);
|
||||
|
@ -520,7 +520,7 @@ NS_IMETHODIMP nsAbMDBDirectory::DeleteCards(nsIArray *aCards)
|
|||
rv = abManager->GetDirectory(listUri, getter_AddRefs(listDir));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRUint32 dirIndex;
|
||||
uint32_t dirIndex;
|
||||
if (m_AddressList && NS_SUCCEEDED(m_AddressList->IndexOf(0, listDir, &dirIndex)))
|
||||
m_AddressList->RemoveElementAt(dirIndex);
|
||||
|
||||
|
@ -624,7 +624,7 @@ NS_IMETHODIMP nsAbMDBDirectory::AddMailList(nsIAbDirectory *list, nsIAbDirectory
|
|||
|
||||
mDatabase->Commit(nsAddrDBCommitType::kLargeCommit);
|
||||
|
||||
PRUint32 dbRowID;
|
||||
uint32_t dbRowID;
|
||||
dblist->GetDbRowID(&dbRowID);
|
||||
|
||||
nsCAutoString listUri(mURI);
|
||||
|
@ -767,9 +767,9 @@ static bool ContainsDirectory(nsIAbDirectory *parent, nsIAbDirectory *directory)
|
|||
parent->GetAddressLists(getter_AddRefs(pAddressLists));
|
||||
if (pAddressLists)
|
||||
{
|
||||
PRUint32 total;
|
||||
uint32_t total;
|
||||
rv = pAddressLists->GetLength(&total);
|
||||
for (PRUint32 i = 0; i < total; ++i)
|
||||
for (uint32_t i = 0; i < total; ++i)
|
||||
{
|
||||
nsCOMPtr<nsIAbDirectory> pList(do_QueryElementAt(pAddressLists, i, &rv));
|
||||
|
||||
|
@ -783,13 +783,13 @@ static bool ContainsDirectory(nsIAbDirectory *parent, nsIAbDirectory *directory)
|
|||
|
||||
// nsIAddrDBListener methods
|
||||
|
||||
NS_IMETHODIMP nsAbMDBDirectory::OnCardAttribChange(PRUint32 abCode)
|
||||
NS_IMETHODIMP nsAbMDBDirectory::OnCardAttribChange(uint32_t abCode)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbMDBDirectory::OnCardEntryChange
|
||||
(PRUint32 aAbCode, nsIAbCard *aCard, nsIAbDirectory *aParent)
|
||||
(uint32_t aAbCode, nsIAbCard *aCard, nsIAbDirectory *aParent)
|
||||
{
|
||||
// Don't notify AbManager unless we have the parent
|
||||
if (!aParent)
|
||||
|
@ -839,7 +839,7 @@ NS_IMETHODIMP nsAbMDBDirectory::OnCardEntryChange
|
|||
}
|
||||
|
||||
NS_IMETHODIMP nsAbMDBDirectory::OnListEntryChange
|
||||
(PRUint32 abCode, nsIAbDirectory *list)
|
||||
(uint32_t abCode, nsIAbDirectory *list)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
|
@ -948,7 +948,7 @@ NS_IMETHODIMP nsAbMDBDirectory::StopSearch()
|
|||
|
||||
// nsAbDirSearchListenerContext methods
|
||||
|
||||
NS_IMETHODIMP nsAbMDBDirectory::OnSearchFinished(PRInt32 aResult,
|
||||
NS_IMETHODIMP nsAbMDBDirectory::OnSearchFinished(int32_t aResult,
|
||||
const nsAString &aErrorMsg)
|
||||
{
|
||||
mPerformingQuery = false;
|
||||
|
@ -982,7 +982,7 @@ nsresult nsAbMDBDirectory::GetAbDatabase()
|
|||
// Get the database of the parent directory.
|
||||
nsCAutoString parentURI(mURINoQuery);
|
||||
|
||||
PRInt32 pos = parentURI.RFindChar('/');
|
||||
int32_t pos = parentURI.RFindChar('/');
|
||||
|
||||
// If we didn't find a / something really bad has happened
|
||||
if (pos == -1)
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче