incubator-bluesky-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tp...@apache.org
Subject svn commit: r662948 [31/31] - in /incubator/bluesky/NCstu-2.0: ./ autom4te.cache/ include/ intl/ po/ src/ src/.deps/ src/ffmpeg/ src/pic/
Date Wed, 04 Jun 2008 02:48:20 GMT
Added: incubator/bluesky/NCstu-2.0/src/language_test.h
URL: http://svn.apache.org/viewvc/incubator/bluesky/NCstu-2.0/src/language_test.h?rev=662948&view=auto
==============================================================================
--- incubator/bluesky/NCstu-2.0/src/language_test.h (added)
+++ incubator/bluesky/NCstu-2.0/src/language_test.h Tue Jun  3 19:48:16 2008
@@ -0,0 +1,240 @@
+//sourcename.list
+
+#ifndef _LANGUAGE_TEST_H_
+#define _LANGUAGE_TEST_H_
+#define LANGUAGE_EN
+//windows title Main Frame
+extern char* p_window_title_MainFrame;
+
+//toolbar options---->start
+extern char* p_toolbar_start;
+
+//toolbar options---->start---->network configuration
+extern	char* p_toolbar_start_NetConf;
+
+//toolbar options---->start---->logon system
+extern	char* p_toolbar_start_LogonSys;
+
+//toolbar options---->start---->exit system
+extern	char* p_toolbar_start_ExitSys;
+
+//toolbar options---->class
+extern	char* p_toolbar_Class ;
+
+//toolbar options---->class---->join class 
+extern	char* p_toolbar_Class_Join;
+
+//toolbar options---->class---->quit class 
+extern	char* p_toolbar_Class_Quit;
+
+//toolbar options---->operations 
+extern char* p_toolbar_Operations;
+
+//toolbar options---->operations---->interactive 
+extern	char* p_toolbar_Operations_Interactive;
+
+//toolbar options---->operations---->Quit interactive 
+extern	char* p_toolbar_Operations_QInteractive;
+
+//toolbar options---->help 
+extern	char* p_toolbar_Help;
+
+//toolbar options---->help---->about 
+extern	char* p_toolbar_Help_About;
+
+//Graphic Buttons Network Configure 
+extern	char* p_GraphButt_NetConf;
+
+//Graphic Buttons Comment Network configuration 
+extern	char* p_GraphButt_Comment_NetConf;
+
+//Graphic Buttons Logon System 
+extern	char* p_GraphButt_LogSys;
+
+//Graphic Buttons Comment Logon System 
+extern	char* p_GraphButt_Comment_LogSys;
+
+//Graphic Buttons Join Class 
+extern	char* p_GraphButt_JoinClass;
+
+//Graphic Buttons Comment Join Class 
+extern	char* p_GraphButt_Comment_JoinClass;
+
+//Graphic Buttons Quit Class 
+extern	char* p_GraphButt_QuitClass;
+
+//Graphic Buttons Comment Quit Class 
+extern	char* p_GraphButt_Comment_QuitClass;
+
+//Graphic Buttons Interactive 
+extern	char* p_GraphButt_Interactive;
+
+//Graphic Buttons Comment Interactive 
+extern	char* p_GraphButt_Comment_Interactive;
+
+//Graphic Buttons Quit interactive
+extern	char* p_GraphButt_QInteractive;
+
+//Graphic Buttons Comment Quit Interactive 
+extern	char* p_GraphButt_Comment_QInteractive;
+
+//Graphic Buttons Exit System
+extern	char* p_GraphButt_ExitSys;
+
+//Graphic Buttons Comment Exit System 
+extern	char* p_GraphButt_Comment_ExitSys;
+
+//Buttons Student View
+extern	char* p_Butt_StuView;
+
+//Buttons My View
+extern	char* p_Butt_MyView;
+
+//Static text Input Message
+extern	char* p_StaticTxt_InputMessage;
+
+//Buttons Send Message
+extern	char* p_Butt_SendMessage;
+
+//Buttons Clear Message
+extern	char* p_Butt_ClearMessage;
+
+///////////////////////////////////////////////////////////////
+//Windows Title Logon System
+extern	char * p_Window_Title_LogonSys;
+
+ //Static Text LogonSystem---->User Name
+extern	char * p_LogonSys_StaticTxt_UserName;
+
+ //Static Text LogonSystem---->Password
+extern	char * p_LogonSys_StaticTxt_Password;
+
+//Logon System button Cancel
+extern char * p_LogonSys_Butt_Cancel;
+
+//Logon System button OK
+extern char * p_LogonSys_Butt_OK;
+///////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////
+//
+//							Network configuration Dialog
+//
+//Windows Title Network configuration
+extern	char * p_Window_Title_NetConf;
+
+//Static Text Network configuration---->Class Server Center IP Address
+extern	char * p_NetConf_StaticTxt_ClassServerIP;
+
+//Static Text Network configuration---->Class Server Center Port
+extern	char * p_NetConf_StaticTxt_ClassServerPort;
+
+//Static Text Network configuration---->User IP Address
+extern	char * p_NetConf_StaticTxt_UserIP;
+
+//Static Text Network configuration---->Standard Receive Port
+extern	char * p_NetConf_StaticTxt_StdRevPort;
+
+//Network configuration Buttons Comment Amateur Cautious
+extern	char * p_NetConf_Butt_Comment_AmateurCautious;
+
+//Network configuration Buttons Advanced settings
+extern	char * p_NetConf_Butt_Advance;
+
+//Network configuration button Cancel
+extern char * p_Netconf_Butt_Cancel;
+
+//Network configuration button OK
+extern char * p_Netconf_Butt_Ok;
+/////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////
+//
+//
+/////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////
+//
+//
+//													Exit Dialog
+//
+//Static Text Exit Dialog??
+extern char * p_StaticTxt_ExitSys;
+//
+//Buttons ExitDialog Cancel
+extern char * p_ExitDialog_Butt_Cancel;
+//
+//Buttons ExitDialog Yes
+extern char * p_ExitDialog_Butt_Yes;
+/////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////
+//
+//
+/////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////
+//
+//
+//													Class List Dialog
+//
+//windows title class list
+extern	char * p_Window_Title_ClassList;
+//
+//Class list dialog lable class ID
+extern	char * p_Lable_ClassListDLG_ClassID;
+//
+//Class list dialog lable class name
+extern	char * p_Lable_ClassListDLG_ClassName;
+//
+//Class list dialog lable teacher name
+extern	char * p_Lable_ClassListDLG_TeacherName;
+//
+//Class list dialog lable class state
+extern	char * p_Lable_ClassListDLG_ClassState;
+//
+//Class list dialog lable class introduction
+extern	char * p_Lable_ClassListDLG_ClassIntro;
+//
+//Class list dialog button Help
+extern	char * p_Butt_ClassListDLG_Help;
+//
+//Class list dialog button Cancel
+extern	char * p_Butt_ClassListDLG_Cancel;
+//
+//Class list dialog button OK
+extern	char * p_Butt_ClassListDLG_OK;
+/////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////
+//
+//
+/////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////
+//
+//
+//													Quit Class Dialog
+//
+//Quit Class Dialog Static text Quit Class~?
+//
+extern	char * p_StaticTxt_QuitClassDLG_QuitClass;
+//
+//Quit Class Dialog Buttons Cancle Quit
+extern	char * p_Butt_QuitClass_Cancel;
+//
+//Quit Class Dialog Buttons Quit Class
+//
+extern	char * p_Butt_QuitClass_QuitClass;
+/////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////
+//
+//
+/////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////
+//
+//
+//													About Dialog
+//
+//About Dialog windows title
+extern char * p_Window_Title_AboutDlg;
+//
+//About Dialog Static text System informations
+extern char * p_StaticTxt_AboutDlg_AboutSys;
+//
+//About Dialog Buttons OK
+extern char * p_Butt_AboutDLG_OK;
+#endif

Added: incubator/bluesky/NCstu-2.0/src/nc_stu.cc
URL: http://svn.apache.org/viewvc/incubator/bluesky/NCstu-2.0/src/nc_stu.cc?rev=662948&view=auto
==============================================================================
--- incubator/bluesky/NCstu-2.0/src/nc_stu.cc (added)
+++ incubator/bluesky/NCstu-2.0/src/nc_stu.cc Tue Jun  3 19:48:16 2008
@@ -0,0 +1,130 @@
+
+// generated 2006/5/17 19:19:23 HKT by root@10h82.(none)
+// using glademm V2.0.0.1
+//
+// newer (non customized) versions of this file go to test.cc_new
+
+// This file is for your program, I won't touch it again!
+
+#include <config.h>
+
+#include <gtk/gtk.h>
+#include <gdk/gdk.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+
+#include <glib.h>
+
+#include "interface.hh"
+#include "support.hh"
+#include "ncclient.hh"
+#include "client_communicate.h"
+//#include "en_de_screen.h"
+#include "en_de_video.h"
+#include "en_de_audio.h"
+#include "en_de_screen.h"
+#include "callbacks.hh" 
+ 
+#define STUDENT_VERSION  "2.0"
+#define MODIFY_INFO "modify clientsocket.cc and pixmap"
+
+client_ts_communicate client_comm;
+
+CScreenReceiver g_teacher_screenreceiver;
+CVideoReceiver g_teacher_videoreceiver;
+CAudioReceiver g_teacher_audioreceiver;
+
+CVideoReceiver g_student_videoreceiver;
+CAudioReceiver g_student_audioreceiver;
+
+CV4LStuVideoSender g_student_videosender;
+CStuAudioSender g_student_audiosender;
+
+ DWORD TeacherMode;
+ DWORD chatMode;
+ DWORD Focus_student;
+ struct class_center  center;
+
+ 
+int main(int argc, char **argv)
+{  
+	 if(argc==2)                 //below printf the version information
+    {
+    	if( (strcmp(argv[1],"--version")==0) )
+   		 {
+     		   printf("\n nc_student (copyright ? XJTU), version %s\n\n",STUDENT_VERSION);
+      		  return 0;
+   		 }
+		 else if(strcmp(argv[1],"-v")==0)
+		 {
+			 printf("%s\n",STUDENT_VERSION);
+		 }
+  		 else if(strcmp(argv[1],"-d")==0)
+		 {
+			 printf("%s\n",MODIFY_INFO);
+		 }
+        else	
+		 printf("\n unknow parameter!\n\n");
+		 
+		 return 0;
+    	}       
+  		 GtkWidget *mainwindow;		 		
+ 		TeacherMode=1;      
+	   	Focus_student=0;
+  		gtk_set_locale ();
+  	    config_file_read();
+
+ 		 gtk_init (&argc, &argv);
+
+        add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps");
+  /*
+   * The following code was added by Glade to create one of each component
+   * (except popup menus), just so that you see something after building
+   * the project. Delete any components that you don't want shown initially.
+   */
+   getip() ;
+/*		
+#define MCAST_IP		"202.117.10.86"
+#define MCAST_PORT1		8000
+#define MCAST_PORT2		8100
+#define MCAST_PORT3		8200
+#define SERVER_PORT1		4200
+#define SERVER_PORT2		4202
+#define SERVER_PORT3		4204	
+
+CAudioSender  audiosender;
+CAudioReceiver audioreceiver;
+
+	unsigned long intIP2 = inet_addr(MCAST_IP);
+	intIP2 = ntohl(intIP2); //put in host byte order
+	RTPIPv4Address rtpAddr1(intIP2, MCAST_PORT1);
+	RTPIPv4Address rtpAddr2(intIP2, MCAST_PORT2);
+	RTPIPv4Address rtpAddr3(intIP2, MCAST_PORT3);
+	
+	if(!audioreceiver.Init())
+		return 1;
+	if(audioreceiver.Start(8200)<0)
+		return 3;
+	
+	if(!audiosender.Init(4200))
+		return 1;
+	
+	audiosender.AddDestination(rtpAddr3);
+	if(audiosender.Start("audio_A.mp3", true)<0)
+		return 2;
+	
+	//sleep(5);
+	//audioreceiver.Stop();
+	//audioreceiver.Init();
+	//audioreceiver.Start(8200);
+//*/
+		
+   mainwindow = create_mainwindow();
+   gtk_widget_show (mainwindow);
+   gtk_timeout_add(1000,timer_callback,NULL);
+   gtk_main ();   
+   return 0;
+}

Propchange: incubator/bluesky/NCstu-2.0/src/nc_stu.cc
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bluesky/NCstu-2.0/src/ncclient.hh
URL: http://svn.apache.org/viewvc/incubator/bluesky/NCstu-2.0/src/ncclient.hh?rev=662948&view=auto
==============================================================================
--- incubator/bluesky/NCstu-2.0/src/ncclient.hh (added)
+++ incubator/bluesky/NCstu-2.0/src/ncclient.hh Tue Jun  3 19:48:16 2008
@@ -0,0 +1,390 @@
+#ifndef _NCCLIENT_H
+#define _NCCLIENT_H
+
+#include<stdio.h>
+#include<string.h>
+#define CLIENT_SIZE  200 
+
+typedef unsigned long DWORD;
+struct CRCLMSG
+{
+    DWORD rclType;//ÏûÏ¢ÀàÐÍ
+    DWORD msglen;//ÏûÏ¢ÄÚÈݳ¤¶È
+    char msg[10000];//ÏûÏ¢ÄÚÈÝ
+};
+ ///////////////////One¸÷¶ËµãµÇ¼ÏûÏ¢//////////////////////
+//¿Í»§¶ËµÇ¼ÏûÏ¢£¨5020£©
+struct TRCClientLogin 
+{
+    char  ClientName[CLIENT_SIZE];    //¿Í»§¶ËµÇ¼Ãû
+	DWORD ClientVersionID;  //°æ±¾ºÅ(ÐÂÔö¼Ó)
+	char  ClientPass[16];    //¿Í»§¶ËµÇ¼ÃÜÂë
+	char  ClientIP[16];      //½Úµã»ñµÃµÄ±¾»úIPµØÖ·
+	
+	  
+	DWORD SeMCU_TAPort;
+	DWORD SeMCU_TVPort;
+	DWORD SeMCU_TSPort; 
+	DWORD SeMCU_SAPort;
+	DWORD SeMCU_SVPort;	
+		
+};
+//×éÐÅÏ¢
+struct TGroupInfo 
+{
+	DWORD GroupID; //×éID
+	char GroupName[128]; //×éµÄÃû³Æ
+	char TeacherName[CLIENT_SIZE]; //½ÌʦÃû³Æ
+};
+struct TClientInfo
+{ 
+    int  ClientID;   //·þÎñÖÐÐĸø¿Í»§¶Ë·ÖÅäµÄΨһ±êʶID
+	char ClientN[CLIENT_SIZE];    //¿Í»§¶ËÃû
+};
+
+//ÏìÓ¦ÏûÏ¢
+//ID : 5021
+struct TRCClientLoginR 
+{
+	DWORD ResponseType; //·µ»ØÀàÐÍ£¬Èç¹û0£¬³É¹¦µÇ¼
+	DWORD ClientID; //Óû§ID
+	DWORD ClientType; //Óû§ÀàÐÍ 0£º¹«Íø£»1£ºÄÚÍø
+};
+/////////////////Two¸÷¶ËµãÍ˳öÏûÏ¢//////////////////////
+
+//¿Í»§¶ËÍ˳öÏûÏ¢(5050)
+struct TRCClientLogout
+{
+	int ClientID ;   //¿Í»§¶ËID
+}; 
+///////////////////Three×é²Ù×÷ÏûÏ¢////////////////////////////
+//2.	Êڿζ˳·Ïú×éÏûÏ¢£¨10010£©
+struct TRCDestoryGroup
+{
+   int TeacherID;   //ÊڿζËID
+   int GroupID;     //×é ID
+};
+
+//ÏìÓ¦ÏûÏ¢A£¨10011£©¸øÊڿζË
+struct TRCDestoryGroupR
+{
+	int ResponseType; //·µ»ØÀàÐÍ
+};
+//ÏìÓ¦ÏûÏ¢B£¨10012£©  ¸øÆäËûËùÓнڵã
+struct TRCDestoryGroupRToClient
+{
+   int GroupID;   //×é ID
+};
+
+ //3.	¿Í»§¶Ë¼ÓÈë×éÏûÏ¢£¨10020£©
+struct TRCClientJionInGroup
+{
+   int ClientID;    //·þÎñÖÐÐĸø¿Í»§¶Ë·ÖÅäµÄΨһ±êʶID
+   int GroupID;     //×é ID
+   /////////ÒÔÏÂ5¸ö¶Ë¿ÚÓÃÓÚ¿Í»§¶Ë½ÓÊÕÊڿζËÊÓÒôƵÊý¾Ý¡¢ÆÁÄ»Êý¾ÝºÍ½¹µã¿Í»§¶ËµÄÊÓÒôƵÊý¾Ý
+   int C_TAPort;    //¿Í»§¶Ë½ÓÊÕÊڿζËÒôƵ¶Ë¿Ú
+   int C_TVPort;    //¿Í»§¶Ë½ÓÊÕÊڿζËÊÓƵ¶Ë¿Ú
+   int C_TScrPort;  //¿Í»§¶Ë½ÓÊÕÊڿζËÆÁÄ»¶Ë¿Ú
+   int C_CAPort;    //¿Í»§¶Ë½ÓÊÕ½¹µã¿Í»§¶ËÒôƵ¶Ë¿Ú
+   int C_CVPort;    //¿Í»§¶Ë½ÓÊÕ½¹µã¿Í»§¶ËÊÓƵ¶Ë¿Ú
+};
+//¿Í»§¶ËÐÅÏ¢ÀàÐÍ
+struct TSState
+{  
+   int  ClientID;    //ѧÉú¶ËID
+   char ClientN[CLIENT_SIZE]; //client name
+   int  AVMode;     //0:ÕýÔÚ½»»¥£»1:ûÓн»»¥£»ËùÓÐÁбíÖÐÖ»ÓÐÒ»¸öÕýÔÚ½»»¥µÄ¿Í»§¶Ë
+};
+//ÏìÓ¦ÏûÏ¢A£¨10021£©£¬¸ø¸Ã¿Í»§·µ»ØËùÓÐ×éÄÚÓû§ÐÅÏ¢
+struct CRCLClientJoinInGroupR
+{
+        DWORD ResponseType;
+        DWORD GroupID;
+        char MCUIP[16]; //MCU IP
+        char SeMCUIP[16];//¸¨MCUIP
+        DWORD TAPort;
+        DWORD TVPort;
+        DWORD TSPort;
+        DWORD CAPort; //MCU ½ÓÊÕ½¹µãÊÓÒôƵµÄ¶Ë¿Ú£¬ÒôƵ¶Ë¿Ú
+        DWORD CVPort; //ÊÓƵ¶Ë¿Ú
+        //DWORD IfSeMCU;//1£ºÊÇÄÚÍø¸¨mcu£»0£ºÆÕͨÌý¿Î¶Ë
+        DWORD RoomMode; //0 :ÁÄÌì;1:ÊÚ¿Î
+};
+ 
+
+struct TRCNewClientJionInGroupR
+{
+  int  ResponseType;  //·µ»ØÀàÐÍ£¬Èç¹û0£¬³É¹¦¼ÓÈë×é
+  int  GroupID;       
+  char TU_IP[16]; 
+  char SeTUIP;
+  int  TU_TAPort;    //Ö÷»òÕßÄÚÍø¸¨TUµÄÒôƵ½ÓÊն˿Ú
+  int  TU_TVPort;    //Ö÷»òÕßÄÚÍø¸¨TUµÄÊÓƵ½ÓÊն˿Ú
+  int  TU_TScrPort;  //Ö÷»òÕßÄÚÍø¸¨TUµÄÆÁÄ»½ÓÊն˿Ú
+  int  TU_CAPort;    //Ö÷»òÕßÄÚÍø¸¨TUµÄ½¹µãѧÉúÒôƵ½ÓÊն˿Ú
+  int  TU_CVPort;    //Ö÷»òÕßÄÚÍø¸¨TUµÄ½¹µãѧÉúÊÓƵ½ÓÊն˿Ú
+  int  IfseTU;       //¸ÃÄÚÍøÌý¿Î¶ËÊÇ·ñ³Ðµ£ÄÚÍø¸¨TUµÄ×÷Óá£0£ºÄÚÍø¸¨Tu
1£ºÆÕͨÌý¿Î¶Ë 
+};
+//ÄÚÍøÖÐÆÕͨÌý¿Î¶Ë¼ÓÈë×éÖ®ºó¸ø¸¨TUÌý¿Î¶ËµÄÏìÓ¦£¨10024£©
+struct TRCNewClientJionInGroupRToSeTUClient
+{
+   int   ClientID;
+   char  ClientIP[16];
+   int   C_TAPort;   //¿Í»§¶Ë½ÓÊÕÊڿζËÒôƵ¶Ë¿Ú
+   int   C_TVPort;   //¿Í»§¶Ë½ÓÊÕÊڿζËÊÓƵ¶Ë¿Ú
+   int   C_TScrPort; //¿Í»§¶Ë½ÓÊÕÊڿζËÆÁÄ»¶Ë¿Ú
+   int   C_CAPort;   //¿Í»§¶Ë½ÓÊÕ½¹µã¿Í»§¶ËÒôƵ¶Ë¿Ú
+   int   C_CVPort;   //¿Í»§¶Ë½ÓÊÕ½¹µã¿Í»§¶ËÊÓƵ¶Ë¿Ú
+};
+//ÏìÓ¦ÏûÏ¢B£¨10022£© ¸øÊڿζ˼°ÆäËû¿Í»§¶Ë
+struct  TRCClientJionInGroupRToAll
+{
+   struct TSState  ClientInfo;  //¿Í»§¶ËÐÅÏ¢
+};
+
+//¿Í»§¶ËÀ뿪×éÏûÏ¢£¨10030£©
+struct TRCClientLeaveGroup
+{ 
+  int ClientID;  //¿Í»§¶ËID
+  int GroupID;   //×éID
+};
+//ÏìÓ¦ÏûÏ¢A(10031)  ¸ø¸Ã¿Í»§¶Ë
+struct TRCClientLeaveGroupR
+{
+  int  ResponseType; //·µ»ØÀàÐÍ------------------------------£¬Èç¹û0£¬³É¹¦Í˳ö
+  int  GroupID;      //Group ID
+};
+//ÏìÓ¦ÏûÏ¢B£¨10032£© ¸øÆäËû¿Í»§¶ËºÍÊڿζË
+struct TRCClientLeaveGroupRToAll
+{
+  struct TSState ClientInfo;
+};
+//ÏìÓ¦ÏûÏ¢C£¨10033£©  ¸øMCU
+struct TRCClientLeaveGroupRToMCU
+{
+   struct TClientInfo ClientInfo;  //¿Í»§¶ËÐÅÏ¢ÀàÐÍ
+	
+};
+ //MCUÀ뿪×éÏûÏ¢£¨10040£©
+struct TRCMCILeaveGroup
+{
+   int MCUID;  //MCU ID
+};
+ //ÏìÓ¦ÏûÏ¢B£¨10042£©
+struct TRCMCULeaveGroupRToOther
+{
+   int  GroupID;
+};
+//ÏìÓ¦ÏûÏ¢A£¨10081£©
+struct TRCSeMCULeaveGroupR
+{
+   int  ResponseType;
+};
+// ÏìÓ¦ÏûÏ¢B£¨10082£©¸øʹÓøø¨MCUµÄ¿Í»§¶Ë
+struct TRCSeMCULeaveGroupRToClient
+{
+   int SeMCUID;
+};
+//6£®¿Í»§¶ËÇëÇó»ñÈ¡µ±Ç°×éÐÅÏ¢ÏûÏ¢£¨10050£©
+struct TRCClientGetGroupInfo
+{
+   DWORD ClientID;
+};
+//ÏìÓ¦ÏûÏ¢£¨10051£©
+struct TRCClientGetGroupInfoR
+{
+   int       ResponseType;
+   DWORD  GroupCount;
+   DWORD  groupchatMode;
+	struct TGroupInfo GroupList[10];
+	   
+};
+
+
+
+//////////////////////////////////////////////////////////////////////////
+/////////////////////////×éÄÚ²Ù×÷ÏûÏ¢/////////////////////////////////////
+
+//ÊڿζË×éÄÚÎı¾Êý¾Ý¹ã²¥ÏûÏ¢
+//ID : 1000
+struct TCRCLTeacherTextBroadcast 
+{
+	int TeacherID;
+	int GroupID;
+	char TeacherN[CLIENT_SIZE];   //½ÌʦÃû
+	int InfoLength;     //ÏûÏ¢³¤¶È
+	char Info[1024];   //ÏûÏ¢ÄÚÈÝ
+};
+
+//ÏìÓ¦ÏûÏ¢£¨1001£© ¸øËùÓеĶ˵㻧
+//ID : 1001
+struct TCRCLTeacherTextBroadcastR
+{
+	char TeacherN[CLIENT_SIZE]; //·¢ËÍÕßÃû³Æ
+	int InfoLength; //ÏûÏ¢³¤¶È
+	char Info[1024]; //ÏûÏ¢ÄÚÈÝ
+};
+
+//¿Í»§¶ËÉêÇë½¹µã²Ù×÷
+//ID : 1010
+struct TCRCLClientApplyFocus 
+{
+	int ClientID;
+	int GroupID;
+};
+
+//ÏìÓ¦ÏûÏ¢£¨1011£©£¬Èç¹ûÉêÇë³É¹¦£¬¸Ã¿Í»§¶Ë¸øMCU·¢ËÍ
+//ID : 1011
+struct TCRCLClientApplyFocusR 
+{
+	int ResponseType;
+};
+
+//¿Í»§¶Ë³·Ïú½¹µã²Ù×÷
+//ID : 1020
+struct TCRCLClientDestroyFocus 
+{
+	int ClientID;
+	int GroupID;
+};
+
+//ÏìÓ¦ÏûÏ¢£¨1021£©
+
+struct TCRCLClientDestroyFocusR
+{
+	int ResponseType;
+};
+
+
+//¿Í»§¶Ë×éÄÚÎı¾Êý¾Ý¹ã²¥¸øÆäËûÓû§
+//ID : 1030
+struct TCRCLClientTextBroadcast 
+{
+	int ClientID;
+	int GroupID;
+	int InfoLength;
+	char Info[1024];
+};
+
+//ÏìÓ¦ÏûÏ¢£¨1031£©
+
+struct TCRCLClientTextBroadcastR
+{
+	char ClientName[CLIENT_SIZE];
+	int  InfoLength;
+	char Info[1024];
+};
+
+//¿Í»§¶Ë»ñÈ¡×éÄÚÆäËû¿Í»§ÁбíÏûÏ¢
+//ID : 1040
+struct CRCLClientGetClientInfo 
+{
+	int ClientID;
+	int GroupID;
+};
+
+ //ÏìÓ¦ÏûÏ¢£¨1041£©
+struct TCRCLClientGetClientInfoR 
+{
+	int ResponseType;
+	int ClientCount;
+	struct TSState ClientList[1024];
+};
+
+
+//ÊڿζËÖ¸¶¨½¹µãÏûÏ¢
+//ID : 1050
+struct TCRCLTeacherAllowClientFocus
+{
+	int TeacherID;
+	int ClientID;
+	int GroupID;
+};
+
+// ÏìÓ¦ÏûÏ¢
+//ID : 1051
+struct TCRCLTeacherAllowClientFocusR
+{
+	int ResponseType;
+	int ClientID;
+};
+
+// ¿Í»§¶ËÏìÓ¦ÏûÏ¢(1052)£¬Ö¸¶¨µÄ¿Í»§¶Ë³ÉΪ½¹µã
+struct TCRCLTeacherAllowClientFocusRToMS
+{
+	int FocusClientID;
+};
+
+//Êڿζ˰þ¶á½¹µãÏûÏ¢
+//ID : 1060
+struct TCRCLTeacherCancelClientFocus
+{
+	int TeacherID;
+	int ClientID;
+	int GroupID;
+};
+
+//ÏìÓ¦ÏûÏ¢
+//ID : 1061
+struct TCRCLTeacherCancelClientFocusR
+{
+	int ResponseType;
+	int ClientID;
+};
+
+//ID 1081 teacher change mode
+struct TCRCLTeacherSwitchModeR
+{
+    DWORD ModeType;	 //0 chat 1 teach
+};
+	
+	
+//e¿Í»§¶ËÏìÓ¦ÏûÏ¢ ֪ͨMCUºÍ½¹µãѧÉú³·Ïú½¹µã
+//ID : 1062
+struct TCRCLTeacherCancelClientFocusRToMS
+{
+	int ClientID;
+};
+
+//ID 1092
+struct  TCRCLTeacherAgreeChat
+{
+  
+	DWORD Agreechat;   //agree 1,don't agree 0	
+ 	
+};
+///////////////////FiveÒì³£Çé¿ö´¦Àí////////////////
+ //Ìý¿Î¶Ë²ÎÊýÉèÖÃÐÅÏ¢±í£º
+struct TPara
+{
+            char LocalIP[50];         //±¾»úIP
+            char MCUIP[50];            //MCU IP
+            char StudentN[30];        //̞
+            char PassWord[30];        //µÇ¼ÃÜÂë
+            char TeacherN[30];        //½ÌʦÃû
+            char CourseN[50];         //¿Î³ÌÃû
+            int ClientID;           //¿Í»§¶ËID
+            int GroupID;            //×éID
+            int C_TAPort;           //¿Í»§¶Ë½ÓÊÕÊڿζËÒôƵ¶Ë¿Ú
+            int C_TVPort;           //¿Í»§¶Ë½ÓÊÕÊڿζËÊÓƵ¶Ë¿Ú
+            int C_TScrPort;         //¿Í»§¶Ë½ÓÊÕÊڿζËÆÁÄ»¶Ë¿Ú
+            int C_CAPort;            //¿Í»§¶Ë½ÓÊÕ½¹µã¿Í»§¶ËÒôƵ¶Ë¿Ú
+            int C_CVPort;            //¿Í»§¶Ë½ÓÊÕ½¹µã¿Í»§¶ËÊÓƵ¶Ë¿Ú
+            /**************************************************************/
+            int TAPort;
+            int TVPort;
+            int TscrPort;
+            int SAPort;
+            int SVPort;
+            /***************************************************************/
+            int MCU_CAPort;      //MCU½ÓÊÕ½¹µã¿Í»§¶ËÒôƵÊý¾Ý¶Ë¿Ú
+            int MCU_CVPort;      //MCU½ÓÊÕ½¹µã¿Í»§¶ËÊÓƵÊý¾Ý¶Ë¿Ú
+            char *CenterIP;	   //¿ÎÌ÷þÎñÖÐÐÄIpµØÖ·£»
+            int CenterPort;      //¿ÎÌ÷þÎñÖÐÐĵĶ˿ڵØÖ·;
+            int ClientType;      //Ìý¿Î¶ËµÄÍøÂç×´¿ö¡£ÄÚÍø»¹Êǹ«Íø
      7.8Ìí¼Ó
+            int IfSeMCUClient;         //ÊÇ·ñΪÄÚÍø¸¨MCUÌý¿Î¶Ë 1£ºÊÇ£¬0£º²»ÊÇ
+            char *SeTUClient_MCU_IP;            //ÄÚÍø¸¨MCUÌý¿Î¶Ë»òÕßÍâÍøÖ÷MCUµÄIPµØÖ·
   7.8Ìí¼Ó
+};
+
+
+#endif

Propchange: incubator/bluesky/NCstu-2.0/src/ncclient.hh
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bluesky/NCstu-2.0/src/pic/screen.bmp
URL: http://svn.apache.org/viewvc/incubator/bluesky/NCstu-2.0/src/pic/screen.bmp?rev=662948&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/bluesky/NCstu-2.0/src/pic/screen.bmp
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/bluesky/NCstu-2.0/src/pic/screen.bmp
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/bluesky/NCstu-2.0/src/pic/teacher2.bmp
URL: http://svn.apache.org/viewvc/incubator/bluesky/NCstu-2.0/src/pic/teacher2.bmp?rev=662948&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/bluesky/NCstu-2.0/src/pic/teacher2.bmp
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/bluesky/NCstu-2.0/src/singlecomm.cpp
URL: http://svn.apache.org/viewvc/incubator/bluesky/NCstu-2.0/src/singlecomm.cpp?rev=662948&view=auto
==============================================================================
--- incubator/bluesky/NCstu-2.0/src/singlecomm.cpp (added)
+++ incubator/bluesky/NCstu-2.0/src/singlecomm.cpp Tue Jun  3 19:48:16 2008
@@ -0,0 +1,113 @@
+// CSingleComm.cpp: implementation of the CSingleComm class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#include "asyncsocketex.h"
+#include "singlecomm.h"
+
+#define SOCKETMUTEX_LOCK	{\
+							socketmutex.Lock();	\
+							}
+							
+
+#define SOCKETMUTEX_UNLOCK	{	\
+							socketmutex.Unlock();}
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CSingleComm::CSingleComm()
+{
+
+	m_socket = 0;
+}
+
+CSingleComm::~CSingleComm()
+{
+
+	m_socket = 0;
+}
+
+bool CSingleComm::Init()
+{
+	if(!CTCPComm::Init())
+		return false;
+
+	if (!socketmutex.IsInitialized())
+	{
+		if (socketmutex.Init() < 0)
+			return false;
+	}
+
+	return true;
+}
+
+int CSingleComm::OnPollThreadError(int status)
+{
+
+	return -1;
+}
+
+int CSingleComm::Poll()
+{
+	int nRes;
+	SOCKETMUTEX_LOCK	
+
+	if(m_socket == 0){
+		SOCKETMUTEX_UNLOCK
+		return 0;
+	}
+
+	nRes = m_socket->Poll();
+	if(nRes < 0){
+		SOCKETMUTEX_UNLOCK
+		return nRes;
+	}
+
+	m_socket->SetStatus(nRes);
+
+	SOCKETMUTEX_UNLOCK
+	return nRes;
+}
+
+int CSingleComm::PolledSocket()
+{
+
+	SOCKETMUTEX_LOCK	
+
+	if(m_socket == 0){
+		SOCKETMUTEX_UNLOCK
+		return 0;
+	}
+
+	m_socket->OnEvent();
+
+	SOCKETMUTEX_UNLOCK
+	return 1;
+}
+
+
+void CSingleComm::Attach(CAsyncSocketEx* socket)
+{
+	SOCKETMUTEX_LOCK	
+
+	m_socket = socket;
+	SOCKETMUTEX_UNLOCK
+}
+
+CAsyncSocketEx* CSingleComm::Detach()
+{
+	SOCKETMUTEX_LOCK	
+	CAsyncSocketEx* p = m_socket;
+	m_socket = 0;
+	SOCKETMUTEX_UNLOCK
+	return p;
+}
+
+void CSingleComm::OnPollThreadStep()
+{
+	//¸øÖ÷Ï̷߳ÃÎÊ socketµÄʱ¼ä.
+//	printf("\nCListenComm sleep(1)");
+	usleep(200000);
+}

Propchange: incubator/bluesky/NCstu-2.0/src/singlecomm.cpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bluesky/NCstu-2.0/src/singlecomm.h
URL: http://svn.apache.org/viewvc/incubator/bluesky/NCstu-2.0/src/singlecomm.h?rev=662948&view=auto
==============================================================================
--- incubator/bluesky/NCstu-2.0/src/singlecomm.h (added)
+++ incubator/bluesky/NCstu-2.0/src/singlecomm.h Tue Jun  3 19:48:16 2008
@@ -0,0 +1,31 @@
+// CSingleComm.h: interface for the CSingleComm class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#if !defined(SINGLECOMM_H)
+#define SINGLECOMM_H
+
+#include <jmutex.h>
+#include "tcpcomm.h"
+
+class CSingleComm : public CTCPComm  
+{
+public:
+	CAsyncSocketEx* Detach();
+	void Attach(CAsyncSocketEx* socket);
+	CSingleComm();
+	virtual ~CSingleComm();
+	virtual bool Init();
+
+protected:
+	virtual void OnPollThreadStep();
+	virtual int OnPollThreadError(int status);
+	virtual int PolledSocket();
+	virtual int Poll() ;
+
+private:
+	JMutex socketmutex;
+	CAsyncSocketEx* m_socket;
+};
+
+#endif // !defined(SINGLECOMM_H)

Propchange: incubator/bluesky/NCstu-2.0/src/singlecomm.h
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bluesky/NCstu-2.0/src/stdafx.h
URL: http://svn.apache.org/viewvc/incubator/bluesky/NCstu-2.0/src/stdafx.h?rev=662948&view=auto
==============================================================================
--- incubator/bluesky/NCstu-2.0/src/stdafx.h (added)
+++ incubator/bluesky/NCstu-2.0/src/stdafx.h Tue Jun  3 19:48:16 2008
@@ -0,0 +1,40 @@
+// stdafx.h : include file for standard system include files,
+//  or project specific include files that are used frequently, but
+//      are changed infrequently
+//
+
+#if !defined(STDAFX_H_LINUX)
+#define STDAFX_H_LINUX
+	#include <sys/socket.h>
+	#include <netinet/in.h>
+	#include <arpa/inet.h>
+	#include <sys/ioctl.h>
+	#include <net/if.h>
+	#include <string.h>
+	#include <netdb.h>
+	#include <unistd.h>
+	#include <stdio.h>
+
+
+	#define RTPSOCKERR					-1
+
+
+
+	//#define FALSE						false	
+	//#define TRUE							true	
+	#define INVALID_SOCKET				0
+	#define SOCKET_ERROR  			    RTPSOCKERR
+
+	#define IOCTL						ioctl
+	#define CLOSESOCKET(x)				close(x);
+
+	typedef int							SOCKET;
+	typedef sockaddr					SOCKADDR;
+	typedef struct sockaddr_in		SOCKADDR_IN;
+//	typedef bool							BOOL;
+	typedef unsigned int				UINT;
+	typedef const char*					LPCTSTR;
+	typedef char*						LPSTR;
+	typedef unsigned long				DWORD;
+	typedef struct hostent				HOSTENT, *LPHOSTENT;
+#endif // !defined(STDAFX_H_LINUX)

Propchange: incubator/bluesky/NCstu-2.0/src/stdafx.h
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bluesky/NCstu-2.0/src/support.cc
URL: http://svn.apache.org/viewvc/incubator/bluesky/NCstu-2.0/src/support.cc?rev=662948&view=auto
==============================================================================
--- incubator/bluesky/NCstu-2.0/src/support.cc (added)
+++ incubator/bluesky/NCstu-2.0/src/support.cc Tue Jun  3 19:48:16 2008
@@ -0,0 +1,143 @@
+/*
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdio.h>
+
+#include <gtk/gtk.h>
+
+#include "support.hh"
+
+GtkWidget*
+lookup_widget                          (GtkWidget       *widget,
+                                        const gchar     *widget_name)
+{
+  GtkWidget *parent, *found_widget;
+
+  for (;;)
+    {
+      if (GTK_IS_MENU (widget))
+        parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
+      else
+        parent = widget->parent;
+      if (!parent)
+        parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget), "GladeParentKey");
+      if (parent == NULL)
+        break;
+      widget = parent;
+    }
+
+  found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget),
+                                                 widget_name);
+  if (!found_widget)
+    g_warning ("Widget not found: %s", widget_name);
+  return found_widget;
+}
+
+static GList *pixmaps_directories = NULL;
+
+/* Use this function to set the directory containing installed pixmaps. */
+void
+add_pixmap_directory                   (const gchar     *directory)
+{
+  pixmaps_directories = g_list_prepend (pixmaps_directories,
+                                        g_strdup (directory));
+}
+
+/* This is an internally used function to find pixmap files. */
+static gchar*
+find_pixmap_file                       (const gchar     *filename)
+{
+  GList *elem;
+
+  /* We step through each of the pixmaps directory to find it. */
+  elem = pixmaps_directories;
+  while (elem)
+    {
+      gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data,
+                                         G_DIR_SEPARATOR_S, filename);
+      if (g_file_test (pathname, G_FILE_TEST_EXISTS))
+        return pathname;
+      g_free (pathname);
+      elem = elem->next;
+    }
+  return NULL;
+}
+
+/* This is an internally used function to create pixmaps. */
+GtkWidget*
+create_pixmap                          (GtkWidget       *widget,
+                                        const gchar     *filename)
+{
+  gchar *pathname = NULL;
+  GtkWidget *pixmap;
+
+  if (!filename || !filename[0])
+      return gtk_image_new ();
+
+  pathname = find_pixmap_file (filename);
+
+  if (!pathname)
+    {
+      g_warning ("Couldn't find pixmap file: %s", filename);
+      return gtk_image_new ();
+    }
+
+  pixmap = gtk_image_new_from_file (pathname);
+  g_free (pathname);
+  return pixmap;
+}
+
+/* This is an internally used function to create pixmaps. */
+GdkPixbuf*
+create_pixbuf                          (const gchar     *filename)
+{
+  gchar *pathname = NULL;
+  GdkPixbuf *pixbuf;
+  GError *error = NULL;
+
+  if (!filename || !filename[0])
+      return NULL;
+
+  pathname = find_pixmap_file (filename);
+
+  if (!pathname)
+    {
+      g_warning ("Couldn't find pixmap file: %s", filename);
+      return NULL;
+    }
+
+  pixbuf = gdk_pixbuf_new_from_file (pathname, &error);
+  if (!pixbuf)
+    {
+      fprintf (stderr, "Failed to load pixbuf file: %s: %s\n",
+               pathname, error->message);
+      g_error_free (error);
+    }
+  g_free (pathname);
+  return pixbuf;
+}
+
+/* This is used to set ATK action descriptions. */
+void
+glade_set_atk_action_description       (AtkAction       *action,
+                                        const gchar     *action_name,
+                                        const gchar     *description)
+{
+  gint n_actions, i;
+
+  n_actions = atk_action_get_n_actions (action);
+  for (i = 0; i < n_actions; i++)
+    {
+      if (!strcmp (atk_action_get_name (action, i), action_name))
+        atk_action_set_description (action, i, description);
+    }
+}

Propchange: incubator/bluesky/NCstu-2.0/src/support.cc
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bluesky/NCstu-2.0/src/support.hh
URL: http://svn.apache.org/viewvc/incubator/bluesky/NCstu-2.0/src/support.hh?rev=662948&view=auto
==============================================================================
--- incubator/bluesky/NCstu-2.0/src/support.hh (added)
+++ incubator/bluesky/NCstu-2.0/src/support.hh Tue Jun  3 19:48:16 2008
@@ -0,0 +1,43 @@
+/*
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+//#include <gtkmm/main.h>
+/*
+ * Public Functions.
+ */
+
+/*
+ * This function returns a widget in a component created by Glade.
+ * Call it with the toplevel widget in the component (i.e. a window/dialog),
+ * or alternatively any widget in the component, and the name of the widget
+ * you want returned.
+ */
+GtkWidget*  lookup_widget              (GtkWidget       *widget,
+                                        const gchar     *widget_name);
+
+
+/* Use this function to set the directory containing installed pixmaps. */
+void        add_pixmap_directory       (const gchar     *directory);
+
+
+/*
+ * Private Functions.
+ */
+
+/* This is used to create the pixmaps used in the interface. */
+GtkWidget*  create_pixmap              (GtkWidget       *widget,
+                                        const gchar     *filename);
+
+/* This is used to create the pixbufs used in the interface. */
+GdkPixbuf*  create_pixbuf              (const gchar     *filename);
+
+/* This is used to set ATK action descriptions. */
+void        glade_set_atk_action_description (AtkAction       *action,
+                                              const gchar     *action_name,
+                                              const gchar     *description);

Propchange: incubator/bluesky/NCstu-2.0/src/support.hh
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bluesky/NCstu-2.0/src/tcpcomm.cpp
URL: http://svn.apache.org/viewvc/incubator/bluesky/NCstu-2.0/src/tcpcomm.cpp?rev=662948&view=auto
==============================================================================
--- incubator/bluesky/NCstu-2.0/src/tcpcomm.cpp (added)
+++ incubator/bluesky/NCstu-2.0/src/tcpcomm.cpp Tue Jun  3 19:48:16 2008
@@ -0,0 +1,70 @@
+// TCPComm.cpp: implementation of the CTCPComm class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#include "stdafx.h"
+#include "asyncsocketex.h"
+#include "tcpcomm.h"
+#include "tcppollthread.h"
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CTCPComm::CTCPComm()
+{
+
+	m_pThread = 0;
+}
+
+CTCPComm::~CTCPComm()
+{
+
+}
+
+
+int CTCPComm::OnPollThreadError(int status)
+{
+	return -1;
+}
+
+bool CTCPComm::Init()
+{
+
+	if(m_pThread){
+		m_pThread->Stop();
+		return true;
+	}
+
+	m_pThread = new CTCPPollThread(this);
+
+	if(m_pThread)
+		return true;
+
+	return false;
+}
+
+int CTCPComm::Start()
+{
+	if(m_pThread == 0){
+		return -1;
+	}
+	return m_pThread->Start();
+}
+
+bool CTCPComm::IsPolling()
+{
+	if(m_pThread == 0){
+		return false;
+	}
+	return m_pThread->IsRunning();
+}
+
+
+void CTCPComm::Stop()
+{
+	if(m_pThread){
+		m_pThread->Stop();
+	}
+
+}

Propchange: incubator/bluesky/NCstu-2.0/src/tcpcomm.cpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bluesky/NCstu-2.0/src/tcpcomm.h
URL: http://svn.apache.org/viewvc/incubator/bluesky/NCstu-2.0/src/tcpcomm.h?rev=662948&view=auto
==============================================================================
--- incubator/bluesky/NCstu-2.0/src/tcpcomm.h (added)
+++ incubator/bluesky/NCstu-2.0/src/tcpcomm.h Tue Jun  3 19:48:16 2008
@@ -0,0 +1,32 @@
+// TCPComm.h: interface for the CTCPComm class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#if !defined(TCPCOMM_H)
+#define TCPCOMM_H
+
+class CTCPPollThread;
+class CTCPComm  
+{
+	friend class CTCPPollThread;
+public:
+	void Stop();
+	bool IsPolling();
+	int Start();
+	virtual bool Init();
+	CTCPComm();
+	virtual ~CTCPComm();
+
+protected:
+	virtual void OnPollThreadStep() = 0;
+	virtual int OnPollThreadError(int status);
+	virtual int PolledSocket() = 0;
+	virtual int Poll() = 0;
+
+	
+
+private:
+	CTCPPollThread *m_pThread;
+};
+
+#endif // !defined(TCPCOMM_H)

Propchange: incubator/bluesky/NCstu-2.0/src/tcpcomm.h
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bluesky/NCstu-2.0/src/tcppollthread.cpp
URL: http://svn.apache.org/viewvc/incubator/bluesky/NCstu-2.0/src/tcppollthread.cpp?rev=662948&view=auto
==============================================================================
--- incubator/bluesky/NCstu-2.0/src/tcppollthread.cpp (added)
+++ incubator/bluesky/NCstu-2.0/src/tcppollthread.cpp Tue Jun  3 19:48:16 2008
@@ -0,0 +1,85 @@
+/*
+
+*/
+
+#include "tcppollthread.h"
+#include "tcpcomm.h"
+
+CTCPPollThread::CTCPPollThread(CTCPComm* pcomm)
+{
+	m_pcomm = pcomm;
+	stop = false;
+}
+
+CTCPPollThread::~CTCPPollThread()
+{
+	Stop();
+}
+ 
+int CTCPPollThread::Start()
+{
+	if (JThread::IsRunning())
+		return -1;
+	
+	if (!stopmutex.IsInitialized())
+	{
+		if (stopmutex.Init() < 0)
+			return -1;
+	}
+	stop = false;
+	if (JThread::Start() < 0)
+		return -1;
+	return 0;
+}
+
+void CTCPPollThread::Stop()
+{	
+	if (!IsRunning())
+		return;
+	
+	stopmutex.Lock();
+	stop = true;
+	stopmutex.Unlock();
+	
+	
+	if (JThread::IsRunning())
+	{
+		JThread::Kill();
+	}
+	stop = false;
+}
+
+void *CTCPPollThread::Thread()
+{
+	JThread::ThreadStarted();
+	
+	int status;
+	bool stopthread;
+
+	stopmutex.Lock();
+	stopthread = stop;
+	stopmutex.Unlock();
+	while (!stopthread)
+	{
+//		struct timeval tv = {0, 50000};
+		status = m_pcomm->Poll();
+		if(status < 0 ){
+			stopthread = 0;
+			m_pcomm->OnPollThreadError(status);
+		}
+		else{
+			status = m_pcomm->PolledSocket();
+			if(status < 0){
+				stopthread = true;
+				m_pcomm->OnPollThreadError(status);
+			}
+			else{
+				m_pcomm->OnPollThreadStep();
+				stopmutex.Lock();
+				stopthread = stop;
+				stopmutex.Unlock();
+			}
+		}
+	}
+	return 0;
+}

Propchange: incubator/bluesky/NCstu-2.0/src/tcppollthread.cpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bluesky/NCstu-2.0/src/tcppollthread.h
URL: http://svn.apache.org/viewvc/incubator/bluesky/NCstu-2.0/src/tcppollthread.h?rev=662948&view=auto
==============================================================================
--- incubator/bluesky/NCstu-2.0/src/tcppollthread.h (added)
+++ incubator/bluesky/NCstu-2.0/src/tcppollthread.h Tue Jun  3 19:48:16 2008
@@ -0,0 +1,33 @@
+/*
+
+*/
+
+#ifndef CTCPPOLLTHREAD_H
+
+#define CTCPPOLLTHREAD_H
+
+
+
+
+#include "jthread.h"
+#include "jmutex.h"
+
+class CTCPComm;
+class CTCPPollThread : private JThread
+{
+	friend class CTCPComm;
+public:
+	CTCPPollThread(CTCPComm* pcomm);
+	~CTCPPollThread();
+	int Start();
+	void Stop();
+private:
+	void *Thread();
+	
+	bool stop;
+	JMutex stopmutex;
+	CTCPComm *m_pcomm;
+};
+
+
+#endif // CTCPPOLLTHREAD_H

Propchange: incubator/bluesky/NCstu-2.0/src/tcppollthread.h
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bluesky/NCstu-2.0/stamp-h
URL: http://svn.apache.org/viewvc/incubator/bluesky/NCstu-2.0/stamp-h?rev=662948&view=auto
==============================================================================
--- incubator/bluesky/NCstu-2.0/stamp-h (added)
+++ incubator/bluesky/NCstu-2.0/stamp-h Tue Jun  3 19:48:16 2008
@@ -0,0 +1 @@
+timestamp

Propchange: incubator/bluesky/NCstu-2.0/stamp-h
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bluesky/NCstu-2.0/stamp-h.in
URL: http://svn.apache.org/viewvc/incubator/bluesky/NCstu-2.0/stamp-h.in?rev=662948&view=auto
==============================================================================
--- incubator/bluesky/NCstu-2.0/stamp-h.in (added)
+++ incubator/bluesky/NCstu-2.0/stamp-h.in Tue Jun  3 19:48:16 2008
@@ -0,0 +1 @@
+timestamp

Propchange: incubator/bluesky/NCstu-2.0/stamp-h.in
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bluesky/NCstu-2.0/todo
URL: http://svn.apache.org/viewvc/incubator/bluesky/NCstu-2.0/todo?rev=662948&view=auto
==============================================================================
    (empty)

Propchange: incubator/bluesky/NCstu-2.0/todo
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message