int objVoiceService(char *name, struct CWMP_LEAF *entity, int type, void *data)
{
    switch( type ) {
    case eCWMP_tINITOBJ:
    {
        int num=0;
        //struct CWMP_LINKNODE **c = (struct CWMP_LINKNODE **)data;
        struct CWMP_LINKNODE **c = (struct CWMP_LINKNODE **)data;

        if( (name==NULL) || (entity==NULL) || (data==NULL) ) return -1;

        num = 1;	/* Now, we has one voice service only. */
        //int create_Object( struct CWMP_LINKNODE **table, struct CWMP_LINKNODE ori_table[], int size, unsigned int num, unsigned int from);

        if( create_Object( c, tVoiceService, sizeof(tVoiceService), 1, 1 ) < 0 )
            return -1;

        add_objectNum( name, 1 );
        return 0;
    }
    break;

    case eCWMP_tADDOBJ:
    case eCWMP_tDELOBJ:
    case eCWMP_tUPDATEOBJ:
        break;
    }

    return -1;
}
示例#2
0
int jni_CreateGlobals(JNIEnv *env) {
	int status = create_GlobalScreen(env);

	if (status == JNI_OK && (*env)->ExceptionCheck(env) == JNI_FALSE) {
		status = create_NativeHookThread(env);
	}

	if (status == JNI_OK && (*env)->ExceptionCheck(env) == JNI_FALSE) {
		status = create_NativeHookException(env);
	}

	if (status == JNI_OK && (*env)->ExceptionCheck(env) == JNI_FALSE) {
		status = create_NativeMonitorInfo(env);
	}

	if (status == JNI_OK && (*env)->ExceptionCheck(env) == JNI_FALSE) {
		status = create_NativeInputEvent(env);
	}

	if (status == JNI_OK && (*env)->ExceptionCheck(env) == JNI_FALSE) {
		status = create_NativeKeyEvent(env);
	}

	if (status == JNI_OK && (*env)->ExceptionCheck(env) == JNI_FALSE) {
		status = create_NativeMouseEvent(env);
	}

	if (status == JNI_OK && (*env)->ExceptionCheck(env) == JNI_FALSE) {
		status = create_NativeMouseWheelEvent(env);
	}

	if (status == JNI_OK && (*env)->ExceptionCheck(env) == JNI_FALSE) {
		status = create_Object(env);
	}

	if (status == JNI_OK && (*env)->ExceptionCheck(env) == JNI_FALSE) {
		status = create_Integer(env);
	}

	if (status == JNI_OK && (*env)->ExceptionCheck(env) == JNI_FALSE) {
		status = create_System(env);
	}

	if (status == JNI_OK && (*env)->ExceptionCheck(env) == JNI_FALSE) {
		status = create_Logger(env);
	}

	// Check and make sure we don't have a pending exception and a JNI_OK status.
	if (status == JNI_OK && (*env)->ExceptionCheck(env) == JNI_TRUE) {
		status = JNI_ERR;
	}

	return status;
}
示例#3
0
void UI_InitMenu(UI_Object ** Menu,int length,UI_Object *parent)
{
	HWND hWnd = UI_Out_800_600_Get_From_Handl ( ) ;
	int i=0;
	for(i=0;i<length;i++)
	{
		Menu[i] = create_Object ( hWnd ) ;
		set_Parent(parent,Menu[i]);
		Menu[i]->type = RadioButton;
		if(i==0)
		{
			Menu[i]->isGroup = TRUE;
		}
	}
}
示例#4
0
void Init_GUI_Var ( void )
{
	HWND hWnd = UI_Out_800_600_Get_From_Handl ( ) ;
	gui_title = create_Object ( hWnd ) ;
	gui_car_title = create_Object ( hWnd ) ;
	gui_carType_title = create_Object ( hWnd ) ;
	gui_PassCharge_title = create_Object ( hWnd ) ;
	gui_Payment_title = create_Object ( hWnd ) ;
	gui_EquipmentState_title = create_Object ( hWnd ) ;
	gui_car = create_Object ( hWnd ) ;
	gui_carType = create_Object ( hWnd ) ;
	gui_carTypeBJ = create_Object ( hWnd ) ;
	gui_Payment = create_Object ( hWnd ) ;
	gui_PassCharge = create_Object ( hWnd ) ;
	gui_EquipmentState = create_Object ( hWnd ) ;
	gui_Baojing = create_Object ( hWnd ) ;
	gui_Jiaotong = create_Object ( hWnd ) ;
	gui_Langan = create_Object ( hWnd ) ;
	gui_ZhuaPaiXianQuan_title = create_Object ( hWnd ) ;
	gui_TongGuoXianQuan_title = create_Object ( hWnd ) ;
	gui_ZhuaPaiXianQuan = create_Object ( hWnd ) ;
	gui_TongGuoXianQuan = create_Object ( hWnd ) ;
	gui_CarNoInfo = create_Object ( hWnd ) ;
	gui_RorwardEnterInfo = create_Object ( hWnd ) ;
	gui_ForwardChargeInfo = create_Object ( hWnd ) ;
	gui_ForwardPaymentInfo = create_Object ( hWnd ) ;
	gui_PassCarNum = create_Object ( hWnd ) ;
	gui_AutoLanganState = create_Object ( hWnd ) ;
	gui_WeightInfo = create_Object ( hWnd ) ;
	gui_OperateInfo = create_Object ( hWnd ) ;
	gui_WorkMode1 = create_Object ( hWnd ) ;
	gui_WorkMode2 = create_Object ( hWnd ) ;
	gui_CurrentWeightInfo = create_Object ( hWnd ) ;
	gui_Information = create_Object ( hWnd ) ;
	gui_Video = create_Object ( hWnd ) ;
	gui_InputDataArea = create_Object ( hWnd ) ;
	gui_ArrivedCarWeightInfo = create_Object ( hWnd ) ;
	gui_CardBoxInfo = create_Object ( hWnd ) ;
	gui_Yupeng = create_Object ( hWnd ) ;
	gui_Print = create_Object ( hWnd ) ;
	gui_Event_title = create_Object ( hWnd ) ;
	gui_Event = create_Object ( hWnd ) ;
	gui_CurrentTime = create_Object ( hWnd ) ;
	gui_NowTime = create_Object ( hWnd ) ;
	gui_LoginTime = create_Object ( hWnd ) ;
	//登录窗体
	gui_Login_USR_Panel = create_Object ( hWnd ) ;
	gui_Login_USR = create_Object ( hWnd ) ;
	gui_Login_PWD_Panel = create_Object ( hWnd ) ;
	gui_Login_PWD = create_Object ( hWnd ) ;
	//欠款
	gui_QK_QKD_Panel = create_Object ( hWnd ) ;
	gui_QK_QKD = create_Object ( hWnd ) ;
	gui_QK_QK_Panel = create_Object ( hWnd ) ;
	gui_QK_QK = create_Object ( hWnd ) ;
	//优惠卡界面元素初始化
	gui_YH_Panel = create_Object ( hWnd ) ;
	gui_YH_YHK = create_Object ( hWnd ) ;
	//计重界面
	gui_JZ_Panel = create_Object ( hWnd ) ;
	gui_ShiShou  = create_Object ( hWnd ) ;
	gui_ZhaoLing = create_Object ( hWnd ) ;

	gui_title->x = 1 ;
	gui_title->y = 2 ;
	gui_title->width = 796 ;
	gui_title->height = 21 ;
	gui_title->border.width = 0 ;
	gui_title->background.color = SUBTITLECOLOR ;
	gui_title->text.color = TITLE_TEXT_COLOR ;
	gui_title->text.align = DT_LEFT ;

	//第一行
	set_XYWH ( gui_car_title , RtCarText ) ;
	gui_car_title->text.info = "车型" ;

	set_XYWH ( gui_carType_title , RtEnterInfoText ) ;
	gui_carType_title->text.info = "车种" ;

	set_XYWH ( gui_PassCharge_title , RtPassChargeText ) ;
	gui_PassCharge_title->text.info = "金额" ;

	set_XYWH ( gui_Payment_title , RtPaymentText ) ;
	gui_Payment_title->text.info = "支付方式" ;

	set_XYWH ( gui_EquipmentState_title , RtEquipmentState ) ;
	gui_EquipmentState_title->text.info = "设备状态" ;


	//第二行
	set_XYWH ( gui_car , RtCarTextInfo ) ;
	gui_car->text.info = "?" ;
	gui_car->text.size = BIGFONT_SIZE ;
	gui_car->text.type = "ttf" ;
	gui_car->text.family = "msyh" ;
	gui_car->text.weight = FONT_WEIGHT_BOOK ;
	set_Font ( & ( gui_car->text ) ) ;

	set_XYWH ( gui_carType , RtEnterInfo ) ;
	gui_carType->text.size = BIGFONT_SIZE ;
	gui_carType->text.type = "ttf" ;
	gui_carType->text.family = "msyh" ;
	gui_carType->text.weight = FONT_WEIGHT_BOOK ;
	set_Font ( & ( gui_carType->text ) ) ;
	set_XYWH ( gui_carTypeBJ , RtEnterInfoBJ ) ;
	gui_carTypeBJ->border.width = 0;

	set_XYWH ( gui_PassCharge , RtPassChargeInfo ) ;
	gui_PassCharge->text.size = BIGFONT_SIZE ;
	gui_PassCharge->text.type = "ttf" ;
	gui_PassCharge->text.family = "msyh" ;
	gui_PassCharge->text.weight = FONT_WEIGHT_BOOK ;
	set_Font ( & ( gui_PassCharge->text ) ) ;

	set_XYWH ( gui_Payment , RtPaymentInfo ) ;
	gui_Payment->text.size = BIGFONT_SIZE ;
	gui_Payment->text.type = "ttf" ;
	gui_Payment->text.family = "msyh" ;
	gui_Payment->text.weight = FONT_WEIGHT_BOOK ;
	set_Font ( & ( gui_Payment->text ) ) ;


	set_XYWH ( gui_EquipmentState , RtEquipmentStateInfo ) ;

	set_XYWH ( gui_Baojing , RtBaojing ) ;
	gui_Baojing->border.width = 0 ;
	gui_Baojing->background.image = &bmBaojingG ;
	set_Parent ( gui_EquipmentState , gui_Baojing ) ;

	set_XYWH ( gui_Jiaotong , RtJiaotong ) ;
	gui_Jiaotong->border.width = 0 ;
	gui_Jiaotong->background.image = &bmJiaotongR ;
	set_Parent ( gui_EquipmentState , gui_Jiaotong ) ;

	set_XYWH ( gui_Langan , RtLangan ) ;
	gui_Langan->border.width = 0 ;
	gui_Langan->background.image = &bmAutoLanganDown ;
	set_Parent ( gui_EquipmentState , gui_Langan ) ;

	set_XYWH ( gui_ZhuaPaiXianQuan_title , RtZhuaPaiXianQuanText ) ;
	gui_ZhuaPaiXianQuan_title->border.width = 0 ;
	gui_ZhuaPaiXianQuan_title->text.info = "到达" ;
	set_Parent ( gui_EquipmentState , gui_ZhuaPaiXianQuan_title ) ;

	set_XYWH ( gui_TongGuoXianQuan_title , RtTongGuoXianQuanText ) ;
	gui_TongGuoXianQuan_title->border.width = 0 ;
	gui_TongGuoXianQuan_title->text.info = "离开" ;
	set_Parent ( gui_EquipmentState , gui_TongGuoXianQuan_title ) ;

	set_XYWH ( gui_ZhuaPaiXianQuan , RtZhuaPaiXianQuan ) ;
	gui_ZhuaPaiXianQuan->border.width = 0 ;
	gui_ZhuaPaiXianQuan->background.image = &bmCarGo ;
	set_Parent ( gui_EquipmentState , gui_ZhuaPaiXianQuan ) ;

	set_XYWH ( gui_TongGuoXianQuan , RtTongGuoXianQuan ) ;
	gui_TongGuoXianQuan->border.width = 0 ;
	gui_TongGuoXianQuan->background.image = &bmCarGo ;
	set_Parent ( gui_EquipmentState , gui_TongGuoXianQuan ) ;


	//第三行
	set_XYWH ( gui_CarNoInfo , RtCarNoInfo ) ;

	set_XYWH ( gui_RorwardEnterInfo , RtRorwardEnterInfo ) ;

	set_XYWH ( gui_ForwardChargeInfo , RtForwardChargeInfo ) ;

	set_XYWH ( gui_ForwardPaymentInfo , RtForwardPaymentInfo ) ;

	set_XYWH ( gui_PassCarNum , RtPassCarNum ) ;
	gui_PassCarNum->text.info = "0" ;

	set_XYWH ( gui_AutoLanganState , RtAutoLanganState ) ;
	gui_AutoLanganState->text.info = "重量" ;

	set_XYWH ( gui_WeightInfo , RtWeightInfo ) ;
	gui_WeightInfo->text.info = "00-00.00" ;


	//第四行
	set_XYWH ( gui_OperateInfo , RtOperateInfo ) ;
	gui_OperateInfo->text.align=DT_LEFT;
	
	set_XYWH ( gui_WorkMode1 , RtWorkMode1 ) ;

	set_XYWH ( gui_WorkMode2 , RtWorkMode2 ) ;

	set_XYWH ( gui_CurrentWeightInfo , RtCurrentWeightInfo ) ;
	gui_CurrentWeightInfo->text.info = "00-00.00" ;


	//第五行
	set_XYWH ( gui_Information , RtInformation ) ;
	gui_Information->padding = 5 ;
	gui_Information->text.isSingleline = F ;
	gui_Information->text.align = DT_LEFT ;
	gui_Information->text.valign = DT_TOP ;

	set_XYWH ( gui_Video , RtVideo ) ;
	 


	//右边
	set_XYWH ( gui_InputDataArea , RtInputDataArea ) ;

	set_XYWH ( gui_CurrentTime , RtCurrentTime ) ;

	gui_LoginTime->x = 0;
	gui_LoginTime->y = 0;
	gui_LoginTime->border.width = 0;
	gui_LoginTime->width = (gui_CurrentTime->width-(gui_CurrentTime->padding+gui_CurrentTime->border.width)*2)/2;
	gui_LoginTime->height = gui_CurrentTime->height-(gui_CurrentTime->padding+gui_CurrentTime->border.width)*2;
	set_Parent ( gui_CurrentTime , gui_LoginTime ) ;

	gui_NowTime->x = (gui_CurrentTime->width-(gui_CurrentTime->padding+gui_CurrentTime->border.width)*2)/2;
	gui_NowTime->y = 0;
	gui_NowTime->border.width = 0;
	gui_NowTime->width = (gui_CurrentTime->width-(gui_CurrentTime->padding+gui_CurrentTime->border.width)*2)/2;
	gui_NowTime->height = gui_CurrentTime->height-(gui_CurrentTime->padding+gui_CurrentTime->border.width)*2;
	set_Parent ( gui_CurrentTime , gui_NowTime ) ;


	//计重
	set_XYWH ( gui_ArrivedCarWeightInfo , RtArrivedCarWeightInfo ) ;
	gui_ArrivedCarWeightInfo->background.color = WHITE_COLOR ;


	//事件区
	set_XYWH ( gui_CardBoxInfo , RtCardBoxInfo ) ;

	set_XYWH ( gui_Yupeng , RtYupeng ) ;
	gui_Yupeng->border.width = 0 ;
	gui_Yupeng->background.image = &bmYupengG ;
	set_Parent ( gui_CardBoxInfo , gui_Yupeng ) ;

	set_XYWH ( gui_Print , RtPrint ) ;
	gui_Print->border.width = 0 ;
	gui_Print->background.image = &bmHandLanganUp ;
	set_Parent ( gui_CardBoxInfo , gui_Print ) ;

	set_XYWH ( gui_Event_title , RtEventText ) ;
	gui_Event_title->border.width = 0 ;
	gui_Event_title->text.info = "事件报警" ;
	set_Parent ( gui_CardBoxInfo , gui_Event_title ) ;

	set_XYWH ( gui_Event , RtEvent ) ;
	gui_Event->border.width = 5 ;
	gui_Event->background.color = KAXIANG_BACK_COLOR ;
	set_Parent ( gui_CardBoxInfo , gui_Event ) ;


	//登录界面元素初始化
	set_XYWH ( gui_Login_USR_Panel , RtLoginUSRPanel ) ;
	set_Parent ( gui_InputDataArea , gui_Login_USR_Panel ) ;
	gui_Login_USR_Panel->ispanel = T ;
	gui_Login_USR_Panel->padding = gui_Login_USR_Panel->paneltext.size / 2 ;
	gui_Login_USR_Panel->paneltext.info = "工号:" ;

	set_XYWH ( gui_Login_USR , RtLoginUSR ) ;
	set_Parent ( gui_Login_USR_Panel , gui_Login_USR ) ;
	gui_Login_USR->background.color = WHITE_COLOR ;
	gui_Login_USR->text.align = DT_LEFT ;

	set_XYWH ( gui_Login_PWD_Panel , RtLoginPWDPanel ) ;
	set_Parent ( gui_InputDataArea , gui_Login_PWD_Panel ) ;
	gui_Login_PWD_Panel->ispanel = T ;
	gui_Login_PWD_Panel->padding = gui_Login_PWD_Panel->paneltext.size / 2 ;
	gui_Login_PWD_Panel->paneltext.info = "密码:" ;

	set_XYWH ( gui_Login_PWD , RtLoginPWD ) ;
	set_Parent ( gui_Login_PWD_Panel , gui_Login_PWD ) ;
	gui_Login_PWD->background.color = WHITE_COLOR ;
	gui_Login_PWD->text.align = DT_LEFT ;


	//欠款界面元素初始化
	set_XYWH ( gui_QK_QKD_Panel , RtLoginUSRPanel ) ;
	set_Parent ( gui_InputDataArea , gui_QK_QKD_Panel ) ;
	gui_QK_QKD_Panel->ispanel = T ;
	gui_QK_QKD_Panel->padding = gui_QK_QKD_Panel->paneltext.size / 2 ;
	gui_QK_QKD_Panel->paneltext.info = "欠款单号:" ;

	set_XYWH ( gui_QK_QKD , RtLoginUSR ) ;
	set_Parent ( gui_QK_QKD_Panel , gui_QK_QKD ) ;
	gui_QK_QKD->background.color = WHITE_COLOR ;
	gui_QK_QKD->text.align = DT_LEFT ;

	set_XYWH ( gui_QK_QK_Panel , RtLoginPWDPanel ) ;
	set_Parent ( gui_InputDataArea , gui_QK_QK_Panel ) ;
	gui_QK_QK_Panel->ispanel = T ;
	gui_QK_QK_Panel->padding = gui_QK_QK_Panel->paneltext.size / 2 ;
	gui_QK_QK_Panel->paneltext.info = "欠款金额:" ;

	set_XYWH ( gui_QK_QK , RtLoginPWD ) ;
	set_Parent ( gui_QK_QK_Panel , gui_QK_QK ) ;
	gui_QK_QK->background.color = WHITE_COLOR ;
	gui_QK_QK->text.align = DT_LEFT ;


	//优惠卡界面元素初始化
	set_XYWH ( gui_YH_Panel , RtLoginUSRPanel ) ;
	set_Parent ( gui_InputDataArea , gui_YH_Panel ) ;
	gui_YH_Panel->ispanel = T ;
	gui_YH_Panel->padding = gui_YH_Panel->paneltext.size / 2 ;
	//gui_YH_Panel->paneltext.info = "优惠卡号:" ;

	set_XYWH ( gui_YH_YHK , RtLoginUSR ) ;
	set_Parent ( gui_YH_Panel , gui_YH_YHK ) ;
	gui_YH_YHK->background.color = WHITE_COLOR ;
	gui_YH_YHK->text.align = DT_LEFT ;

	//计重
	set_XYWH ( gui_JZ_Panel , RtMenu ) ;
	set_Parent ( gui_InputDataArea ,gui_JZ_Panel);
	gui_JZ_Panel->ispanel = T ;
	gui_JZ_Panel->paneltext.info = "称重数据";
	gui_JZ_Panel->text.isSingleline = F ;
	gui_JZ_Panel->text.align = DT_LEFT ;
	gui_JZ_Panel->text.valign = DT_TOP ;
	gui_JZ_Panel->padding = 15 ;

	
	set_XYWH ( gui_ShiShou , RtShiShou ) ;
	set_Parent ( gui_InputDataArea ,gui_ShiShou);

	set_XYWH ( gui_ZhaoLing , RtZhaoling ) ;
	set_Parent ( gui_InputDataArea ,gui_ZhaoLing);
	//菜单分组
	gui_MenuFrom = create_Object ( hWnd ) ;
	set_Parent ( gui_InputDataArea , gui_MenuFrom ) ;
	gui_MenuFrom->ispanel = T ;
	//gui_MenuFrom->type = GroupBox;
	set_XYWH ( gui_MenuFrom , RtMenu ) ;
	//gui_MenuFrom->x = 5 ;
	//gui_MenuFrom->y = 5 ;
	//gui_MenuFrom->width = gui_MenuFrom->parent->width - gui_MenuFrom->parent->padding * 2 - 10 ;
	//gui_MenuFrom->height = gui_MenuFrom->parent->height - gui_MenuFrom->parent->padding * 2 - 10 ;
	gui_MenuFrom->padding = gui_MenuFrom->paneltext.size / 2 + 10 ;
	//菜单
	UI_InitMenu(gui_Menu,MaxMenu,gui_MenuFrom);
	//模拟
	//UI_InitMenu(gui_MenuMoni,MaxMenuMoni,gui_MenuFrom);
	//gui_MenuMoni[0]->text.info="1:通行模拟";
	//gui_MenuMoni[1]->text.info="2:更改车型/车种";
	//gui_MenuMoni[2]->text.info="3:被拖车";
	//gui_MenuMoni[3]->text.info="4:重打票据";
	//gui_MenuMoni[4]->text.info="5:补票";
	//UI_InitMenu(gui_CZMenu,CZMenu,gui_MenuFrom);
	//gui_CZMenu[0]->text.info="1:标准集装箱";
	//gui_CZMenu[1]->text.info="2:标准罐车";
	//gui_CZMenu[2]->text.info="3:修正车辆信息";
	//gui_CZMenu[3]->text.info="4:添加车辆信息";
	//gui_CZMenu[4]->text.info="5:删除车辆信息";
	//gui_CZMenu[5]->text.info="6:拖车";
	//gui_CZMenu[6]->text.info="7:长车";


}