NS_IMETHOD Run() {
		nsresult rv = NS_OK;
		if (m_Result == EWS_SUCCESS) {
			//Save item id
			rv = SetPropertyString(m_Todo,
			                       NS_LITERAL_STRING("X-ITEM-ID"),
			                       m_ItemId);
			NS_ENSURE_SUCCESS(rv, rv);

			//Save change key
			rv = SetPropertyString(m_Todo,
			                       NS_LITERAL_STRING("X-CHANGE-KEY"),
			                       m_ChangeKey);
			NS_ENSURE_SUCCESS(rv, rv);

			nsCString oldUid;
			rv = m_Todo->GetId(oldUid);

			if (NS_SUCCEEDED(rv) && oldUid.IsEmpty()) {
				//Updat the uid
				m_Todo->SetId(m_ItemId);
			}
		}
		NotifyEnd(m_Runnable, m_Result);
		
		return NS_OK;
	}
	NS_IMETHOD Run() {
        nsresult rv = NS_OK;
        //update identity outgoin server
        rv = UpdateOutgoingServer(m_Port);
        NS_FAILED_WARN(rv);
	
		NotifyEnd(m_Runnable, NS_SUCCEEDED(rv) ? EWS_SUCCESS : EWS_FAIL);

		return NS_OK;
	}
	NS_IMETHOD Run() {
        mailews_logger << "sync calendar done task running."
                       << std::endl;
		m_SyncCalendarTask->CleanupTaskRun();
		
		NotifyEnd(m_Runnable, m_Result);
		
        mailews_logger << "sync calendar done task done."
                       << std::endl;
		return NS_OK;
	}
	NS_IMETHOD Run() {
        mailews_logger << "sync item done task running."
                       << std::endl;
		if (m_pTaskCallback)
			m_pTaskCallback->TaskDone(m_Result);

		NotifyEnd(m_Runnable, m_Result);
		
        mailews_logger << "sync item done task done."
                       << std::endl;
		return NS_OK;
	}
	NS_IMETHOD Run() {
		nsresult rv;
		nsCOMPtr<IMailEwsMsgFolder> ewsFolder(do_QueryInterface(m_Folder, &rv));
    
		if (NS_FAILED(rv)) {
			NotifyError(m_Runnable, (int)rv, "unable to get ews folder");
		} else if (m_Result == EWS_SUCCESS) {
			rv = ewsFolder->ClientRename(m_NewName, m_MsgWindow);

			if (NS_FAILED(rv)) {
				NotifyError(m_Runnable, (int)rv, "unable to rename folder");
			}
		}

		NotifyEnd(m_Runnable, m_Result);
		return NS_OK;
	}
示例#6
0
void CFX_SAXReader::ParseTagEnd() {
  if (m_CurByte < 0x21) {
    return;
  }
  if (m_CurByte == '>') {
    Pop();
    m_dwNodePos = m_File.m_dwCur + m_File.m_dwBufIndex;
    m_iDataLength = m_iDataPos;
    m_iDataPos = 0;
    if (m_pHandler) {
      NotifyEnd();
    }
    Pop();
    m_eMode = FX_SAXMODE_Text;
  } else {
    ParseChar(m_CurByte);
  }
}
	NS_IMETHOD Run() {
		MOZ_ASSERT(NS_IsMainThread()); // This method is supposed to run on the main thread!
		nsresult rv = NS_OK;

        mailews_logger << "item done task running"
                       << std::endl;
		if (m_Result == EWS_SUCCESS) {
			rv = m_ItemsCallback->LocalOperation(m_RemoteResponse);

			if (NS_FAILED(rv))
				m_Result = EWS_FAIL;
		}

		m_ItemsCallback->FreeRemoteResponse(m_RemoteResponse);

		NotifyEnd(m_Runnable, m_Result);
		
        mailews_logger << "item done task done."
                       << std::endl;
		return NS_OK;
	}