Example #1
0
SkillRef Skill::Spawn(ItemFactory &factory, ItemData &data)
{
    uint32 skillID = _Spawn( factory, data );
    if( skillID == 0 )
        return SkillRef();

    SkillRef skillRef = Skill::Load( factory, skillID );

    skillRef->SetAttribute(AttrIsOnline, 1);      // Is Online

    return skillRef;
}
Example #2
0
status_t
Shell::Open(int row, int col, const ShellParameters& parameters)
{
	if (fFd >= 0)
		return B_ERROR;

	status_t status = _Spawn(row, col, parameters);
	if (status < B_OK)
		return status;

	fTermParse = new (std::nothrow) TermParse(fFd);
	if (fTermParse == NULL) {
		Close();
		return B_NO_MEMORY;
	}

	return B_OK;
}
Example #3
0
status_t
Shell::Open(int row, int col, const char *encoding, int argc, const char **argv)
{
	if (fFd >= 0)
		return B_ERROR;

	status_t status = _Spawn(row, col, encoding, argc, argv);
	if (status < B_OK)
		return status;

	fTermParse = new (std::nothrow) TermParse(fFd);
	if (fTermParse == NULL) {
		Close();
		return B_NO_MEMORY;
	}

	return B_OK;
}