Exemple #1
0
Ge::~Ge()
{
#ifdef LDH
    if ( ldhses)
        ldh_CloseSession( ldhses);
#endif
}
Exemple #2
0
int Cmd::detach_volume()
{
  int sts;

  if ( !ldhses)
    return WNAV__NOVOLATTACHED;

  sts = ldh_CloseSession( ldhses);
  if ( EVEN(sts))
  {
    wnav->message( 'E', wnav_get_message( sts));
    return 0;
  }

  sts = ldh_DetachVolume( wbctx, volctx);
  if ( EVEN(sts))
  {
    wnav->message( 'E', wnav_get_message( sts));
    return 0;
  }
  volid = 0;
  volctx = 0;
  ldhses = 0;

  wnav->volume_detached();
  return 1;
}
Exemple #3
0
//
// Constructor
//
WFoeMotif::WFoeMotif( void *f_parent_ctx,
		      Widget f_parent_wid,
		      const char *f_name,
		      pwr_tObjid plcprogram,
		      ldh_tWBContext ldhwbctx,
		      ldh_tSesContext ldhsesctx,
		      int f_map_window,
		      ldh_eAccess	f_access,
		      unsigned int f_options,
		      pwr_tStatus *sts) :
  WFoe(f_parent_ctx,f_name,plcprogram,ldhwbctx,ldhsesctx,f_map_window,
       f_access,f_options,sts),
  parent_wid(f_parent_wid), set_focus_disabled(0), focus_timerid(0)
{
  int		size;
  pwr_tFullName	new_name;
  ldh_tSesContext ldhses;

  memset( &widgets, 0, sizeof(widgets));

  /* Check that it is possible to open a session */
  *sts = ldh_OpenSession(&ldhses, ldh_SessionToVol( ldhsesctx),
			access, ldh_eUtility_PlcEditor);
  if ( EVEN(*sts)) return;

  *sts = ldh_CloseSession(ldhses);

  /* New title */
  *sts = ldh_ObjidToName( ldhsesctx, plcprogram, ldh_eName_Hierarchy,
			  new_name, sizeof( new_name), &size);
  error_msg(*sts);
  if( EVEN(*sts)) return;

  strcpy( name, new_name);
  *sts = new_local( plcprogram,
		    ldhwbctx, ldhsesctx, 0, 0, 0,
		    foe_eFuncAccess_Edit);

  wow = new CoWowMotif( parent_wid);
}