Exemple #1
0
// destructor
TreeIterator::~TreeIterator()
{
	Unset();
}
EXPORT void unset_abp_acct_seg_map_vip_code(ABP_ACCT_SEG_MAP acct_seg_map)
{
  if (WRONG_OBJ_TYPE(acct_seg_map, ACCT_SEG_MAP))
    return;
  Unset(acct_seg_map_vip_code, acct_seg_map->acct_seg_map_data);
}
EXPORT void unset_abp_bill_cycle_billing_frequency(ABP_BILL_CYCLE bill_cycle)
{
  if (WRONG_OBJ_TYPE(bill_cycle, BILL_CYCLE))
    return;
  Unset(bill_cycle_billing_frequency, bill_cycle->bill_cycle_data);
}
EXPORT void unset_abp_acct_seg_map_rev_rcv_cost_ctr(ABP_ACCT_SEG_MAP acct_seg_map)
{
  if (WRONG_OBJ_TYPE(acct_seg_map, ACCT_SEG_MAP))
    return;
  Unset(acct_seg_map_rev_rcv_cost_ctr, acct_seg_map->acct_seg_map_data);
}
EXPORT void unset_abp_acct_seg_map_collections_center(ABP_ACCT_SEG_MAP acct_seg_map)
{
  if (WRONG_OBJ_TYPE(acct_seg_map, ACCT_SEG_MAP))
    return;
  Unset(acct_seg_map_collections_center, acct_seg_map->acct_seg_map_data);
}
EXPORT void unset_abp_acct_icb_rate_currency_code(ABP_ACCT_ICB_RATE acct_icb_rate)
{
  if (WRONG_OBJ_TYPE(acct_icb_rate, ACCT_ICB_RATE))
    return;
  Unset(product_rate_override_currency_code, acct_icb_rate->product_rate_override_data);
}
EXPORT void unset_abp_group_server_sel_ds_database(ABP_GROUP_SERVER_SEL group_server_sel)
{
  if (WRONG_OBJ_TYPE(group_server_sel, GROUP_SERVER_SEL))
    return;
  Unset(server_definition_ds_database, group_server_sel->server_definition_data);
}
status_t
BNetworkAddressResolver::SetTo(int family, const char* host,
	const char* service, uint32 flags)
{
	Unset();

	// Check if the address contains a port

	BString hostString(host);

	BString portString;
	if (!strip_port(hostString, portString) && service != NULL)
		portString = service;

	// Resolve address

	addrinfo hint = {0};
	hint.ai_family = family;
	if ((flags & B_NO_ADDRESS_RESOLUTION) != 0)
		hint.ai_flags |= AI_NUMERICHOST;
	else if ((flags & B_UNCONFIGURED_ADDRESS_FAMILIES) == 0)
		hint.ai_flags |= AI_ADDRCONFIG;

	if (host == NULL && portString.Length() == 0) {
		portString = "0";
		hint.ai_flags |= AI_PASSIVE;
	}

	int status = getaddrinfo(host != NULL ? hostString.String() : NULL,
		portString.Length() != 0 ? portString.String() : NULL, &hint, &fInfo);
	if (status == 0)
		return fStatus = B_OK;

	// Map errors
	// TODO: improve error reporting, maybe add specific error codes?

	switch (status) {
		case EAI_ADDRFAMILY:
		case EAI_BADFLAGS:
		case EAI_PROTOCOL:
		case EAI_BADHINTS:
		case EAI_SOCKTYPE:
		case EAI_SERVICE:
		case EAI_NONAME:
		case EAI_FAMILY:
			fStatus = B_BAD_VALUE;
			break;

		case EAI_SYSTEM:
			fStatus = errno;
			break;

		case EAI_OVERFLOW:
		case EAI_MEMORY:
			fStatus = B_NO_MEMORY;
			break;

		case EAI_AGAIN:
			// TODO: better error code to denote temporary failure?
			fStatus = B_TIMED_OUT;
			break;

		default:
			fStatus = B_ERROR;
			break;
	}

	return fStatus;
}
BNetworkAddressResolver::~BNetworkAddressResolver()
{
	Unset();
}
Exemple #10
0
void StepsDisplay::Load( const std::string &sMetricsGroup, const PlayerState *pPlayerState )
{
	m_sMetricsGroup = sMetricsGroup;

	/* We can't use global ThemeMetric<std::string>s, because we can have multiple
	 * StepsDisplays on screen at once, with different names. */
	m_iNumTicks.Load(m_sMetricsGroup,"NumTicks");
	m_iMaxTicks.Load(m_sMetricsGroup,"MaxTicks");
	m_bShowTicks.Load(m_sMetricsGroup,"ShowTicks");
	m_bShowMeter.Load(m_sMetricsGroup,"ShowMeter");
	m_bShowDescription.Load(m_sMetricsGroup,"ShowDescription");
	m_bShowCredit.Load(m_sMetricsGroup,"ShowCredit");
	m_bShowAutogen.Load(m_sMetricsGroup,"ShowAutogen");
	m_bShowStepsType.Load(m_sMetricsGroup,"ShowStepsType");
	m_sZeroMeterString.Load(m_sMetricsGroup,"ZeroMeterString");
	m_sMeterFormatString.Load(m_sMetricsGroup,"MeterFormatString");

	m_sprFrame.Load( THEME->GetPathG(m_sMetricsGroup,"frame") );
	m_sprFrame->SetName( "Frame" );
	ActorUtil::LoadAllCommandsAndSetXYAndOnCommand( m_sprFrame, m_sMetricsGroup );
	this->AddChild( m_sprFrame );

	if( m_bShowTicks )
	{
		std::string sChars = "10"; // on, off (todo: make this metricable -aj)
		m_textTicks.SetName( "Ticks" );
		m_textTicks.LoadFromTextureAndChars( THEME->GetPathF(m_sMetricsGroup,"ticks"), sChars );
		ActorUtil::LoadAllCommandsAndSetXYAndOnCommand( m_textTicks, m_sMetricsGroup );
		this->AddChild( &m_textTicks );
	}

	if( m_bShowMeter )
	{
		m_textMeter.SetName( "Meter" );
		m_textMeter.LoadFromFont( THEME->GetPathF(m_sMetricsGroup,"meter") );
		ActorUtil::LoadAllCommandsAndSetXYAndOnCommand( m_textMeter, m_sMetricsGroup );
		this->AddChild( &m_textMeter );

		// These commands should have been loaded by SetXYAndOnCommand above.
		ASSERT( m_textMeter.HasCommand("Set") );
	}

	if( m_bShowDescription )
	{
		m_textDescription.SetName( "Description" );
		m_textDescription.LoadFromFont( THEME->GetPathF(m_sMetricsGroup,"Description") );
		ActorUtil::LoadAllCommandsAndSetXYAndOnCommand( m_textDescription, m_sMetricsGroup );
		this->AddChild( &m_textDescription );
	}
	if( m_bShowCredit )
	{
		m_textAuthor.SetName( "Step Author" );
		m_textAuthor.LoadFromFont( THEME->GetPathF(m_sMetricsGroup,"Credit") );
		ActorUtil::LoadAllCommandsAndSetXYAndOnCommand( m_textAuthor, m_sMetricsGroup );
		this->AddChild( &m_textAuthor );
	}

	if( m_bShowAutogen )
	{
		m_sprAutogen.Load( THEME->GetPathG(m_sMetricsGroup,"Autogen") );
		m_sprAutogen->SetName( "Autogen" );
		ActorUtil::LoadAllCommandsAndSetXYAndOnCommand( m_sprAutogen, m_sMetricsGroup );
		this->AddChild( m_sprAutogen );
	}

	if( m_bShowStepsType )
	{
		m_sprStepsType.Load( THEME->GetPathG(m_sMetricsGroup,"StepsType") );
		m_sprStepsType->SetName( "StepsType" );
		ActorUtil::LoadAllCommandsAndSetXYAndOnCommand( m_sprStepsType, m_sMetricsGroup );
		this->AddChild( m_sprStepsType );
	}

	// Play Load Command
	PlayerState* pPlayerState_ = const_cast<PlayerState*>(pPlayerState);
	Message msg("Load");
	if( pPlayerState_ )
		msg.SetParam( "PlayerState", LuaReference::CreateFromPush(*pPlayerState_) );
	this->HandleMessage( msg );

	Unset();
}
Exemple #11
0
// destructor
ResourceFile::~ResourceFile()
{
	Unset();
}
BDebugEventOutputStream::~BDebugEventOutputStream()
{
    Unset();
}
EXPORT void unset_abp_privacy_level_display_value(ABP_PRIVACY_LEVEL privacy_level)
{
  if (WRONG_OBJ_TYPE(privacy_level, PRIVACY_LEVEL))
    return;
  Unset(privacy_level_values_display_value, privacy_level->privacy_level_values_data);
}
EXPORT void unset_abp_privacy_level_is_internal(ABP_PRIVACY_LEVEL privacy_level)
{
  if (WRONG_OBJ_TYPE(privacy_level, PRIVACY_LEVEL))
    return;
  Unset(privacy_level_ref_is_internal, privacy_level->privacy_level_ref_data);
}
Exemple #15
0
	virtual ~SHAProcessor()
	{
		Unset();
	}
EXPORT void unset_abp_special_destination_inactive_dt(ABP_SPECIAL_DESTINATION special_destination)
{
    if (WRONG_OBJ_TYPE(special_destination, SPECIAL_DESTINATION))
        return;
    Unset(special_destinations_inactive_dt, special_destination->special_destinations_data);
}
EXPORT void unset_abp_acct_icb_rate_tracking_id_serv(ABP_ACCT_ICB_RATE acct_icb_rate)
{
  if (WRONG_OBJ_TYPE(acct_icb_rate, ACCT_ICB_RATE))
    return;
  Unset(product_rate_override_tracking_id_serv, acct_icb_rate->product_rate_override_data);
}
EXPORT void unset_abp_special_destination_external_si_id_type(ABP_SPECIAL_DESTINATION special_destination)
{
    if (WRONG_OBJ_TYPE(special_destination, SPECIAL_DESTINATION))
        return;
    Unset(customer_id_equip_map_external_id_type, special_destination->customer_id_equip_map_data);
}
EXPORT void unset_abp_acct_icb_rate_end_dt(ABP_ACCT_ICB_RATE acct_icb_rate)
{
  if (WRONG_OBJ_TYPE(acct_icb_rate, ACCT_ICB_RATE))
    return;
  Unset(product_rate_override_inactive_dt, acct_icb_rate->product_rate_override_data);
}
EXPORT void unset_abp_special_destination_tracking_id(ABP_SPECIAL_DESTINATION special_destination)
{
    if (WRONG_OBJ_TYPE(special_destination, SPECIAL_DESTINATION))
        return;
    Unset(special_destinations_tracking_id, special_destination->special_destinations_data);
}
EXPORT void unset_abp_group_server_sel_external_id_type(ABP_GROUP_SERVER_SEL group_server_sel)
{
  if (WRONG_OBJ_TYPE(group_server_sel, GROUP_SERVER_SEL))
    return;
  Unset(external_id_group_map_external_id_type, group_server_sel->external_id_group_map_data);
}
Exemple #22
0
EXPORT void unset_abp_bill_per_language_code(ABP_BILL_PER bill_per)
{
  if (WRONG_OBJ_TYPE(bill_per, BILL_PER))
    return;
  Unset(bill_period_values_language_code, bill_per->bill_period_values_data);
}
EXPORT void unset_abp_acct_seg_map_service_inquiry_center(ABP_ACCT_SEG_MAP acct_seg_map)
{
  if (WRONG_OBJ_TYPE(acct_seg_map, ACCT_SEG_MAP))
    return;
  Unset(acct_seg_map_service_inquiry_center, acct_seg_map->acct_seg_map_data);
}
Exemple #24
0
EXPORT void unset_abp_bill_per_display_value(ABP_BILL_PER bill_per)
{
  if (WRONG_OBJ_TYPE(bill_per, BILL_PER))
    return;
  Unset(bill_period_values_display_value, bill_per->bill_period_values_data);
}
EXPORT void unset_abp_acct_seg_map_insert_grp_id(ABP_ACCT_SEG_MAP acct_seg_map)
{
  if (WRONG_OBJ_TYPE(acct_seg_map, ACCT_SEG_MAP))
    return;
  Unset(acct_seg_map_insert_grp_id, acct_seg_map->acct_seg_map_data);
}
Exemple #26
0
EXPORT void unset_abp_bill_per_contract_use_code(ABP_BILL_PER bill_per)
{
  if (WRONG_OBJ_TYPE(bill_per, BILL_PER))
    return;
  Unset(bill_period_ref_contract_use_code, bill_per->bill_period_ref_data);
}
EXPORT void unset_abp_acct_seg_map_rate_class(ABP_ACCT_SEG_MAP acct_seg_map)
{
  if (WRONG_OBJ_TYPE(acct_seg_map, ACCT_SEG_MAP))
    return;
  Unset(acct_seg_map_rate_class, acct_seg_map->acct_seg_map_data);
}
Exemple #28
0
EXPORT void unset_abp_bill_per_is_internal(ABP_BILL_PER bill_per)
{
  if (WRONG_OBJ_TYPE(bill_per, BILL_PER))
    return;
  Unset(bill_period_ref_is_internal, bill_per->bill_period_ref_data);
}
EXPORT void unset_abp_bill_cycle_prep_date(ABP_BILL_CYCLE bill_cycle)
{
  if (WRONG_OBJ_TYPE(bill_cycle, BILL_CYCLE))
    return;
  Unset(bill_cycle_prep_date, bill_cycle->bill_cycle_data);
}
EXPORT void unset_abp_rate_class_short_description_text(ABP_RATE_CLASS rate_class)
{
  if (WRONG_OBJ_TYPE(rate_class, RATE_CLASS))
    return;
  Unset(descriptions_short_description_text, rate_class->descriptions_data);
}