// ---------------------------------------------------------------------------
// CIRBrowseCatagoryItems::SetTextL()
// sets the cache status informa
// ---------------------------------------------------------------------------
//
EXPORT_C void CIRBrowseCatagoryItems::SetTextL( const TDesC& aCatName,
                                               const TDesC& aCatId )
    {
    IRLOG_DEBUG( "CIRBrowseCatagoryItems::SetTextL - Entering" );
    iCatName = aCatName.Alloc();
    iCatId = aCatId.Alloc();    
    IRLOG_DEBUG( "CIRBrowseCatagoryItems::SetTextL - Exiting." );
    }
예제 #2
0
/* 
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
*/
void CExPolicy_Server::CellIDL(const TDesC& aCountryCode,const TDesC& aNwId,TUint aAreaCode,TUint aCellId)
{
	delete iCountryCode;
	iCountryCode = NULL;
	iCountryCode = aCountryCode.Alloc();
	
	delete iNwId;
	iNwId = NULL;
	iNwId = aNwId.Alloc();
	
	iAreaCode = aAreaCode;
	iCellId = aCellId;
}
예제 #3
0
void CResourceManager::SetCachePath(const TDesC& aPath)
{
    if (iCachePath)
        delete iCachePath;

    iCachePath = aPath.Alloc();
}
// ---------------------------------------------------------------------------
// CIRAdvertisement::SetURL()
// Function to set the url of the global advertisement
// ---------------------------------------------------------------------------
//
EXPORT_C void CIRAdvertisement::SetURL( const TDesC& aUrl )
    {
    IRLOG_DEBUG( "CIRAdvertisement::SetURL - Entering" );
    iUrl = aUrl.Alloc();
    IRLOG_DEBUG( "CIRAdvertisement::SetURL - Exiting." );
    return;
    }
// ---------------------------------------------------------------------------
// CIRBrowseCatagoryItems::SetGetOperation()
// sets params for retriving data
// ---------------------------------------------------------------------------
//
EXPORT_C void CIRBrowseCatagoryItems::SetGetOperation( 
                                                  const TDesC& aCatGetOperation )
    {
    IRLOG_DEBUG( "CIRBrowseCatagoryItems::SetGetOperation - Entering" );
    iCatGetOperation = aCatGetOperation.Alloc();
    IRLOG_DEBUG( "CIRBrowseCatagoryItems::SetGetOperation - Exiting." );
    }
예제 #6
0
void CPictureWidget::SetAlt(const TDesC& aAlt)
{
	iAlt = aAlt.Alloc();
	//width = KDefaultFont->MeasureText(*iAlt);
	iSize.iHeight = KDefaultFont->HeightInPixels();
	iSize.iWidth = KDefaultFont->MeasureText(*iAlt);
	//SetImage(_L("C:\\coco.jpg"));
}
예제 #7
0
void TPhoneCmdParamCallHeaderData::SetCNAPText( 
  const TDesC& aCNAPText,
  TPhoneTextClippingDirection aDirection )
  {
  delete iCNAPText;
  iCNAPText = aCNAPText.Alloc();
  iCNAPTextClippingDirection = aDirection; 
  }
예제 #8
0
void TPlayerInfo::ConstructL(TDesC& aFileName)
{
    iFileName = aFileName.Alloc();
    InitPlayerInfo();
    //读取存档
    ReadPlayerInfo();
    //排序
    OrderByDesc();
}
예제 #9
0
//public:
CTextWidget::CTextWidget(const TDesC& aDes)
	: CWidget(_L("CTextWidget"))
	//: CWidget(EText)
{
	ASSERT(aDes.Length());
	iText = aDes.Alloc();
	ASSERT(iText);
	//iSize
	width = KDefaultFont->MeasureText(*iText);
}
 /**
  * Setter method to set EMail address
  */
 EXPORT_C void COMASuplThirdpartyId::SetEmailAddress(const TDesC& aEmailAddress)
     {
     if(iEMailAddress)
         {
         delete iEMailAddress;
         iEMailAddress = NULL;
         }
     iType = COMASuplThirdpartyId::EThirdPartyEmail;
     iEMailAddress = aEmailAddress.Alloc();
     }
 /**
  * Setter method to set logical name
  */
 EXPORT_C void COMASuplThirdpartyId::SetLogicalName(const TDesC& aLogicalName)
     {
     if(iLogicalName)
         {
         delete iLogicalName;
         iLogicalName = NULL;
         }
     iType = COMASuplThirdpartyId::EThirdPartyLogicalName;
     iLogicalName = aLogicalName.Alloc();
     }
예제 #12
0
void CProcessPair::ConstructL(const TDesC& aProcessName, const TProcessId aProcessId)
	{
	//allocate the process name buffer and fill with aProcessName
	iProcessName = aProcessName.Alloc();
	if(iProcessName == NULL)
		User::Leave(KErrNoMemory);

	LOG_MSG2( "CProcessPair::ConstructL() process name: %S", &TPtr8((TUint8*)iProcessName->Ptr(), 2*iProcessName->Length(), 2*iProcessName->Length()) );

	//set process id
	iProcessId = aProcessId;
	}
예제 #13
0
int CAfStorageClient::getThumbnail(const TDesC &imagePath, void *userData)
{
    lastMethodCalled = CAfStorageClient::GetThumbnailMethod;
    delete lastCallThumbnailPath;
    lastCallThumbnailPath = imagePath.Alloc();
    lastCallUserData = userData;
    CFbsBitmap *bitmap = new (ELeave)CFbsBitmap();
    CleanupStack::PushL(bitmap);
    User::LeaveIfError(bitmap->Create(TSize(128, 128), EColor4K));
    mObserver.getThumbnailRequestCompleted(CAfStorageClient::expectedReturnCode, bitmap->Handle(), userData);
    CleanupStack::PopAndDestroy(bitmap);
    return CAfStorageClient::expectedReturnCode;
}
void ResolvedConnection::HandleResolveComplete(const TDesC& aContentType,
                                               const TDesC& aCharset,
                                               const HBufC8* aContentBuf)
{
    if (aContentType.Length() == 0 || aContentBuf == NULL) {
        complete(KErrArgument);
    }
    else {
        m_contentType = aContentType.Alloc();
        m_charset = aCharset.Alloc();
        m_contentBuf = aContentBuf->Alloc();
        if (!(m_contentType && m_charset && m_contentBuf)) {
            complete(KErrNoMemory);
        }
        else {
            m_maxSize = aContentBuf->Length();
            if (m_didSubmit) {
                m_scheduler = CPeriodic::NewL( CActive::EPriorityStandard );
                m_scheduler->Start( 0, 0, TCallBack( &processResponseCb, this ) );
            }
        }
    }
}
void HistoryEntry::setPageTitle(const TDesC& pageTitle)
{
    if (pageTitle.Length()) {
        HBufC* title = m_pageTitle;
        m_pageTitle = NULL;
        m_pageTitle = pageTitle.Alloc();
        if (m_pageTitle) {
            delete title;
        }
        else {
            m_pageTitle = title;
        }
    }
}
// ----------------------------------------------------------------------------
// 
// ----------------------------------------------------------------------------
//
void CWrtHarvester::RemovePublisherAndObserverL( const TDesC& aBundleId )
    {
    
    if( IsInMSMode() == 1 )
      {
      HBufC *temp = aBundleId.Alloc();
      TPtr ptr (temp->Des());
      for( TInt i=0; i<iHSWidgets.Count(); i++ )
        {

        if( ptr.Compare(iHSWidgets[i]->Des()) == 0)
          {
           return;
          }
        }

      }   
              
    RemoveObserver( aBundleId );
    
    __UHEAP_MARK;
    if( iCPSInterface )
        {
        CLiwGenericParamList* inparam = CLiwGenericParamList::NewLC();
        CLiwGenericParamList* outparam = CLiwGenericParamList::NewLC();
        TLiwGenericParam type( KType, TLiwVariant( KPubData ));
        inparam->AppendL( type );
        CLiwDefaultMap* cpdatamap = CLiwDefaultMap::NewLC();
        CLiwDefaultMap* datamap = CLiwDefaultMap::NewLC();

        // Create data map
        cpdatamap->InsertL( KPublisherId, TLiwVariant( KWRTPublisher ));
        cpdatamap->InsertL( KContentType, TLiwVariant( KTemplatedWidget ));
        cpdatamap->InsertL( KContentId, TLiwVariant( aBundleId ));
        
        cpdatamap->InsertL( KDataMap, TLiwVariant(datamap) );
        
        TLiwGenericParam item( KMyItem, TLiwVariant( cpdatamap ));        
        inparam->AppendL( item );
        iCPSInterface->ExecuteCmdL( KMyDelete , *inparam, *outparam);
        
        CleanupStack::PopAndDestroy( datamap );
        CleanupStack::PopAndDestroy( cpdatamap );
        item.Reset();
        type.Reset();
        CleanupStack::PopAndDestroy(outparam);
        CleanupStack::PopAndDestroy(inparam);
        }
    __UHEAP_MARKEND;
    }
//From MOperationObserver
void CHandleOutSearch::OperationEvent(TInt aEventType,const TDesC& aEventData,TInt aType)
{
	TInt eventType=aEventType;

	if(aEventType==EHttpNoError)
	{
		if(aType==EHttpOutSearch)
		{
			::WriteFile(iFileName,aEventData);
			this->HandlePageWml();
		}
		else if(aType==EHttpOutSearchError)
		{
			DELETE(iErrorInfo);
			iErrorInfo=aEventData.Alloc();

			DELETE(iBuf);
			iBuf=aEventData.Alloc();
			eventType=EHttpContentError;
		}
	}
	else
	{
		DELETE(iBuf);
		iBuf=aEventData.Alloc();
	}
	if(aType!=EHttpOutSearchKeyWord)
	{
		if(iContentError)
		{
			iObserver.HandleResponseEvent(EHttpContentError,aType);
			iContentError=EFalse;
		}
		else
			iObserver.HandleResponseEvent(eventType,aType);
	}
}
// ---------------------------------------------------------------------------
// CVoiceMailboxEntry::SetVmbxName
// Set Name of the entry instance
// ---------------------------------------------------------------------------
//
EXPORT_C TInt CVoiceMailboxEntry::SetVmbxName( const TDesC& aVmbxName )
{
    qDebug("DummyVoiceMailboxEntry::SetVmbxName >");
    TInt result( KErrNoMemory );
    if (KVmbxMaxNumberLength < aVmbxName.Length()){
        result = KErrArgument;
    }else{
        delete ivmbxName;
        ivmbxName = aVmbxName.Alloc(); // Returns NULL if fails.
        if ( ivmbxName ){
            result = KErrNone;
        }       
    }
    qDebug("DummyVoiceMailboxEntry::SetVmbxName <");
    return result;
}
// ---------------------------------------------------------------------------
// Script has "type" and "xlink:href" attributes
// ---------------------------------------------------------------------------
TInt CSvgScriptElementImpl::SetAttributeL( const TDesC& aName, const TDesC& aValue )
{
    _LIT( KXlink, "xlink:href" );
    _LIT( KType, "type" );
    if ( aName == KXlink )
    {
        delete iXLink;
        iXLink = NULL;
        iXLink = aValue.Alloc();
        FetchExternalScriptL();
    }
    else if ( aName == KType )
    {
        // ignore
    }

    return KErrNone;
}
예제 #20
0
void CAknInputFrame::ConstructL( CCoeControl* aField,
                                 TBool aOwner,
                                 const TDesC& aFileName,
                                 TInt aBitmapId,
                                 TInt aMaskId,
                                 TUint32 aFlags )
    {
    BaseConstructL(aField, aOwner, aFlags);
    iFileName = aFileName.Alloc();
    iBitmapId = aBitmapId;
    iMaskId = aMaskId;
    
    if(aFileName.Length())
        {
        if( aFileName.Compare( KAvkonBitmapFile ) == 0 )
            {
            // If the icon comes from Avkon MBM, set skin IID if known
            switch( aBitmapId )
                {
                case EMbmAvkonQgn_indi_find_glass:
                    iIconSkinID = KAknsIIDQgnIndiFindGlass;
                    break;
                case EMbmAvkonQgn_indi_find_glass_pinb:
                    iIconSkinID = KAknsIIDQgnIndiFindTitle;
                    break;
                case EMbmAvkonQgn_indi_find_goto:
                    iIconSkinID = KAknsIIDQgnIndiFindGoto;
                    break;
                default:
                    iIconSkinID = KAknsIIDNone;
                    break;
                }
            }
		CAknInputFrame::CreateIconL();
        }
    }
// ----------------------------------------------------------------------------
// Is called when Homescreen sends events to publisher
// ----------------------------------------------------------------------------
//  
void CWrtHarvester::HandlePublisherNotificationL( const TDesC& aContentId, const TDesC8& aTrigger )
    {
    
    //Do not send the Operations to the Widgets when in Mass storage mode.. . .  
    if( IsInMSMode() == 1 )
        {
         if(aTrigger == KDeActive)
         RemovePublisherAndObserverL(aContentId);
         return;              
        }
   
    TUid uid( WidgetUid( aContentId ) );
    TWidgetOperations operation( Uninitialized );
    if( aTrigger == KActive )
        {
        HBufC* temp = aContentId.Alloc();
        iHSWidgets.Append( temp );
        iHSCount++;	
        // queue the activated state event only for network accessing widgets
        if ( CheckNetworkAccessL( uid) )
            {
            TWrtState* widgetState = NULL;
            widgetState = new TWrtState( uid, EActivatedState );
            if ( widgetState )
                {
                iWidgetStateArray.AppendL( widgetState );
                }
            }
        
        operation = LaunchMiniview;
        }
    else if ( aTrigger == KDeActive )
        {
        iHSCount--;
        operation = Deactivate;
        HBufC *temp = aContentId.Alloc();
        TPtr ptr (temp->Des());
        for( TInt i=0; i<iHSWidgets.Count(); i++ )
          {
          if( ! ptr.Compare(iHSWidgets[i]->Des()))
            {
            iHSWidgets.Remove(i);
            break;
            }
          }
        delete temp;        
        }
    else if( aTrigger == KSuspend )
        {
        operation = WidgetSuspend;
        }
    else if( aTrigger == KResume )
        {
        TInt idx = FindWidget( uid );
        
        // if unable to find the widget, queue the resume as usual
        if ( idx == -1 )
            {
            QueueResumeL( uid );
            }
        else
            {
            iWidgetStateArray[idx]->iState = EResumeState;
            }
        return;
        }
    else if( aTrigger == KSelected )
        {
        operation = WidgetSelect;
        }
    else if( aTrigger == KHSOnline )
        {
        ProcessNetworkModeL( uid, WidgetOnline );
        return;
        }
    else if( aTrigger == KHSOffline )
        {
        ProcessNetworkModeL( uid, WidgetOffline );
        return;
        }
    QueueOperationL( operation, uid );
    }
예제 #22
0
void TPlayer::SetScoreAndName(TInt32 aScore, TDesC& aName)
{
    iIsNewPlayer=EFalse;
    iScore = aScore;
    iName = aName.Alloc();
}
void CContentInfoDialog::SetRemark(const TDesC& aRemark)
{
	DELETE(iRemark);
	iRemark=aRemark.Alloc();
	this->AddTextItem(aRemark);
}
예제 #24
0
void CPictureWidget::SetPictureLink(const TDesC& aParentLink)
{
	iParentLink = aParentLink.Alloc();
	MakePictureLink();
}
예제 #25
0
// ---------------------------------------------------------
// TPhoneCmdParamCallHeaderData::SetShortLabelText
// Sets the call header short label text
// (other items were commented in a header).
// ---------------------------------------------------------
//
void TPhoneCmdParamCallHeaderData::SetShortLabelText(
   const TDesC& aShortLabelText )
    {
    delete iShortLabelText;
    iShortLabelText = aShortLabelText.Alloc();
    }
예제 #26
0
void CPictureWidget::SetPictureName(const TDesC& aName)
{
	iFileName = aName.Alloc();
	MakePictureLink();
}
예제 #27
0
/* 
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
*/
void CExPolicy_Server::GotIMSIL(const TDesC& aIMSI, TInt aError)
{
	delete iImsi;
	iImsi = NULL;
	iImsi = aIMSI.Alloc();
}
EXPORT_C void CIRBrowseCatagoryItems::SetBannerUrl( const TDesC& aBannerUrl )
    {
    IRLOG_DEBUG( "CIRBrowseCatagoryItems::SetBannerUrl() - Entering" );
    iCatBannerUrl = aBannerUrl.Alloc();
    IRLOG_DEBUG( "CIRBrowseCatagoryItems::SetBannerUrl - Exiting" );
    }
EXPORT_C void CIRBrowseCatagoryItems::SetClickThroughUrl( const TDesC& aClickThroughUrl )
    {
    IRLOG_DEBUG( "CIRBrowseCatagoryItems::SetClickThroughUrl() - Entering" );
    iCatClickThroughUrl = aClickThroughUrl.Alloc();
    IRLOG_DEBUG( "CIRBrowseCatagoryItems::SetClickThroughUrl() - Exiting" );
    }
void CSystemStartupStateInfo::SetName(const TDesC& aName)
	{
	delete iName;
	iName = aName.Alloc();
	}