void FolderTreeWidgetItem::updateExpandedState()
{
  // Just trigger an update of the column text, it will all be handled thaere.
  setDataSize( mDataSize );
  setTotalCount( mTotalCount );
  setUnreadCount( mUnreadCount );
}
CResourceResult::CResourceResult(const CResourceResult& result)
{
	setIsValid(result.getIsValid());
	setIsSuccess(result.getIsSuccess());

	setData(result.getData());
	setDataSize(result.getDataSize());
	setCacheControlStr(result.getCacheControlStr());
	setMessage(result.getMessage());
	setEtag(result.getEtag());
	setMIME(result.getMIME());
}
Ejemplo n.º 3
0
	void UIInLink::SetLinkStrip(UILinkStrip* strip)
	{
		m_linkStrip = strip;
		setDataSize(m_linkStrip->getStartTarget()->getTypeSize());
	}
/*
 * Used for copies. Note that it does NOT call the postCreation Func,
 * so FieldElements are copied rather than created by the Cinfo when
 * the parent element is created. This allows the copied FieldElements to
 * retain info from the originals.
 * n is the number of new entries made.
 */
LocalDataElement::LocalDataElement( Id id, const Element* orig, 
				unsigned int n )
	:	
		DataElement( id, orig, setDataSize( n ), 
		( 1 + (n - 1 ) / Shell::numNodes() ) * Shell::myNode() )
{;}
LocalDataElement::LocalDataElement( Id id, const Cinfo* c, 
	const string& name, unsigned int numData )
	:	
		DataElement( id, c, name, setDataSize( numData ) )
{;}
// virtual func, overridden.
void LocalDataElement::resize( unsigned int newNumData )
{
	DataElement::resize( setDataSize( newNumData ) ); 
}
Ejemplo n.º 7
0
void                 rWAVAudio::readHeaders()
{
   unsigned int     buff;
   int              c=0;

   _D(Lvl_Info, "%s: Reading headers", (int)__PRETTY_FUNCTION__);
   DOS->Seek(getFile(), 0, OFFSET_BEGINNING);

   if (DOS->Read(getFile(), &buff, 4)!=4) 
   {
      _D(Lvl_Info, "%s: File seems to be too small.. reading failed.", (int)__PRETTY_FUNCTION__);
      return;
   }
   buff = L2BE(buff);
   if (buff != ID_RIFF) 
   {
      _D(Lvl_Info, "%s: RIFF Wave file header not present (got: %08lx)", (int)__PRETTY_FUNCTION__, buff);
      return;
   }

   DOS->Seek(getFile(), 4, OFFSET_CURRENT);

   if (DOS->Read(getFile(), &buff, 4)!=4) 
   {
      _D(Lvl_Info, "%s: File truncated..?", (int)__PRETTY_FUNCTION__);
      return;
   }
   buff = L2BE(buff);
   if (buff != ID_WAVE) 
   {
      _D(Lvl_Info, "%s: This RIFF is not Wave... (%08lx)", (int)__PRETTY_FUNCTION__, buff);
      return;
   }

   for (c=0; c<2;) 
   {
      if (DOS->Read(getFile(), &buff, 4)!=4) 
      {
         _D(Lvl_Info, "%s: File truncated...", (int)__PRETTY_FUNCTION__);
         return;
      }

      _D(Lvl_Info, "%s: Read tag: %08lx", (int)__PRETTY_FUNCTION__, buff);

      buff = L2BE(buff);

      if (buff == ID_fmt) 
      {
         _D(Lvl_Info, "%s: format tag located.", (int)__PRETTY_FUNCTION__);
         c++;
      }
      else if (buff == ID_data) 
      {
         _D(Lvl_Info, "%s: data tag located.", (int)__PRETTY_FUNCTION__);
         c++;
         if (DOS->Read(getFile(), &buff, 4)!=4) 
         {
            _D(Lvl_Info, "%s: file truncated.", (int)__PRETTY_FUNCTION__);
            return;
         }

         setDataOffset(DOS->Seek(getFile(), 0, OFFSET_CURRENT));
         buff = L2LE(buff);
         setDataSize(buff);
         DOS->Seek(getFile(), -4, OFFSET_CURRENT);
      }
      if (DOS->Read(getFile(), &buff, 4)!=4) 
      {
         _D(Lvl_Info, "%s: Failed to read chunk size. File truncated.", (int)__PRETTY_FUNCTION__);
         return;
      }
      buff = L2LE(buff);
      _D(Lvl_Info,"%s: chunk size = %ld bytes.", (int)__PRETTY_FUNCTION__, buff);
      DOS->Seek(getFile(), buff, OFFSET_CURRENT);
   }

   return;
}