00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #pragma once
00016 #include "network\MaxNetExport.h"
00017 #include "network\MaxNet.h"
00018 #include "strbasic.h"
00019 #include "maxheap.h"
00020 #include "maxnet_job.h"
00021
00022 struct ManagerInfo;
00023 struct ClientInfo;
00024 struct JobServer;
00025 struct JOBFRAMES;
00026 struct ServerList;
00027 struct NetworkStatus;
00028
00029
00030
00031
00032
00033 #define JOB_STATE_COMPLETE 0
00034 #define JOB_STATE_WAITING 1
00035 #define JOB_STATE_BUSY 2
00036 #define JOB_STATE_ERROR 3
00037 #define JOB_STATE_SUSPENDED 4
00038
00043 struct JobList: public MaxHeapOperators {
00045 Job job;
00047 HJOB hJob;
00060 WORD state;
00061 };
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00079 #pragma warning(push)
00080 #pragma warning(disable:4100)
00081 class MAXNETEXPORT MaxNetCallBack: public MaxHeapOperators {
00082 public:
00084 virtual ~MaxNetCallBack() {;}
00085
00094 virtual bool Progress (int total, int current){return false;}
00101 virtual void ProgressMsg (const MCHAR *message){;}
00102
00106 virtual void ManagerDown ( ){;}
00107
00115 virtual void Update ( ){;}
00116
00129 virtual void QueryControl ( MCHAR* station ){;}
00130
00133 virtual void QueueControl ( ){;}
00134 };
00135 #pragma warning(pop)
00136
00137
00138
00139
00164 class MAXNETEXPORT MaxNetManager : public MaxNet {
00165
00166 public:
00168 virtual ~MaxNetManager() {;}
00169
00170
00171
00178 virtual void SetCallBack ( MaxNetCallBack* cb )=0;
00179
00180
00197 virtual bool FindManager ( short port, char* manager, char* netmask = "255.255.255.0" )=0;
00219 virtual void Connect ( short port, char* manager = NULL, bool enable_callback = false )=0;
00222 virtual void Disconnect ( )=0;
00228 virtual void GetManagerInfo ( ManagerInfo* info )=0;
00235 virtual bool KillManager ( )=0;
00247 virtual void EnableUpdate ( bool enable = true )=0;
00248
00264 virtual bool QueryManagerControl ( bool wait )=0;
00268 virtual bool TakeManagerControl ( )=0;
00280 virtual void GrantManagerControl ( bool grant )=0;
00293 virtual bool LockControl ( bool lock )=0;
00296 virtual int GetClientCount ( )=0;
00312 virtual int ListClients ( int start, int end, ClientInfo* clientList )=0;
00313
00314
00315
00317 virtual int GetJobCount ( )=0;
00331 virtual int ListJobs ( int start, int end, JobList* jobList )=0;
00339 virtual void GetJob ( HJOB hJob, JobList* jobList )=0;
00347 virtual void GetJob ( HJOB hJob, Job* job )=0;
00362 virtual void GetJobText ( HJOB hJob, CJobText& jobText, int count )=0;
00383 virtual void SetJob ( HJOB hJob, Job* job, CJobText& jobText, bool reset )=0;
00389 virtual int GetJobPriority ( HJOB hJob )=0;
00398 virtual bool SetJobPriority ( HJOB hJob, int priority )=0;
00406 virtual void SetJobOrder ( HJOB* hJob, DWORD count )=0;
00412 virtual void DeleteJob ( HJOB hJob )=0;
00418 virtual void SuspendJob ( HJOB hJob )=0;
00424 virtual void ActivateJob ( HJOB hJob )=0;
00430 virtual int GetJobServersCount ( HJOB hJob )=0;
00447 virtual int GetJobServers ( int start, int end, HJOB hJob, JobServer* servers )=0;
00462 virtual void GetJobServerStatus ( HJOB hJob, HSERVER hServer, MCHAR* status_text )=0;
00472 virtual void SuspendJobServer ( HJOB hJob, HSERVER hServer )=0;
00480 virtual void AssignJobServer ( HJOB hJob, HSERVER hServer )=0;
00486 virtual int GetJobFramesCount ( HJOB hJob )=0;
00503 virtual int GetJobFrames ( int start, int end, HJOB hJob, JOBFRAMES* frames )=0;
00523 virtual int GetJobLog ( int start, int count, HJOB hJob, MCHAR** buffer )=0;
00524
00543 virtual bool CheckOutputVisibility ( MCHAR* output, MCHAR* err )=0;
00570 virtual void AssignJob ( Job* job, MCHAR* archive, HSERVER* servers, CJobText& jobtext, DWORD blocksize = 0 )=0;
00571
00572
00573
00574
00577 virtual int GetServerCount ( )=0;
00591 virtual int ListServers ( int start, int end, ServerList* serverList )=0;
00600 virtual void GetServer ( HSERVER hServer, ServerList* serverList )=0;
00609 virtual bool DeleteServer ( HSERVER hServer )=0;
00622 virtual bool ResetServerIndex ( HSERVER hServer )=0;
00630 virtual void GetWeekSchedule ( HSERVER hServer, WeekSchedule* schedule )=0;
00638 virtual void SetWeekSchedule ( HSERVER hServer, WeekSchedule* schedule )=0;
00647 virtual void GetServerNetStat ( HSERVER hServer, NetworkStatus* net_stat )=0;
00648
00650 virtual int GetServerGroupCount ( )=0;
00656 virtual int GetServerGroupXCount ( int group )=0;
00671 virtual int GetServerGroup ( int group, int count, HSERVER* grplist, MCHAR* name )=0;
00681 virtual void NewServerGroup ( int count, HSERVER* grplist, MCHAR* name )=0;
00686 virtual void DeleteServerGroup ( int group )=0;
00687
00688
00689 };
00690
00691
00692
00693
00694 class MaxNetworkInterface: public MaxHeapOperators {
00695 public:
00696 virtual ~MaxNetworkInterface() {;}
00697 virtual bool GetCurrentRenderer ( MCHAR* name, DWORD* id1, DWORD* id2)=0;
00698 };
00699
00700
00701
00702 class MaxNetworkInterface2 : public MaxNetworkInterface {
00703 protected:
00704 int version;
00705 public:
00706 MaxNetworkInterface2() { version = 6010; }
00707 int GetMAXVersion() {return version;}
00708 void SetMAXVersion(int version) {this->version = version;}
00709
00710
00711 virtual BOOL GetRendMultiThread() {return FALSE;}
00712 virtual BOOL GetRendSimplifyAreaLights() {return FALSE;}
00713 virtual BOOL GetUseAdvLight() {return FALSE;}
00714 virtual BOOL GetCalcAdvLight() {return FALSE;}
00715
00716
00717
00718
00719
00720 };
00721
00722
00723 MAXNETEXPORT void AssignJobEx(
00724 MaxNetManager* mgr,
00725 MaxNetworkInterface* maxIface,
00726 Job* job,
00727 MCHAR* archive,
00728 HSERVER* servers,
00729 CJobText& jobtext,
00730 DWORD blocksize = 0 );
00731
00732
00733 MAXNETEXPORT void AssignJobEx(
00734 MaxNetManager* mgr,
00735 MaxNetworkInterface2* maxIface,
00736 Job* job,
00737 MCHAR* archive,
00738 HSERVER* servers,
00739 CJobText& jobtext,
00740 DWORD blocksize = 0 );
00741
00742
00743