00001 #ifndef __VEMUS_P2P__H__
00002 #define __VEMUS_P2P__H__
00003
00004
00005
00006
00007
00008
00009
00010 #ifdef VEMUSP2P_EXPORTS
00011 #define VEMUSP2P_API __declspec(dllexport)
00012 #else
00013 #define VEMUSP2P_API __declspec(dllimport)
00014 #endif
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include <Windows.h>
00024 #include <string>
00025 #include <vector>
00026
00027
00028
00029
00030
00031
00032
00033
00041 using namespace std;
00042
00043 namespace VEMUS
00044 {
00045
00046
00047
00048 typedef void * VemusParticipantList;
00049
00050
00051 typedef enum
00052 {
00053 Normal = 0,
00054 Master,
00055 Slave
00056 }
00057 VemusCollaborativeMode;
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075 typedef long (CALLBACK* ClassroomAddUserCB)( const wchar_t* , BOOL );
00076 typedef long (CALLBACK* ProcessExerciseCB)( char* , long );
00077 typedef long (CALLBACK* NewClassromExerciseCB)( BYTE * , long, char * );
00078
00079
00080
00081
00082 long VEMUSP2P_API OpenGraph(WCHAR *wzPeerId, WCHAR *wzGraphId );
00083
00084 long VEMUSP2P_API CreateGraph(PWSTR wzCreatorId, PWSTR wzGraphId);
00085
00086
00087 void VEMUSP2P_API VemusClassroomUserCallback( ClassroomAddUserCB );
00088
00089
00090
00091
00092 long VEMUSP2P_API VemusInitializeClassroom( );
00093
00094
00098 void VEMUSP2P_API VemusSetSessionHandle(long);
00099
00100 long VEMUSP2P_API VemusGetSessionHandle();
00101
00102
00106 long VEMUSP2P_API VemusSessionInitialize();
00107
00108
00109 long VEMUSP2P_API VemusClassAddStateRecord(PCWSTR pwzState);
00110
00111
00112 long VEMUSP2P_API VemusSendExerciseCommand(char * cmd, int nSize );
00113
00114
00115
00116 long VEMUSP2P_API VemusProcessExerciseCommand(ProcessExerciseCB );
00117
00118
00119 long VEMUSP2P_API VemusSendExerciseToClass(BYTE * pBytes , int size, char * szDestFile );
00120
00121
00122 void VEMUSP2P_API VemusOnNewClassroomExerciseCB( NewClassromExerciseCB );
00123
00124
00125
00126
00127
00128 HRESULT VEMUSP2P_API VemusSendClassroomUICommand( wchar_t * szCmd , long lSize, long lParam1=0, long lParam2=0);
00129
00130
00131 HRESULT VEMUSP2P_API VemusSendPerformanceToClass(BYTE * pBytes , int size, char * szPerfName, bool isReference );
00132
00133
00134 void VEMUSP2P_API VemusShutdownClassroom();
00135
00136
00137
00138 HRESULT VEMUSP2P_API OpenDirectConnection( wchar_t * destination , bool bConnect = true);
00139
00140
00141 bool SearchForStateRecord();
00142
00143 bool BroadcastMasterMode( wstring w );
00144
00145 bool CleanupExerciseRecords();
00146
00147
00148
00149 }
00150
00151 #endif
00152
00153
00154
00155
00156
00157