Changes dictated by <mostafah@oeone.com> so libxpical will build on win32.

This commit is contained in:
jake%acutex.net 2001-12-24 17:11:18 +00:00
parent 5b72606688
commit 7f4c607d18
7 changed files with 11 additions and 8 deletions

View File

@ -57,6 +57,7 @@ OBJS = \
.\$(OBJDIR)\oeICalEventImpl.obj \ .\$(OBJDIR)\oeICalEventImpl.obj \
.\$(OBJDIR)\oeICalFactory.obj \ .\$(OBJDIR)\oeICalFactory.obj \
.\$(OBJDIR)\oeICalImpl.obj \ .\$(OBJDIR)\oeICalImpl.obj \
.\$(OBJDIR)\oeDateTimeImpl.obj \
.\$(OBJDIR)\oeICalStartupHandler.obj \ .\$(OBJDIR)\oeICalStartupHandler.obj \
$(NULL) $(NULL)

View File

@ -35,7 +35,9 @@
* *
*/ */
#ifndef WIN32
#include <unistd.h> #include <unistd.h>
#endif
#include "oeDateTimeImpl.h" #include "oeDateTimeImpl.h"
#include "nsMemory.h" #include "nsMemory.h"
@ -143,7 +145,7 @@ NS_IMETHODIMP oeDateTimeImpl::SetMinute(PRInt16 newval)
NS_IMETHODIMP oeDateTimeImpl::GetTime(PRTime *retval) NS_IMETHODIMP oeDateTimeImpl::GetTime(PRTime *retval)
{ {
unsigned long long result = icaltime_as_timet( m_datetime ); PRTime result = icaltime_as_timet( m_datetime );
*retval = result*1000; *retval = result*1000;
return NS_OK; return NS_OK;
} }
@ -156,7 +158,7 @@ NS_IMETHODIMP oeDateTimeImpl::ToString(char **retval)
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP oeDateTimeImpl::SetTime( PRUint64 ms ) NS_IMETHODIMP oeDateTimeImpl::SetTime( PRTime ms )
{ {
m_datetime = ConvertFromPrtime( ms ); m_datetime = ConvertFromPrtime( ms );
return NS_OK; return NS_OK;

View File

@ -668,7 +668,7 @@ NS_IMETHODIMP oeICalEventImpl::GetNextRecurrence( PRTime begin, PRTime *retval,
printf( "Wrong day in month\n" ); printf( "Wrong day in month\n" );
continue; continue;
} }
unsigned long long nextinms = icaltime_as_timet( next ); PRTime nextinms = icaltime_as_timet( next );
nextinms *= 1000; nextinms *= 1000;
if( (nextinms > begin) && !IsExcepted( nextinms ) ) { if( (nextinms > begin) && !IsExcepted( nextinms ) ) {
// printf( "Result: %d-%d-%d %d:%d\n" , next.year, next.month, next.day, next.hour, next.minute ); // printf( "Result: %d-%d-%d %d:%d\n" , next.year, next.month, next.day, next.hour, next.minute );

View File

@ -67,7 +67,7 @@ oeDateEnumerator : public nsISimpleEnumerator
private: private:
PRUint32 mCurrentIndex; PRUint32 mCurrentIndex;
vector<PRTime> mIdVector; std::vector<PRTime> mIdVector;
}; };
/* oeIcalEvent Header file */ /* oeIcalEvent Header file */
@ -108,7 +108,7 @@ private:
oeDateTimeImpl *m_end; oeDateTimeImpl *m_end;
oeDateTimeImpl *m_recurend; oeDateTimeImpl *m_recurend;
icaltimetype m_lastalarmack; icaltimetype m_lastalarmack;
vector<PRTime> m_exceptiondates; std::vector<PRTime> m_exceptiondates;
icaltimetype GetNextRecurrence( icaltimetype begin ); icaltimetype GetNextRecurrence( icaltimetype begin );
icaltimetype CalculateAlarmTime( icaltimetype date ); icaltimetype CalculateAlarmTime( icaltimetype date );
bool IsExcepted( PRTime date ); bool IsExcepted( PRTime date );

View File

@ -73,7 +73,7 @@ oeEventEnumerator : public nsISimpleEnumerator
private: private:
PRUint32 mCurrentIndex; PRUint32 mCurrentIndex;
vector<PRInt32> mIdVector; std::vector<PRInt32> mIdVector;
nsCOMPtr<oeIICal> mICal; nsCOMPtr<oeIICal> mICal;
}; };

View File

@ -140,7 +140,7 @@ class oeICalImpl : public oeIICal
NS_DECL_OEIICAL NS_DECL_OEIICAL
void SetupAlarmManager(); void SetupAlarmManager();
private: private:
vector<oeIICalObserver*> m_observerlist; std::vector<oeIICalObserver*> m_observerlist;
bool m_batchMode; bool m_batchMode;
EventList m_eventlist; EventList m_eventlist;
nsITimer *m_alarmtimer; nsITimer *m_alarmtimer;

View File

@ -59,7 +59,7 @@ interface oeIDateTime : nsISupports
attribute short hour; attribute short hour;
attribute short minute; attribute short minute;
PRTime getTime(); PRTime getTime();
void setTime( in unsigned long long ms ); void setTime( in PRTime ms );
string toString(); string toString();
}; };