JUST UPDATING SOURCE - NOT PART OF THE BUILD

This commit is contained in:
rhp%netscape.com 2000-05-10 01:11:06 +00:00
Родитель 8fc27c5ee1
Коммит 04741bf5e8
4 изменённых файлов: 23 добавлений и 5 удалений

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

@ -24,4 +24,5 @@
syncDoneSuccess=Synchronization completed successfully.
syncDoneFailed=Synchronization Failed.
syncProgress=Synchronization received %d bytes...
syncStarting=Synchronization starting with %d byte request...
syncStarting=Synchronization starting with %d byte request...
syncConnect=Synchronization connecting to server...

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

@ -27,7 +27,8 @@
#include "nsIStringBundle.h"
#include "prmem.h"
NS_IMPL_ISUPPORTS1(nsAbSyncDriver, nsIAbSyncDriver)
NS_IMPL_THREADSAFE_ISUPPORTS1(nsAbSyncDriver, nsIAbSyncDriver)
// NS_IMPL_ISUPPORTS1(nsAbSyncDriver, nsIAbSyncDriver)
static NS_DEFINE_CID(kAbSync, NS_ABSYNC_SERVICE_CID);
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
@ -119,16 +120,31 @@ NS_IMETHODIMP nsAbSyncDriver::OnStopOperation(PRInt32 aTransactionID, nsresult a
NS_IMETHODIMP nsAbSyncDriver::KickIt(nsIMsgStatusFeedback *aStatus)
{
nsresult rv = NS_OK;
PRInt32 stateVar;
NS_WITH_SERVICE(nsIAbSync, sync, kAbSync, &rv);
if (NS_FAILED(rv) || !sync)
return rv;
sync->GetCurrentState(&stateVar);
if (stateVar != nsIAbSyncState::nsIAbSyncIdle)
return NS_ERROR_FAILURE;
mStatus = aStatus;
// Add ourselves to the party!
sync->AddSyncListener((nsIAbSyncListener *)this);
rv = sync->PerformAbSync(&mTransactionID);
if (NS_SUCCEEDED(rv))
{
if (mStatus)
{
PRUnichar *msgValue = nsnull;
msgValue = GetString(NS_ConvertASCIItoUCS2("syncConnect").GetUnicode());
mStatus->ShowStatusString(msgValue);
PR_FREEIF(msgValue);
}
}
return rv;
}
@ -160,3 +176,4 @@ nsAbSyncDriver::GetString(const PRUnichar *aStringName)
else
return nsCRT::strdup(aStringName);
}

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

@ -488,10 +488,10 @@ NS_IMETHODIMP nsAbSync::PerformAbSync(PRInt32 *aTransactionID)
// Ok, add the header to this protocol string information...
if (mPostString.IsEmpty())
prefixStr = PR_smprintf("last=%u&protocol=%d&client=2&ver=Demo&user=%s",
prefixStr = PR_smprintf("last=%u&protocol=%d&client=2&ver=%s&user=%s",
mLastChangeNum, ABSYNC_PROTOCOL, ABSYNC_VERSION, mUserName);
else
prefixStr = PR_smprintf("last=%u&protocol=%d&client=2&ver=Demo&user=%s&",
prefixStr = PR_smprintf("last=%u&protocol=%d&client=2&ver=%s&user=%s&",
mLastChangeNum, ABSYNC_PROTOCOL, ABSYNC_VERSION, mUserName);
if (!prefixStr)
{

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

@ -84,7 +84,7 @@ typedef struct {
#define SYNC_ALLTAGS 1000
#define SYNC_EMAILS 2000
#define ABSYNC_PROTOCOL 3
#define ABSYNC_VERSION "1"
#define ABSYNC_VERSION "Demo"
#define SYNC_ESCAPE_ADDUSER "op%3Dadd"
#define SYNC_ESCAPE_MOD "op%3Dmod"