// -----------------------------------------------------------------------------
// CClientInstallerApplication::CreateDocumentL()
// Creates CApaDocument object
// -----------------------------------------------------------------------------
//
CApaDocument* CClientInstallerApplication::CreateDocumentL()
    {

    TBuf<256> str;

    _LIT(KFilePrefix,"FILE:");

  	_LIT(KCDrive,"C:");

  	_LIT(Kcheck, "\\system\\apps\\ClientInstaller\\welcome.html");

    // Construct the check for the C drive

    str.Copy(KCDrive);
    str.Append(Kcheck);
    if ( FileExists(str) ) {

		// The specified file exists, so start the browser to view it.
		str.Copy(KFilePrefix);
		str.Append(KCDrive);
		str.Append(Kcheck);
  		StartBrowser(str);
    }


    // Create an ClientInstaller document, and return a pointer to it
    return (static_cast<CApaDocument*>
                    ( CClientInstallerDocument::NewL( *this ) ) );
    }
Example #2
0
//----------------------------
void OpenWebBrowser(C_application_base &app, const char *url){

#ifdef __SYMBIAN_3RD__
   /*
   RApaLsSession ls;
   if(!ls.Connect()){
      bool is_https = false;
      if(text_utils::CheckStringBegin(url, text_utils::HTTPS_PREFIX))
         is_https = true;
      else
         text_utils::CheckStringBegin(url, text_utils::HTTP_PREFIX);
      Cstr_w par;
      par.Format(L"4 %#%") <<(!is_https ? text_utils::HTTP_PREFIX : text_utils::HTTPS_PREFIX) <<url;

      TDataType mimeDatatype(_L8("application/x-web-browse"));
      TUid handlerUID;
      ls.AppForDataType(mimeDatatype, handlerUID);
      //Fatal("id", handlerUID.iUid);
      if(!handlerUID.iUid)
         handlerUID = TUid::Uid(0x1020724d);
      text_utils::CheckStringBegin(url, text_utils::HTTP_PREFIX) ||
         text_utils::CheckStringBegin(url, text_utils::HTTPS_PREFIX);

      LaunchBrowserL(TPtrC((word*)(const wchar*)par, par.Length()), handlerUID);
      ls.Close();
      return;
   }
   */
   RApaLsSession ls;
   if(!ls.Connect()){
      TUid hid;
      ls.AppForDataType(_L8("application/x-web-browse"), hid);
      ls.Close();
      //Fatal("uid", hid.iUid);
      if(hid.iUid){
         if(StartBrowser(hid.iUid, url))
            return;
      }
   }

                              //try 'Web' browser
   if(StartBrowser(0x1020724d, url))
      return;
#endif
                              //use 'Services'
   StartBrowser(0x10008d39, url);
}
Example #3
0
// -----------------------------------------------------------------------------
// CFilelistAppUi::ConstructL()
// Symbian two phased constructor
// -----------------------------------------------------------------------------
//
void CFilelistAppUi::ConstructL()
    {
    BaseConstructL( CAknAppUi::EAknEnableSkin );
        
    StartBrowser();
	
	Exit();	
    //iAppContainer = CFilelistContainer::NewL( ClientRect() );
    //AddToStackL( iAppContainer );
    }