2004-05-17 22:15:10 +00:00
|
|
|
// $Id$
|
|
|
|
//
|
2004-04-10 09:11:03 +00:00
|
|
|
// The contents of this file are subject to the BOINC Public License
|
|
|
|
// Version 1.0 (the "License"); you may not use this file except in
|
|
|
|
// compliance with the License. You may obtain a copy of the License at
|
|
|
|
// http://boinc.berkeley.edu/license_1.0.txt
|
|
|
|
//
|
|
|
|
// Software distributed under the License is distributed on an "AS IS"
|
|
|
|
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
|
|
|
// License for the specific language governing rights and limitations
|
|
|
|
// under the License.
|
|
|
|
//
|
|
|
|
// The Original Code is the Berkeley Open Infrastructure for Network Computing.
|
|
|
|
//
|
|
|
|
// The Initial Developer of the Original Code is the SETI@home project.
|
|
|
|
// Portions created by the SETI@home project are Copyright (C) 2002
|
|
|
|
// University of California at Berkeley. All Rights Reserved.
|
|
|
|
//
|
|
|
|
// Contributor(s):
|
|
|
|
//
|
2004-05-17 22:15:10 +00:00
|
|
|
// Revision History:
|
|
|
|
//
|
|
|
|
// $Log$
|
2004-09-01 04:59:32 +00:00
|
|
|
// Revision 1.11 2004/09/01 04:59:32 rwalton
|
|
|
|
// *** empty log message ***
|
|
|
|
//
|
2004-08-11 23:52:22 +00:00
|
|
|
// Revision 1.10 2004/08/11 23:52:11 rwalton
|
|
|
|
// *** empty log message ***
|
|
|
|
//
|
2004-07-13 06:10:32 +00:00
|
|
|
// Revision 1.9 2004/07/13 06:10:32 rwalton
|
|
|
|
// Fixed a typo
|
|
|
|
//
|
2004-07-13 05:56:03 +00:00
|
|
|
// Revision 1.8 2004/07/13 05:56:01 rwalton
|
|
|
|
// Hooked up the Project and Work tab for the new GUI.
|
|
|
|
//
|
2004-07-12 08:46:26 +00:00
|
|
|
// Revision 1.7 2004/07/12 08:46:25 rwalton
|
|
|
|
// Document parsing of the <get_state/> message
|
|
|
|
//
|
2004-06-25 22:51:00 +00:00
|
|
|
// Revision 1.6 2004/06/25 22:50:56 rwalton
|
|
|
|
// Client spamming server hotfix
|
|
|
|
//
|
2004-05-17 22:15:10 +00:00
|
|
|
// Revision 1.5 2004/05/17 22:15:09 rwalton
|
|
|
|
// *** empty log message ***
|
|
|
|
//
|
|
|
|
//
|
2004-04-10 09:11:03 +00:00
|
|
|
|
2004-04-11 04:37:10 +00:00
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
|
|
|
#pragma implementation "MainDocument.h"
|
|
|
|
#endif
|
|
|
|
|
2004-04-10 09:11:03 +00:00
|
|
|
#include "stdwx.h"
|
2004-04-11 04:12:44 +00:00
|
|
|
#include "MainDocument.h"
|
2004-07-12 08:46:26 +00:00
|
|
|
#include "error_numbers.h"
|
2004-04-10 09:11:03 +00:00
|
|
|
|
|
|
|
|
2004-06-25 22:51:00 +00:00
|
|
|
IMPLEMENT_DYNAMIC_CLASS(CMainDocument, CXMLParser)
|
2004-04-10 09:11:03 +00:00
|
|
|
|
|
|
|
|
2004-07-12 08:46:26 +00:00
|
|
|
CMainDocument::CMainDocument()
|
|
|
|
{
|
2004-07-13 05:56:03 +00:00
|
|
|
m_bCachedStateLocked = false;
|
|
|
|
m_dtCachedStateLockTimestamp = wxDateTime::Now();
|
|
|
|
m_dtCachedStateTimestamp = 0;
|
2004-07-12 08:46:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
CMainDocument::~CMainDocument()
|
|
|
|
{
|
2004-07-13 05:56:03 +00:00
|
|
|
m_dtCachedStateTimestamp = wxDateTime::Now();
|
|
|
|
m_dtCachedStateLockTimestamp = wxDateTime::Now();
|
|
|
|
m_bCachedStateLocked = false;
|
2004-07-12 08:46:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxInt32 CMainDocument::GetProjectCount() {
|
|
|
|
CachedStateUpdate();
|
2004-07-12 08:46:26 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxString CMainDocument::GetProjectProjectName(wxInt32 iIndex) {
|
|
|
|
CachedStateUpdate();
|
|
|
|
return wxString::Format(_T(""));
|
2004-07-12 08:46:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxString CMainDocument::GetProjectAccountName(wxInt32 iIndex) {
|
|
|
|
CachedStateUpdate();
|
|
|
|
return wxString::Format(_T(""));
|
2004-07-12 08:46:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxString CMainDocument::GetProjectTeamName(wxInt32 iIndex) {
|
2004-07-13 05:56:03 +00:00
|
|
|
CachedStateUpdate();
|
2004-08-11 23:52:22 +00:00
|
|
|
return wxString::Format(_T(""));
|
2004-07-13 05:56:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxString CMainDocument::GetProjectTotalCredit(wxInt32 iIndex) {
|
2004-07-13 05:56:03 +00:00
|
|
|
CachedStateUpdate();
|
2004-08-11 23:52:22 +00:00
|
|
|
return wxString::Format(_T(""));
|
2004-07-13 05:56:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxString CMainDocument::GetProjectAvgCredit(wxInt32 iIndex) {
|
2004-07-13 05:56:03 +00:00
|
|
|
CachedStateUpdate();
|
2004-08-11 23:52:22 +00:00
|
|
|
return wxString::Format(_T(""));
|
2004-07-13 05:56:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxString CMainDocument::GetProjectResourceShare(wxInt32 iIndex) {
|
2004-07-13 05:56:03 +00:00
|
|
|
CachedStateUpdate();
|
2004-08-11 23:52:22 +00:00
|
|
|
return wxString::Format(_T(""));
|
2004-07-13 05:56:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxInt32 CMainDocument::GetWorkCount() {
|
2004-07-13 05:56:03 +00:00
|
|
|
CachedStateUpdate();
|
2004-08-11 23:52:22 +00:00
|
|
|
return 0;
|
2004-07-13 05:56:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxString CMainDocument::GetWorkProjectName(wxInt32 iIndex) {
|
2004-07-13 05:56:03 +00:00
|
|
|
CachedStateUpdate();
|
2004-08-11 23:52:22 +00:00
|
|
|
return wxString::Format(_T(""));
|
2004-07-13 05:56:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxString CMainDocument::GetWorkApplicationName(wxInt32 iIndex) {
|
2004-07-13 05:56:03 +00:00
|
|
|
CachedStateUpdate();
|
2004-08-11 23:52:22 +00:00
|
|
|
return wxString::Format(_T(""));
|
2004-07-13 05:56:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxString CMainDocument::GetWorkName(wxInt32 iIndex) {
|
2004-07-13 05:56:03 +00:00
|
|
|
CachedStateUpdate();
|
2004-08-11 23:52:22 +00:00
|
|
|
return wxString::Format(_T(""));
|
2004-07-13 05:56:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxString CMainDocument::GetWorkCPUTime(wxInt32 iIndex) {
|
2004-07-13 05:56:03 +00:00
|
|
|
CachedStateUpdate();
|
2004-08-11 23:52:22 +00:00
|
|
|
return wxString::Format(_T(""));
|
2004-07-13 05:56:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxString CMainDocument::GetWorkProgress(wxInt32 iIndex) {
|
2004-07-13 05:56:03 +00:00
|
|
|
CachedStateUpdate();
|
2004-08-11 23:52:22 +00:00
|
|
|
return wxString::Format(_T(""));
|
2004-07-13 05:56:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxString CMainDocument::GetWorkTimeToCompletion(wxInt32 iIndex) {
|
2004-07-13 05:56:03 +00:00
|
|
|
CachedStateUpdate();
|
2004-08-11 23:52:22 +00:00
|
|
|
return wxString::Format(_T(""));
|
2004-07-13 05:56:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxString CMainDocument::GetWorkReportDeadline(wxInt32 iIndex) {
|
2004-07-13 05:56:03 +00:00
|
|
|
CachedStateUpdate();
|
2004-08-11 23:52:22 +00:00
|
|
|
return wxString::Format(_T(""));
|
2004-07-13 05:56:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxString CMainDocument::GetWorkStatus(wxInt32 iIndex) {
|
2004-07-13 05:56:03 +00:00
|
|
|
CachedStateUpdate();
|
2004-08-11 23:52:22 +00:00
|
|
|
return wxString::Format(_T(""));
|
2004-07-13 05:56:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxInt32 CMainDocument::GetTransferCount() {
|
2004-07-13 05:56:03 +00:00
|
|
|
CachedStateUpdate();
|
2004-08-11 23:52:22 +00:00
|
|
|
return 0;
|
2004-07-13 05:56:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxString CMainDocument::GetTransferFileName(wxInt32 iIndex) {
|
2004-07-13 05:56:03 +00:00
|
|
|
CachedStateUpdate();
|
2004-08-11 23:52:22 +00:00
|
|
|
return wxString::Format(_T(""));
|
2004-07-13 05:56:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxString CMainDocument::GetTransferProgress(wxInt32 iIndex) {
|
|
|
|
CachedStateUpdate();
|
|
|
|
return wxString::Format(_T(""));
|
2004-07-12 08:46:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxString CMainDocument::GetTransferProjectName(wxInt32 iIndex) {
|
|
|
|
CachedStateUpdate();
|
|
|
|
return wxString::Format(_T(""));
|
|
|
|
}
|
2004-07-12 08:46:26 +00:00
|
|
|
|
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxString CMainDocument::GetTransferSize(wxInt32 iIndex) {
|
|
|
|
CachedStateUpdate();
|
|
|
|
return wxString::Format(_T(""));
|
2004-04-10 09:11:03 +00:00
|
|
|
}
|
|
|
|
|
2004-07-12 08:46:26 +00:00
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxString CMainDocument::GetTransferSpeed(wxInt32 iIndex) {
|
|
|
|
CachedStateUpdate();
|
|
|
|
return wxString::Format(_T(""));
|
|
|
|
}
|
2004-07-12 08:46:26 +00:00
|
|
|
|
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxString CMainDocument::GetTransferStatus(wxInt32 iIndex) {
|
|
|
|
CachedStateUpdate();
|
|
|
|
return wxString::Format(_T(""));
|
2004-07-12 08:46:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxString CMainDocument::GetTransferTime(wxInt32 iIndex) {
|
|
|
|
CachedStateUpdate();
|
|
|
|
return wxString::Format(_T(""));
|
|
|
|
}
|
2004-07-12 08:46:26 +00:00
|
|
|
|
|
|
|
|
2004-09-01 04:59:32 +00:00
|
|
|
wxInt32 CMainDocument::GetMessageCount() {
|
|
|
|
CachedStateUpdate();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString CMainDocument::GetMessageProjectName(wxInt32 iIndex) {
|
|
|
|
CachedStateUpdate();
|
|
|
|
return wxString::Format(_T(""));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString CMainDocument::GetMessageTime(wxInt32 iIndex) {
|
|
|
|
CachedStateUpdate();
|
|
|
|
return wxString::Format(_T(""));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxInt32 CMainDocument::GetMessagePriority(wxInt32 iIndex) {
|
|
|
|
CachedStateUpdate();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString CMainDocument::GetMessageMessage(wxInt32 iIndex) {
|
|
|
|
CachedStateUpdate();
|
|
|
|
return wxString::Format(_T(""));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxInt32 CMainDocument::CachedStateLock() {
|
|
|
|
m_bCachedStateLocked = true;
|
|
|
|
m_dtCachedStateLockTimestamp = wxDateTime::Now();
|
|
|
|
return 0;
|
2004-07-12 08:46:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxInt32 CMainDocument::CachedStateUnlock() {
|
|
|
|
m_bCachedStateLocked = false;
|
|
|
|
return 0;
|
|
|
|
}
|
2004-07-12 08:46:26 +00:00
|
|
|
|
|
|
|
|
2004-08-11 23:52:22 +00:00
|
|
|
wxInt32 CMainDocument::CachedStateUpdate() {
|
|
|
|
return 0;
|
2004-04-10 09:11:03 +00:00
|
|
|
}
|
2004-04-11 05:09:18 +00:00
|
|
|
|