bool CContactInfo::SetValue(AECHAR **pwzValue, char *pszXml, char *pszTag)
{
	FREEIF(*pwzValue);

	char *pszTmp=NULL;
	if ( SetValue(&pszTmp, pszXml, pszTag))
	{
		if ( NULL!=pszTmp )
		{
			int nLen = STRLEN(pszTmp);
		
			*pwzValue = (AECHAR*)MALLOC( (nLen+1)*sizeof(AECHAR));
			
			if ( NULL==*pwzValue ) 
			{
				FREEIF(pszTmp);
				return false;
			}
		
		
			STRTOWSTR(pszTmp, *pwzValue, (nLen+1)*sizeof(AECHAR)); 
			FREEIF(pszTmp);

		}
	}

	return true;
}
Example #2
0
PRIVATE void net_proxy_complete (NET_StreamClass *stream)
{
	ProxyObj *obj=stream->data_object;	
	FREEIF(obj->content_type);
	FREEIF(obj->content_encoding);
	FREE(obj);
    return;
}
Example #3
0
PRIVATE void net_proxy_abort (NET_StreamClass *stream, int status)
{
	ProxyObj *obj=stream->data_object;	
	FREEIF(obj->content_type);
	FREEIF(obj->content_encoding);
	FREE(obj);
    return;
}
Example #4
0
uint32 IMainUI_Release(IMainUI* pUI){
	IMAINUI_ClosePosUI(pUI);
	IMENUCTL_Reset(pUI->pMenu);
	IMENUCTL_Release(pUI->pMenu);
	IMENUCTL_Reset(pUI->pSK);
	IMENUCTL_Release(pUI->pSK);
	FREEIF(pUI->pvt);
	FREEIF(pUI);
	return AEE_SUCCESS;
}
Example #5
0
PRIVATE void
net_help_free_frame_group_struct(frame_set_struct *obj)
{
	XP_ASSERT(obj);
	if(!obj)
		return;
	FREEIF(obj->address);
	FREEIF(obj->target);
	FREE(obj);
}
void CORMAT_init( int mlag , int pp )
{
   FREEIF(cor) ; FREEIF(ncor) ; maxlag = 0 ;
   if( mlag > 0 ){
      cor   = (float *)calloc( sizeof(float) , mlag ) ;
     ncor   = (int *)  calloc( sizeof(int)   , mlag ) ;
     maxlag = mlag ;
     port   = (pp < 0 || pp > 3) ? 0 : pp ;
   }
   return ;
}
Example #7
0
error_t	editor_set_nchar_max(t_HWidget handle, int nchars)
{
	error_t ret = EBADPARM;
	if(g_object_valid(handle)){
		t_CEditor *pme = (t_CEditor *)handle;
		ucs2_t *newbuf;
		if(nchars <= 0)
			nchars = NCHARS_MAX_DEFAULT;
		newbuf = MALLOC((nchars+1) * sizeof(ucs2_t));
		if(pme->nchars > 0 && pme->buffer){
			if(pme->nchars > nchars){
				pme->nchars = nchars;
				pme->utf8_bytes = ustring_to_utf8(pme->buffer, pme->nchars, NULL, -1);
			}
			memcpy(newbuf, pme->buffer, pme->nchars*sizeof(ucs2_t));
		}else{
			pme->nchars = 0;
		}
		FREEIF(pme->buffer);
		pme->nchars_max = nchars;
		pme->buffer = newbuf;
		pme->cursor = pme->nchars;
		pme->buffer[pme->nchars] = 0;
		ret = SUCCESS;
	}
	return ret;
}
void CContactInfo::CountMultiFields(AECHAR *pwzField, int &nCount)
{
	if (NULL==pwzField ) return;

	nCount++;

	AECHAR pwzNewTag[]=NEW_FIELD;
	char pszNewtag[10];
	SPRINTF(pszNewtag, "%S", pwzNewTag);

	char *pszTmp=NULL;
	int nLen=WSTRLEN(pwzField);
	pszTmp = (char*)MALLOC(nLen+1);
	if ( NULL==pszTmp ) return;
	WSTRTOSTR(pwzField, pszTmp, nLen+1);

	char *pNext=pszTmp;
	char *pFound=NULL;
	while ( NULL!=(pFound=STRSTR(pNext, pszNewtag)))
	{
		nCount++;
		pNext = pFound+1;
	}

	FREEIF(pszTmp);
}
Example #9
0
/*===========================================================================

FUNCTION: CGMENUCTL_Release

DESCRIPTION:
Deletes the control and all associated memory.

PARAMETERS:
pCtl [in] - A pointer to a CGMeuCtl instance

DEPENDENCIES:
None

RETURN VALUE:
None

SIDE EFFECTS:
None
===========================================================================*/
extern void CGMENUCTL_Release(CGMeuCtl* pCtl)
{
	if (pCtl)
	{

		if (pCtl->m_pImageBk)
		{
			GM_RELEASEIF(pCtl->m_pImageBk);
		}

		if (pCtl->m_pImageSe)
		{
			GM_RELEASEIF(pCtl->m_pImageSe);
		}

		//
		CGMENUCTL_FreeImage(pCtl);

		if (pCtl->m_pDataList)
		{
			TQueueList_Destroy(&(pCtl->m_pDataList));
		}
		
		FREEIF(pCtl);
	}
}
Example #10
0
void MemChecker_ParseLineCB(void *pUser, const char *pszKey, int nKeyLen, const char *pszValue, int nValueLen)
{
    MemChecker *pMe = (MemChecker *)pUser;
    char *pszValueCopy = NULL;

    pszValueCopy = MALLOC(nValueLen + 1);
    if (NULL == pszValueCopy) {
        return;
    }
    MEMCPY(pszValueCopy, pszValue, nValueLen);

    if (0 == STRNCMP("ClassID", pszKey, nKeyLen))
    {
        if (STRBEGINS("0x", pszValueCopy)) {
            pMe->m_clsCheckedApp = STRTOUL(pszValueCopy, NULL, 16);
        } else {
            pMe->m_clsCheckedApp = ATOI(pszValueCopy);
        }
    }
    else if (0 == STRNCMP("OutputTo", pszKey, nKeyLen))
    {
        pMe->m_eOutputMode = ATOI(pszValueCopy);
    }

    FREEIF(pszValueCopy);
}
Example #11
0
void StatusBox_Dtor(StatusBox *me)
{
   FREEIF(me->pStringData);
   CALLBACK_Cancel(&me->cb);
   RELEASEIF(me->piImage);
   ZEROAT(me);
}
Example #12
0
void Tooltip_Dtor(Tooltip *me)
{
    FREEIF(me->pStringData);
    RELEASEIF(me->piDisplay);
    RELEASEIF(me->piShell);
    CALLBACK_Cancel(&me->cb);
    ZEROAT(me);
}
// ================================================================================
// FUNCTION		: SetContactFromXml
// DESCRIPTION	: Set contact from a xml.
// ================================================================================
bool CContactInfo::SetContactFromXml(char *pszXml, char *pszType)
{
	DBGPRINTF(pszXml);

	ReleaseMem();

	char *pszFound=NULL;

	//set type of contact
	if ( 0==STRCMP("add", pszType))
		m_nState = SM_RECORD_ADD;
	else if ( 0==STRCMP("update", pszType))
		m_nState = SM_RECORD_UPDATE;
	else if ( 0==STRCMP("delete", pszType))
		m_nState = SM_RECORD_DELETE;
	else
		return false;

	int nLen=0;
	char *pszEndTag=NULL;
	char *pszNumber=NULL;
	
	//set contact id
	if ( !SetValue(&pszNumber, pszXml, "id")) return false;
	if ( NULL!=pszNumber ) m_nContactId = (uint16)STRTOUL(pszNumber, NULL, 10);
	DBGPRINTF("Contact id= %d", m_nContactId);
	FREEIF(pszNumber);

	//set global id
	if ( !SetValue(&m_psGlobalId, pszXml, "gcid")) return false;
	
	//set first name
	if ( !SetValue(&m_psFName, pszXml, "fn")) return false;
    if (NULL!=m_psFName) DBGPRINTF("%S", m_psFName);  
	if ( !SetValue(&m_psLName, pszXml, "ln")) return false;  
	if (NULL!=m_psLName) DBGPRINTF("%S", m_psLName);
	if ( !SetValue(&m_psCompany, pszXml, "cn")) return false;
	if (NULL!=m_psCompany) DBGPRINTF("%S", m_psCompany);
	if ( !SetMultiValue(&m_psJTitle, pszXml, "ttls", "ttl")) return false;
	if (NULL!=m_psJTitle) DBGPRINTF("%S", m_psJTitle);
	if ( !SetMultiValue(&m_psFaxH, pszXml, "fxsh", "fxh")) return false;
	if (NULL!=m_psFaxH) DBGPRINTF("%S", m_psFaxH);
	if ( !SetMultiValue(&m_psFaxW, pszXml, "fxsw", "fxw")) return false;
	if (NULL!=m_psFaxW) DBGPRINTF("%S", m_psFaxW);
	if ( !SetMultiValue(&m_psFax, pszXml, "fxs", "fx")) return false;
	if ( !SetMultiValue(&m_psMobileH, pszXml, "mblsh", "mblh")) return false;	         
	if ( !SetMultiValue(&m_psMobileW, pszXml, "mblsb", "mblb")) return false;
	if ( !SetMultiValue(&m_psMobile, pszXml, "mbls", "mbl")) return false;
	if ( !SetMultiValue(&m_psTelephoneH, pszXml, "telsh", "telh")) return false;
	if ( !SetMultiValue(&m_psTelephoneW, pszXml, "telsb", "telb")) return false;
	if ( !SetMultiValue(&m_psTelephone, pszXml, "tels", "tel")) return false;
	if ( !SetMultiValue(&m_psEmailW, pszXml, "emlsb", "emlb")) return false;
	if ( !SetMultiValue(&m_psEmailH, pszXml, "emlsh", "emlh")) return false;
	if ( !SetMultiValue(&m_psEmail, pszXml, "emls", "eml")) return false;
	if (NULL!=m_psEmail) DBGPRINTF("%S", m_psEmail);

	return true;
}
// ================================================================================
// FUNCTION		: CSettings_OptionSelectionHandler
// DESCRIPTION	: HANDLE OPTION SFROM CSettingsMenu MENU
// ================================================================================
static void CSettings_OptionSelectionHandler(CSettings* pMe, int idOption) 
{
       
   	AECHAR* sstr=NULL;
	AECHAR* title=NULL;
    
	IROOTFORM_PopForm(pMe->rootForm);
	if(pMe->menu)
	{
		IPOPUPMENU_Release(pMe->menu);
		pMe->menu=NULL;
	}
	
	switch(pMe->selectedItem)//pMe->selectedItem
	{
	case 0:
			sstr = (AECHAR*)MALLOC(10);
			ISHELL_LoadResString(pMe->pIShell, RIPPLEVAULT_RES_FILE, IDS_NON,sstr , 10);
			title=(AECHAR*)MALLOC(20);
			ISHELL_LoadResString(pMe->pIShell, RIPPLEVAULT_RES_FILE, IDS_ROOMING,title , 20);
			pMe->isRoomimgDialog=1;
			CSettings_Dialog(pMe,sstr,title);
			FREEIF(sstr);
			FREEIF(title);
			CSettingsRadioList(pMe); 
			break;
	
	case 1:
			sstr = (AECHAR*)MALLOC(10);
			ISHELL_LoadResString(pMe->pIShell, RIPPLEVAULT_RES_FILE, IDS_NON,sstr , 10);
			title=(AECHAR*)MALLOC(20);
			ISHELL_LoadResString(pMe->pIShell, RIPPLEVAULT_RES_FILE, IDS_SHEDULER,title , 20);
			CSettings_Dialog(pMe,sstr,title);
			FREEIF(sstr);
			FREEIF(title);
			CSettingsRadioListForSheduler(pMe);			
			break;
	case 2:
		
		break;
	
	}
	

}
Example #15
0
MODULE_PRIVATE void 
pre_FreePrefetchURLStruct(PrefetchURLStruct *pus)
{
    if(pus) 
      {
        FREEIF(pus->URL_s);
        XP_FREE(pus);
      }
}
Example #16
0
static void	email_glob_destroy(email_glob_t *glob)
{
	if(glob){
		g_object_unref(glob->hds_head);
		g_object_unref(glob->hds_cont);
		g_object_unref(glob->hds_uidl);
		FREEIF(glob);
	}
}
Example #17
0
static void	audioplayer_glob_destroy(audioplayer_glob_t *glob)
{
	if(glob){
	
		g_object_unref(glob->hdb_playlist);
		g_object_unref(glob->hdb_filelist);

		FREEIF(glob);
	}
}
Example #18
0
PRIVATE void
net_ParseHTMLHelpFree(HTMLHelpParseObj * obj)
{
	XP_ASSERT(obj);

	if(!obj)
		return;

	FREEIF(obj->window_name);
	FREEIF(obj->id_value);
	FREEIF(obj->default_id_value);
	FREEIF(obj->url_to_map_file);
	FREEIF(obj->line_buffer);
	FREEIF(obj->id);

	if(obj->frame_group_stack)
	  {
		frame_set_struct * frame_group_ptr;

		while((frame_group_ptr = XP_ListRemoveTopObject(obj->frame_group_stack)) != NULL)
			net_help_free_frame_group_struct(frame_group_ptr);

		FREE(obj->frame_group_stack);
	  }

	FREE(obj);
}
void CSettings_Delete(CSettings* pMe) 
{	
	if(pMe->shedulerList)
	{
		IFORM_Release(pMe->shedulerList);
		pMe->shedulerList=NULL;
	}
	if(pMe->radioList)
	{
		IFORM_Release(pMe->radioList);
		pMe->radioList=NULL;
	}
	if(pMe->mainContainer)
	{
	IPROPCONTAINER_Release(pMe->mainContainer);
	pMe->mainContainer = NULL;
	}
	if(pMe->radioListContainer)
	{
	IXYCONTAINER_Release(pMe->radioListContainer);
	pMe->radioListContainer=NULL;
	}
	if(pMe->menu)
	{
	IPOPUPMENU_Release(pMe->menu);
	pMe->menu=NULL;
	}
	if(pMe->csettings)
	{
		IFORM_Release(pMe->csettings);
		pMe->csettings=NULL;
	}
	
	FREEIF(pMe->str1);
	FREEIF(pMe->str2);

    if(pMe)
		FREE(pMe);
}
// ================================================================================
// FUNCTION		: IsSmsMatched
// DESCRIPTION	: Check wheather the sms matched with the filtered phone number..
// ================================================================================
boolean CDbHandler::IsSmsMatched(AECHAR *pszPhoneNo, char **pFilterAr, int nNo)
{
	if ( 0==nNo ) return TRUE;

	char *pszTemp=NULL;
	int nLen= WSTRLEN(pszPhoneNo)+1;
	pszTemp = (char*)MALLOC(nLen);
	if (NULL==pszTemp) return FALSE;
	WSTRTOSTR(pszPhoneNo, pszTemp, nLen);
	
	//search the phone no in array
	for (int i=0; i<nNo; i++)
	{
		if ( 0==STRCMP(pFilterAr[i], pszTemp))
		{
			FREEIF(pszTemp);
			return TRUE;
		}
	}

	FREEIF(pszTemp);
	return FALSE;
}
Example #21
0
uint8_t mkvHeader::close(void)
{
  if(_clusters)
  {
    delete [] _clusters;
    _clusters=NULL;
  }
  // CLEANUP!!
  if(_parser) delete _parser;
  _parser=NULL;


#define FREEIF(i) { if(_tracks[i].extraData) delete [] _tracks[i].extraData; _tracks[i].extraData=0;}
  if(_isvideopresent)
  {
      FREEIF(0);
  }
  for(int i=0;i<_nbAudioTrack;i++)
  {
    FREEIF(1+i);
  }
  // Delete index
  if(_isvideopresent && _tracks[0]._index)
  {
    delete []  _tracks[0]._index;
    _tracks[0]._index=NULL;
  }
  for(int i=0;i<_nbAudioTrack;i++)
  {
    mkvIndex **dx=&(_tracks[1+i]._index);
    if(*dx)
    {
        delete []  *dx;
        *dx=NULL;
    }
  }
}
// ================================================================================
// FUNCTION		: MenuModal_EventHandler
// DESCRIPTION	: LISTEN FOR CHANGES ON MAIN FORM
// ================================================================================
static void MenuModal_EventHandler(CSettings *pMe, ModelEvent *pev) 
{
	
	if(pev->evCode == EVT_MDL_FOCUS_SELECT)
	{ 
		if(pev->dwParam == 0)
		{
			pMe->text = (AECHAR*)MALLOC(10);
			ISHELL_LoadResString(pMe->pIShell, RIPPLEVAULT_RES_FILE, IDS_NON,pMe->text , 10);
			pMe->title=(AECHAR*)MALLOC(30);
			ISHELL_LoadResString(pMe->pIShell, RIPPLEVAULT_RES_FILE, IDS_ROOMING,pMe->title , 30);
			pMe->isRoomimgDialog=1;
			CSettings_Dialog(pMe,pMe->text,pMe->title);
			FREEIF(pMe->text);
			FREEIF(pMe->title);
			CSettingsRadioList(pMe); 
			
		}
		if(pev->dwParam == 1)
		{
	
			pMe->text = (AECHAR*)MALLOC(10);
			ISHELL_LoadResString(pMe->pIShell, RIPPLEVAULT_RES_FILE, IDS_NON,pMe->text , 10);
			pMe->title=(AECHAR*)MALLOC(30);
			ISHELL_LoadResString(pMe->pIShell, RIPPLEVAULT_RES_FILE, IDS_SHEDULER,pMe->title , 20);
			CSettings_Dialog(pMe,pMe->text,pMe->title);
			FREEIF(pMe->text);
			FREEIF(pMe->title);
			CSettingsRadioListForSheduler(pMe);
		
		}
	}
	if (pev->evCode == EVT_MDL_FOCUS_CHANGE)
		pMe->selectedItem = (int)pev->dwParam;

}
Example #23
0
// this function is called when your application is exiting
void lizard_FreeAppData(lizard* pMe)
{
	IPOSITIONTHREAD_Release(pMe->pPosThread);
	FREEIF(pMe->glbVar);
	IMAINUI_Release(pMe->pMainUI);
	
    // insert your code here for freeing any resources you have allocated...

    // example to use for releasing each interface:
    // if ( pMe->pIMenuCtl != NULL )         // check for NULL first
    // {
    //    IMENUCTL_Release(pMe->pIMenuCtl)   // release the interface
    //    pMe->pIMenuCtl = NULL;             // set to NULL so no problems trying to free later
    // }
    //

}
bool Meta_SDcard_Init(SDCARD_REQ *req)
{
    int id = (int)req->dwSDHCIndex;
    char name[20];
    char *ptr;
    DIR *dp;
    struct dirent *dirp;
	META_SDCARD_LOG("ID(%d)\n",id);
    if (id < MIN_SDCARD_IDX || id > MAX_SDCARD_IDX){
		META_SDCARD_LOG("ID error(%d)\n",id);
        return false;}

    if (!path && NULL == (path = malloc(512))) {
        META_SDCARD_LOG("No memory\n");
        return false;
    }

    sprintf(name, "mmc%d", id - MIN_SDCARD_IDX);

    ptr = path;
    ptr += sprintf(ptr, "/sys/class/mmc_host/%s", name);

    if (NULL == (dp = opendir(path)))
        goto error;

    while (NULL != (dirp = readdir(dp))) {
        if (strstr(dirp->d_name, name)) {
            ptr += sprintf(ptr, "/%s", dirp->d_name);
            break;
        }
    }

    closedir(dp);

    if (!dirp)
        goto error;
	META_SDCARD_LOG("[META_SD] path found: %s/\n", path); 
    return true;

error:
    META_SDCARD_LOG("[META_SD] path not found: %s/\n", path); 

    FREEIF(path);
    return false;
}
Example #25
0
static int Config_HomePageSubmit(LCGIResp *me, char *pszURLData,
                                 AEEResBlob **ppBlob, int *pnBlobLen)
{
   int nErr;
   const char *cpszHomePage = "";
   char *pHomePageData;

   IWebUtil_GetFormFields(me->plcgie->piWebUtil, pszURLData, 
                          "homepage\0", &cpszHomePage);

   {
      int nLen = IWebUtil_GuessUrl(me->plcgie->piWebUtil,cpszHomePage, 0, 0);

      pHomePageData = (char *)MALLOC(nLen);
   
      if ((char *)0 != pHomePageData) {
         IWebUtil_GuessUrl(me->plcgie->piWebUtil,cpszHomePage,
                           pHomePageData, nLen);
         cpszHomePage = pHomePageData;
      }
   }

   nErr = Brewser_SetHomePage(me->pbsr, cpszHomePage);

   if (SUCCESS == nErr) {
      nErr = IShell_LoadResBlob(me->plcgie->piShell, BREWSER_RES_FILE, 
                                IDX_CFGHOMEPAGESUB, ppBlob, pnBlobLen);
   }

   if (SUCCESS == nErr) {
      /*
         <html>
         Home Page set to: {homepageto}<br>
         <a href="brewser:back?to=lcgi:cfg.{invoke}.menu&past=lcgi:cfg.{invoke}.">Continue</a>
         </html>
      */
      if (0 < AEEResBlob_StrRepl(ppBlob, pnBlobLen, 
                                 "homepage%Qs\0", cpszHomePage)) {
         nErr = ENOMEMORY;
      }
   }

   FREEIF(pHomePageData);
   return nErr;
}
Example #26
0
void StatusBox_Update(StatusBox *me,const char *cpszResFile, uint16 wId)
{
   me->bTextMeasured = FALSE;

   FREEIF(me->pStringData);
   /* if we're showing the text part */
   if (SUCCESS == 
       IShell_LoadResWsz(me->piShell,cpszResFile,wId, &me->pStringData)) {
      me->pwsz = me->pStringData;
   } else {
      me->pwsz = (AECHAR *)dotdotdot;
   }

   if (me->bStarted) {
      me->bActive = TRUE;
      me->pfnInvalidate(me->pInvalidateData);
   }
}
Example #27
0
/* lcgi:cfg.cooksub */
static int Config_CookiesSubmit(LCGIResp *me, char *pszURLData, 
                                AEEResBlob **ppBlob, int *pnBlobLen)
{
   int nErr;
   boolean bCookiesOn;
   const char *cpszCookiesOn = "1";
   char *pszEnabled = 0;

   // parse form fields
   IWebUtil_GetFormFields(me->plcgie->piWebUtil, pszURLData, 
                          "cookieson\0", &cpszCookiesOn);

   bCookiesOn = (0 != ATOI(cpszCookiesOn));

   nErr = Brewser_SetCookiesEnabled(me->pbsr,bCookiesOn);

   if (SUCCESS == nErr) {
      nErr = IShell_LoadResBlob(me->plcgie->piShell, BREWSER_RES_FILE, 
                                IDX_CFGCOOKSUB, ppBlob, pnBlobLen);
   }

   if (SUCCESS == nErr) {
      uint16 id = (bCookiesOn ? IDS_ENABLED : IDS_DISABLED);
      nErr = IShell_LoadResSz(me->plcgie->piShell, BREWSER_RES_FILE, 
                              id, &pszEnabled);
   }

   if (SUCCESS == nErr) {
      /* Template
         <html>
         Cookies are <b>{enab}.</b><br>
         <a href="brewser:back?to=lcgi:cfg.{invoke}.menu&past=lcgi:cfg.{invoke}.">Continue</a>
         </html>
      */
      if (0 < AEEResBlob_StrRepl(ppBlob,pnBlobLen,"enab%s\0",pszEnabled)) {
         nErr = ENOMEMORY;
      }
   }

   FREEIF(pszEnabled);
   return nErr;
}
Example #28
0
static void i51ManagedLaunchi51App(u32 param)
{
    CmnAppLaunchRspCbInfo_t tRspCb = {0};
    u32 *pSxmParam = MALLOC(sizeof(u32));
    MAE_WChar Url[128];
    int nLen = 128;
	u16 nClsId = CLSID_I51BASE;

    if (NULL != pSxmParam)
    {
        *pSxmParam = param;
        SWPRINTF(Url, nLen, L"Launch?APM_Mode=%d&ClsId=%d&VenData=%d&VenDataLen=%d&TransInId=%d&TransOutId=%d", APM_LAUNCH_NORMAL, nClsId, (u32)pSxmParam, sizeof(u32), 0, 0);
        tRspCb.pvUserData = (void *)pSxmParam;
        tRspCb.pfnLaunchListenerCb = i51ManagedAppLaunchVendorAppRspCB;
        if (MAE_RET_SUCCESS != LaunchApp(MAE_CLSID_2_SCHEMEID(nClsId), Url, &tRspCb))
        {
            FREEIF(pSxmParam);
        }
    }
}
Example #29
0
void Tooltip_Push(Tooltip *me,const char *cpszResFile, uint16 wId,
                  int nXPercent)
{
    me->nXPercent = nXPercent;

    FREEIF(me->pStringData);

    if (SUCCESS ==
            IShell_LoadResWsz(me->piShell,cpszResFile,wId,&me->pStringData)) {
        me->pwsz = me->pStringData;
    } else {
        me->pwsz = (AECHAR *)dotdotdot;
    }

    if (!me->bShown) {
        CALLBACK_Init(&me->cb,Tooltip_Show,me);
        ISHELL_SetTimerEx(me->piShell,me->ulDelay,&me->cb);
    } else {
        Tooltip_Show(me);
    }
}
Example #30
0
static int Config_HomePageResetDone(LCGIResp *me, AEEResBlob **ppBlob, int *pnBlobLen)
{
   int   nErr;
   char *pszDef = 0;

   nErr = IShell_LoadResSz(me->plcgie->piShell, BREWSER_RES_FILE, 
                           IDS_DEFHOMEPAGE, &pszDef);
   
   if (SUCCESS == nErr) {
      nErr = Brewser_SetHomePage(me->pbsr,pszDef);
   }
   
   FREEIF(pszDef);

   // load success page
   if (SUCCESS == nErr) {
      nErr = IShell_LoadResBlob(me->plcgie->piShell, BREWSER_RES_FILE, 
                                IDX_CFGHOMEPAGERESX, ppBlob, pnBlobLen);
   }

   return nErr;
}