⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 httpappui.cpp

📁 简单的socket请求
💻 CPP
字号:
/*
============================================================================
 Name        : HttpAppUi.cpp
 Author      : 
 Version     :
 Copyright   : Your copyright notice
 Description : Main application UI class (controller)
============================================================================
*/

// INCLUDE FILES
#include <avkon.hrh>
#include <aknnotewrappers.h>
#include <stringloader.h>
#include <Http.rsg>
#include <f32file.h>
#include <s32file.h>

#include "Http.pan"
#include "HttpAppUi.h"
#include "HttpAppView.h"
#include "Http.hrh"

// ============================ MEMBER FUNCTIONS ===============================


// -----------------------------------------------------------------------------
// CHttpAppUi::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CHttpAppUi::ConstructL()
    {
    // Initialise app UI with standard value.
    BaseConstructL();

    // Create view object
    iAppView = CHttpAppView::NewL( ClientRect() );
    }
// -----------------------------------------------------------------------------
// CHttpAppUi::CHttpAppUi()
// C++ default constructor can NOT contain any code, that might leave.
// -----------------------------------------------------------------------------
//
CHttpAppUi::CHttpAppUi()
    {
    // No implementation required
    }

// -----------------------------------------------------------------------------
// CHttpAppUi::~CHttpAppUi()
// Destructor.
// -----------------------------------------------------------------------------
//
CHttpAppUi::~CHttpAppUi()
    {
    if ( iAppView )
        {
        delete iAppView;
        iAppView = NULL;
        }

    }

// -----------------------------------------------------------------------------
// CHttpAppUi::HandleCommandL()
// Takes care of command handling.
// -----------------------------------------------------------------------------
//
void CHttpAppUi::HandleCommandL( TInt aCommand )
    {
    switch( aCommand )
        {
        case EEikCmdExit:
        case EAknSoftkeyExit:
            Exit();
            break;
        //case EHttpCommand1:
        //    {
        //    // Load a string from the resource file and display it
        //    HBufC* textResource = StringLoader::LoadLC( R_HEWB_COMMAND1_TEXT );
        //    
        //    // Show the information Note with
        //    // textResource loaded with StringLoader.
        //    CAknInformationNote* informationNote = new ( ELeave ) CAknInformationNote;
        //    informationNote->ExecuteLD( *textResource );

        //    // Pop HBuf from CleanUpStack and Destroy it.
        //    CleanupStack::PopAndDestroy( textResource );
        //    }
        //    break;
        default:
            Panic( EHttpBasicUi );
            break;
        }
    }
// -----------------------------------------------------------------------------
//  Called by the framework when the application status pane
//  size is changed.  Passes the new client rectangle to the
//  AppView
// -----------------------------------------------------------------------------
//
void CHttpAppUi::HandleStatusPaneSizeChange()
{
	iAppView->SetRect( ClientRect() );
	
} 


// End of File

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -