Example #1
0
//---------------------------------------------------------------------------
int32_t PacketFile::open(FilePtr _parent, uint32_t fileSize, int32_t numChild)
{
	int32_t result = File::open(_parent, fileSize, numChild);
	if(result != NO_ERROR)
		return(result);
	result = afterOpen();
	return(result);
}
Example #2
0
//---------------------------------------------------------------------------
int32_t CSVFile::open(FilePtr _parent, uint32_t fileSize, int32_t numChild)
{
	numChild = -1;		//Force all parented CSVs to load from RAM.
	int32_t result = File::open(_parent, fileSize, numChild);
	if(result != NO_ERROR)
		return(result);
	result = afterOpen();
	return(result);
}
Example #3
0
//---------------------------------------------------------------------------
int32_t CSVFile::open(PCSTR fName, FileMode _mode, int32_t numChild)
{
	int32_t result = File::open(fName, _mode, numChild);
	if(result != NO_ERROR)
		return(result);
	seek(0);
	result = afterOpen();
	return(result);
}
Example #4
0
int32_t PacketFile::createWithCase(PSTR fName)
{
	int32_t openResult = File::createWithCase(fName);
	if(openResult != NO_ERROR)
	{
		return(openResult);
	}
	openResult = afterOpen();
	return(openResult);
}
Example #5
0
//---------------------------------------------------------------------------
int32_t PacketFile::open(PSTR fName, FileMode _mode, int32_t numChild)
{
	int32_t openResult = File::open(fName, _mode, numChild);
	if(openResult != NO_ERROR)
	{
		return(openResult);
	}
	openResult = afterOpen();
	return(openResult);
}
Example #6
0
//---------------------------------------------------------------------------
long PacketFile::open (FilePtr _parent, unsigned long fileSize, long numChild)
{
	long result = File::open(_parent,fileSize,numChild);
	
	if (result != NO_ERR)
		return(result);
		
	result = afterOpen();	
	return(result);
}
Example #7
0
//---------------------------------------------------------------------------
long CSVFile::open (FilePtr _parent, unsigned long fileSize, long numChild)
{
	numChild = -1;		//Force all parented CSVs to load from RAM.
	long result = File::open(_parent,fileSize,numChild);
	if (result != NO_ERR)
		return(result);
		
	result = afterOpen();
	
	return(result);
}
Example #8
0
//---------------------------------------------------------------------------
long CSVFile::open (const char* fName, FileMode _mode, long numChild)
{
	long result = File::open(fName,_mode,numChild);
	if (result != NO_ERR)
		return(result);
		
	seek(0);

	result = afterOpen();
	
	return(result);
}
Example #9
0
long PacketFile::createWithCase( char* fName )
{
	long openResult = File::createWithCase(fName);
	
	if (openResult != NO_ERR)
	{
		return(openResult);
	}
	
	openResult = afterOpen();
	return(openResult);
}
Example #10
0
//---------------------------------------------------------------------------
long PacketFile::open (char* fName, FileMode _mode, long numChild)
{
	long openResult = File::open(fName,_mode,numChild);
	
	if (openResult != NO_ERR)
	{
		return(openResult);
	}

	openResult = afterOpen();
	return(openResult);
}
Example #11
0
bool BaseFile::open(const std::string & fileName)
{
	if(!FileExists(fileName)) {
		setLatestError(BaseFile::FileNotFound);
		return false;
	}
	
	if(!clear()) return false;
	
	doClose();
	if(!doRead(fileName)) return false;
	afterOpen();
	setFileName(fileName);
	setOpened();
    
	return true;
}
Example #12
0
bool Mp3Decoder::openFile( FILE*& file )
{
	_handle = mpg123_new(NULL, NULL);
	if(_handle == NULL)
	{
		printf("mpg123_new failed\n");
		return false;
	}

	_file = file;

	int res = mpg123_open_fd(_handle, _file->_file);
	if(res != MPG123_OK)
	{
		printf("mpg123_open_handle failed\n");
		return false;
	}

	return afterOpen();
}
Example #13
0
bool Mp3Decoder::open( Downloader* downloader )
{
	_handle = mpg123_new(NULL, NULL);
	if(_handle == NULL)
	{
		printf("mpg123_new failed\n");
		return false;
	}

	mpg123_replace_reader_handle(_handle, g_read, NULL, NULL);
	int res = mpg123_param(_handle, MPG123_FLAGS, MPG123_FUZZY | MPG123_SEEKBUFFER | MPG123_GAPLESS, 0);
	assert(res == MPG123_OK);

	res = mpg123_open_handle(_handle, downloader);
	if(res != MPG123_OK)
	{
		printf("mpg123_open_handle failed\n");
		return false;
	}

	_downloader = downloader;

	return afterOpen();
}
void CFormulatorDoc::afterNew() 
{
	afterOpen(QString());
}