Question
- From: =?koi8-r?B?4dLUxc0g59XM2MvP?= <gulko komset ru>
- To: <orbit-list gnome org>
- Subject: Question
- Date: Wed, 18 Dec 2002 15:33:21 +0300
Hallo!
Can you explain what's wrong in following lines?
Qwestion 1
//C code
...
PortableServer_ServantBase__epv base_epv = {
NULL,
NULL,
NULL
};
POA_MyModul_MySMInterface__epv my_epv = {
NULL,
StartAppMonitoring,StopAppMonitoring,CloseApp,SetSubscription,GetSubscriptio
n,
GetPublications,GetMnemonics,GetParamID,SetParams,CurrentState
};//here are 10 warnings during compilation "Initialization from
incompatible pointer type"
POA_MyModul_MySMInterface__vepv my_vepv = {&base_epv,&my_epv};
POA_MyModul_MySMInterface my_servant = {NULL,&my_vepv};
...
//IDL code
...
Interface MySMInterface {
boolean StartAppMonitoring() raises(UserException);
boolean StopAppMonitoring() raises(UserException);
boolean CloseApp() raises(UserException);
boolean SetSubscription(in SubscriberStreamType SubscriberStream)
raises(UserException);
SubscriptionsType GetSubscription() raises(UserException);
PublicationsType GetPublications() raises(UserException);
MnemonicStreamType GetMnemonics() raises(UserException);
boolean GetParamID(in string ParamClassMnemonic, in string
ParamMnemonicInClass,
in SPAPP::ParamClassIDType ParamClassID,
in SPAPP::ParamIDinClassType ParamIDinClass) raises
(UserException);
boolean SetParams(in TaskIDType TaskID,
in TimeType TimeInt,
in SPAPP::LinkIDStreamType LinkIDStream)
raises(UserException);
MessageType CurrentState() raises(UserException);
}//end of MySMInterface
...
Qwestion 2: What's incorrect?
static SPAPPMAN_MessageType * CurrentState(
SPAPPMAN_Supervisor2AppInterface _s2a,
CORBA_Environment *ev
){
SPAPPMAN_MessageType elem;
elem.MessageTimeStamp="15.08";
elem.MessageName=0;//Enum Information
elem.MessageCode=15;
elem.MessageText=("%d",EvalCurrentStat());
return &elem;
}
//call for the function above:
SPAPPMAN_MessageType* el =
SPAPPMAN_Supervisor2AppInterface_CurrentState(s2a,&ev);
printf("time: %s\ncode: %d\ntext:
%s\n",el->MessageTimeStamp,el->MessageCode,el->MessageText);
//Noone element returned correctly
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]