青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

Khan's Notebook GCC/GNU/Linux Delphi/Window Java/Anywhere

路漫漫,長修遠,我們不能沒有錢
隨筆 - 173, 文章 - 0, 評論 - 257, 引用 - 0
數據加載中……

搞定symbian的http 和xml, xml采用sdk自帶的cparser

    最近弄的東西太雜了. symbian os的sdk確實不是一般的難用, 順便更正了以前寫的symbian下的支持注釋和section的ini類...
    順便發泄下. 跟人合作做東西, 如果涉及到經濟利益的話確實很麻煩. 本來這些東西都不是我來做的. 只是對方對源碼遮遮掩掩的. 而且類封裝的也很牽強.所以我才得做大量的工作...
    symbian陣營里面這些程序員對自己的源碼還是看得很重的... 很懷念linux
   
關于xml的代碼. 我記得沒錯的話, s60 2.3以后的sdk中才提供的cparser , 如果你要使用其代碼, 請確認自己的sdk是2nd fp3 或以上, 否則, 請自行查閱mozilla的xml解析包的symbian移植版本


// --------------------------------------------------------------------------
// XmlHandler.h
//
// Copyright 2007, Antony Pranata
// http://www.antonypranata.com
//
// Example how to parse XML file using SAX on Symbian OS.
//
// There are two methods to parse XML document, i.e.;
//   - StartParsingL() -> parse XML document without active object.
//     The whole file content is read at once. It is simple, but suitable
//     for relatively small file only.
//   - StartParsingWithAoL() -> parse XML document with active object.
// --------------------------------------------------------------------------

#ifndef __XMLHANDLER_H__
#define __XMLHANDLER_H__

// INCLUDE FILES
#include <e32base.h>
#include <xml\contenthandler.h> // for MContentHandler
#include <xml\parser.h> // for CParser

// CLASS DECLARATION

using namespace Xml;

/**
 * MXmlHandlerObserver, an observer to CXmlHandler class.
 */
class MXmlHandlerObserver
{
  public:
    virtual void OnParseCompleted( TInt aError ) = 0;

};

/**
 * CXmlHandler, a class to parse XML file and then output log information
 * to a buffer.
 */
class CXmlHandler: public CActive, MContentHandler
{
    enum TState
    {
        EIdle,
        EReadingFile
    };
       
  public: // Constructors and destructor
   
    static CXmlHandler* NewL( MXmlHandlerObserver& aObserver );
   
    static CXmlHandler* NewLC( MXmlHandlerObserver& aObserver );
   
    virtual ~CXmlHandler();
   
  public: // Public methods
    void StartParsingL( const TDesC8& aBody );
    void StartParsingFL( const TDesC& aFileName );
   
    void StartParsingWithAoL( const TDesC& aFileName );
   
    TPtr8 DisplayResult() { return iDisplayResult->Des(); }

  private: // Constructors

    CXmlHandler( MXmlHandlerObserver& aObserver );
   
    void ConstructL();

  private: // from CActive
   
    void DoCancel();
   
    void RunL();
   
  private: // from MContentHandler

    void OnStartDocumentL( const RDocumentParameters &aDocParam, TInt aErrorCode );
   
    void OnEndDocumentL( TInt aErrorCode );
   
    void OnStartElementL( const RTagInfo &aElement, const RAttributeArray &aAttributes, TInt aErrorCode );
       
    void OnEndElementL( const RTagInfo &aElement, TInt aErrorCode );
   
    void OnContentL( const TDesC8 &aBytes, TInt aErrorCode );
   
    void OnStartPrefixMappingL( const RString &aPrefix, const RString &aUri, TInt aErrorCode );
       
    void OnEndPrefixMappingL( const RString &aPrefix, TInt aErrorCode );
   
    void OnIgnorableWhiteSpaceL( const TDesC8 &aBytes, TInt aErrorCode );
   
    void OnSkippedEntityL( const RString &aName, TInt aErrorCode );
   
    void OnProcessingInstructionL( const TDesC8 &aTarget, const TDesC8 &aData, TInt aErrorCode);
       
    void OnError( TInt aErrorCode );
   
    TAny *GetExtendedInterface( const TInt32 aUid );
   
  private: // Private methods

    void AppendText( const TDesC8& aText );
   
    void AppendTag( const TDesC8& aTag, TBool aIsClosingTag );

  private: // Private data

    MXmlHandlerObserver& iObserver;
    CParser*             iParser;
    HBufC8*              iBuffer;
    HBufC8*              iDisplayResult;
    TState               iState;
    RFile                iFile;

};

#endif /* __XMLHANDLER_H__ */

// End of File



// --------------------------------------------------------------------------
// XmlHandler.cpp
//
// Copyright 2007, Antony Pranata
// http://www.antonypranata.com
//
// Example how to parse XML file using SAX on Symbian OS.
//
// There are two methods to parse XML document, i.e.;
//   - StartParsingL() -> parse XML document without active object.
//     The whole file content is read at once. It is simple, but suitable
//     for relatively small file only.
//   - StartParsingWithAoL() -> parse XML document with active object.
// --------------------------------------------------------------------------

// INCLUDE FILES
#include <coemain.h>
#include <f32file.h>
#include "XmlHandler.h"

// CONSTANTS
const TInt KBufferSize     = 1024; // buffer size to store the result of
                                   // XML parsing -> the actual buffer size
                                   // can expand if needed (see AppendText())
                                  
const TInt KFileBufferSize = 1024; // buffer size for file reading

const TInt KOverheadLen    = 4; // length of (KOpeningTag + KClosingTag
                                //            + KSlash + KEndOfLine)

_LIT8(KOpeningTag, "<" );
_LIT8(KClosingTag, ">" );
_LIT8(KSlash,      "/" );
//_LIT8(KEndOfLine,  "\f" ); // CEikEdwin uses '\f' as EOF mark.

_LIT8( KXmlMimeType, "text/xml" );



// METHODS DEFINITION

// --------------------------------------------------------------------------

CXmlHandler* CXmlHandler::NewL( MXmlHandlerObserver& aObserver )
{
    CXmlHandler* self = CXmlHandler::NewLC( aObserver );
    CleanupStack::Pop();
    return self;
}

// --------------------------------------------------------------------------

CXmlHandler* CXmlHandler::NewLC( MXmlHandlerObserver& aObserver )
{
    CXmlHandler* self = new ( ELeave ) CXmlHandler( aObserver );
    CleanupStack::PushL( self );
    self->ConstructL();
    return self;
}

// --------------------------------------------------------------------------

CXmlHandler::~CXmlHandler()
{
    Cancel();
    delete iParser;
    delete iDisplayResult;
    delete iBuffer;
}

// --------------------------------------------------------------------------

CXmlHandler::CXmlHandler( MXmlHandlerObserver& aObserver ):CActive( EPriorityStandard ),
    iObserver( aObserver ), iParser( 0 ), iDisplayResult( 0 ), iState( EIdle )
{
    CActiveScheduler::Add( this );
}

// --------------------------------------------------------------------------

void CXmlHandler::DoCancel()
{
    iParser->ParseEndL();
    iFile.Close();
    delete iBuffer;
    iBuffer = 0;
}

// --------------------------------------------------------------------------

void CXmlHandler::RunL()
{
    if ( KErrNone == iStatus.Int() )
    {
        // If the buffe length is zero, it means if we have reached
        // the end of the file.
        if ( iBuffer->Length() == 0)
        {
            iParser->ParseEndL();
            iFile.Close();
            delete iBuffer;
            iBuffer = 0;
        }
           
        // Otherwise, we continue reading the next chunk of the XML file.
        else
        {
            // Parse the next "part" of the XML document.
            iParser->ParseL( *iBuffer );
           
            // Read the next chunk of the file.
            TPtr8 bufferPtr( iBuffer->Des() );
            iFile.Read( bufferPtr, KFileBufferSize, iStatus );
           
            // Don't forget to call this... :)
            SetActive();
        }
    }
    else
    {
        iObserver.OnParseCompleted( iStatus.Int() );
    }
}

// --------------------------------------------------------------------------

void CXmlHandler::ConstructL()
{
    iParser = CParser::NewL( KXmlMimeType, *this );
    iDisplayResult = HBufC8::NewL( KBufferSize );
}

// --------------------------------------------------------------------------
  
  
void CXmlHandler::StartParsingL( const TDesC8& aBody )
{
    iDisplayResult->Des().Zero();
   
    delete iBuffer;
    iBuffer = 0;
    iBuffer = HBufC8::NewL( aBody.Length() );
   
    iBuffer->Des().Copy(aBody);
   
    iParser->ParseBeginL();
    iParser->ParseL( *iBuffer );
   
    iParser->ParseEndL();
}


void CXmlHandler::StartParsingFL( const TDesC& aFileName )
{
    // Read the whole content of aFileName into iBuffer.
    // IMPORTANT: This example reads the whole content within
    // one-shot for simplicity reason.
    // In reality, you have to read it chunk by chunk
    // using active object so that your application doesn't block.
    RFile file;
    User::LeaveIfError( file.Open( CCoeEnv::Static()->FsSession(), aFileName, EFileRead ) );
    CleanupClosePushL( file );
   
    iDisplayResult->Des().Zero();
    TInt size;
    User::LeaveIfError( file.Size( size ) );
    delete iBuffer;
    iBuffer = 0;
    iBuffer = HBufC8::NewL( size );
    TPtr8 bufferPtr( iBuffer->Des() );
    User::LeaveIfError( file.Read( bufferPtr ) );
   
    CleanupStack::PopAndDestroy(); // file
   
    // Now, we have the whole file content in iBuffer.
    // We are ready to parse the XML content.
    iParser->ParseBeginL();
    iParser->ParseL( *iBuffer );
   
    // Since we read the whole file contents within one-shot,
    // we can call ParseEndL() right after calling ParseL().
    iParser->ParseEndL();
}

// --------------------------------------------------------------------------
  
void CXmlHandler::StartParsingWithAoL( const TDesC& aFileName )
{
     // Remember to cancel any outstanding request first.
    if ( IsActive() )
    {
        Cancel();
    }
       
    User::LeaveIfError( iFile.Open( CCoeEnv::Static()->FsSession(), aFileName, EFileRead ) );

    // Create a buffer to store the file content.
    // Note that this method uses active object to read the file.
    // So we have to call SetActive() at the end. Then we call CParser::ParseL()
    // in RunL() method.
    iDisplayResult->Des().Zero();
    delete iBuffer;
    iBuffer = 0;
    iBuffer = HBufC8::NewL( KFileBufferSize );
    TPtr8 bufferPtr( iBuffer->Des() );
    iFile.Read( bufferPtr, KFileBufferSize, iStatus );
    SetActive();

    // Tell the parser that we are about to parse a XML document.   
    iParser->ParseBeginL();
}

// --------------------------------------------------------------------------

void CXmlHandler::OnStartDocumentL( const RDocumentParameters& /*aDocParam*/, TInt aErrorCode )
{
    _LIT8( KOnStartDocumentL, "*** OnStartDocumentL ***\f" );
    AppendText( KOnStartDocumentL );
   
    if ( KErrNone == aErrorCode )
    {
       //可以在這里解析xml頭
    }
    else
    {
        iObserver.OnParseCompleted( aErrorCode );
    }
}



// --------------------------------------------------------------------------
   
void CXmlHandler::OnEndDocumentL( TInt aErrorCode )
{
    //_LIT8( KOnEndDocumentL, "*** OnEndDocumentL ***\f" );
    //AppendText( KOnEndDocumentL );
   
    if ( KErrNone == aErrorCode )
    {
        // Do something here if needed....
    }
       
    iObserver.OnParseCompleted( aErrorCode );
}

// --------------------------------------------------------------------------

void CXmlHandler::OnStartElementL( const RTagInfo& aElement, const RAttributeArray& aAttributes, TInt aErrorCode )
{
    if ( KErrNone == aErrorCode )
    {
        // If we find the start of an element, we write to the screen,
        // for example: "<tag>"
        //AppendTag( aElement.LocalName().DesC(), EFalse );
        for(TInt i = 0; i<aAttributes.Count(); i++)
        {
            RAttribute ra = aAttributes[i];
            if( ra.Attribute().LocalName().DesC() == _L8("id") 
              || ra.Attribute().LocalName().DesC() == _L8("name") )
            {
                //AppendText(ra.Attribute().LocalName().DesC());
                AppendText(aElement.LocalName().DesC());
                AppendText(_L8(" "));
                AppendText(ra.Value().DesC());
                AppendText(_L8(" "));
            }

        }
        AppendText(_L8("\r\n"));
 
    }
    else
    {
        iObserver.OnParseCompleted( aErrorCode );
    }
}
       
// --------------------------------------------------------------------------

void CXmlHandler::OnEndElementL( const RTagInfo& /*aElement*/, TInt aErrorCode )
{
    if ( KErrNone == aErrorCode )
    {
        // If we find the end of an element, we write it to the screen,
        // for example: "</tag>"
        //AppendTag( aElement.LocalName().DesC(), ETrue );
    }
    else
    {
        iObserver.OnParseCompleted( aErrorCode );
    }
}
   
// --------------------------------------------------------------------------

void CXmlHandler::OnContentL( const TDesC8 &aBytes, TInt aErrorCode )
{
    if ( KErrNone == aErrorCode )
    {
        // Display aBytes on the screen.
        // Before we can display it, we have to convert the content
        // from TDesC8 to TDesC16.
        HBufC8* buffer = HBufC8::NewLC( aBytes.Length() + 1 );
        TPtr8 bufferPtr( buffer->Des() );
        bufferPtr.Copy( aBytes );
        bufferPtr.Trim();
        AppendText( *buffer );
        CleanupStack::PopAndDestroy(); // buffer
    }
    else
    {
        iObserver.OnParseCompleted( aErrorCode );
    }
}
   
// --------------------------------------------------------------------------

void CXmlHandler::OnStartPrefixMappingL( const RString& /*aPrefix*/, const RString& /*aUri*/, TInt aErrorCode )
{
    if ( KErrNone == aErrorCode )
    {
        // Do something here...
       
    }
    else
    {
        iObserver.OnParseCompleted( aErrorCode );
    }
}
       
// --------------------------------------------------------------------------

void CXmlHandler::OnEndPrefixMappingL( const RString& /*aPrefix*/, TInt aErrorCode )
{
    if ( KErrNone == aErrorCode )
    {
        // Do something here...
        //AppendText(aPrefix.DesC());
    }
    else
    {
        iObserver.OnParseCompleted( aErrorCode );
    }
}
   
// --------------------------------------------------------------------------

void CXmlHandler::OnIgnorableWhiteSpaceL( const TDesC8& /*aBytes*/, TInt aErrorCode )
{
    if ( KErrNone == aErrorCode )
    {
        // Do something here...
    }
    else
    {
        iObserver.OnParseCompleted( aErrorCode );
    }
}
   
// --------------------------------------------------------------------------

void CXmlHandler::OnSkippedEntityL( const RString& /*aName*/, TInt aErrorCode )
{
    if ( KErrNone == aErrorCode )
    {
        // Do something here...
    }
    else
    {
        iObserver.OnParseCompleted( aErrorCode );
    }
}

// --------------------------------------------------------------------------

void CXmlHandler::OnProcessingInstructionL( const TDesC8& /*aTarget*/, const TDesC8& /*aData*/, TInt aErrorCode )
{
    if ( KErrNone == aErrorCode )
    {
        // Do something here...
    }
    else
    {
        iObserver.OnParseCompleted( aErrorCode );
    }
}

// --------------------------------------------------------------------------

void CXmlHandler::OnError( TInt aErrorCode )
{
    //_LIT8( KErrorMessage, "*** OnError ***\f" );
    //AppendText( KErrorMessage );
    iObserver.OnParseCompleted( aErrorCode );
}

// --------------------------------------------------------------------------

TAny* CXmlHandler::GetExtendedInterface( const TInt32 /*aUid*/ )
{
    return 0;
}

// --------------------------------------------------------------------------

void CXmlHandler::AppendText( const TDesC8& aText )
{
    TPtr8 displayResultPtr( iDisplayResult->Des() );
    if ( displayResultPtr.Length() + aText.Length() > displayResultPtr.MaxLength() )
    {
        iDisplayResult = iDisplayResult->ReAllocL( displayResultPtr.MaxLength() + KBufferSize );
        displayResultPtr.Set( iDisplayResult->Des() );
    }   
    displayResultPtr.Append( aText );
}

// --------------------------------------------------------------------------

void CXmlHandler::AppendTag( const TDesC8& aTag, TBool aIsClosingTag )
{
    // Instantiate buffer to display tag information.
    HBufC8* buffer = HBufC8::NewLC( aTag.Length() + ( ( aIsClosingTag ) ? KOverheadLen : KOverheadLen - 1 ) );
    TPtr8 bufferPtr( buffer->Des() );
       
    // Convert tag name from TDesC8 to TDesC16.
    bufferPtr.Copy( aTag );
       
    // Add opening tag.
    if ( aIsClosingTag )
    {
        bufferPtr.Insert( 0, KSlash );
    }
    bufferPtr.Insert( 0, KOpeningTag );
       
    // Add closing tag.
    bufferPtr.Append( KClosingTag );
    //bufferPtr.Append( KEndOfLine );
       
    // Add to the result text and then destroy it.
    AppendText( *buffer );
    CleanupStack::PopAndDestroy(); // buffer
}

// End of File




//CHttpEngine.h



#ifndef _CHTTPENGINE_H_
#define _CHTTPENGINE_H_

#include <e32base.h>                // CBase
#include <MHTTPAuthenticationCallback.h>    // MHTTPAuthenticationCallback

#include <MHttpTransactionCallback.h>        // MHTTPTransactionCallback
#include <RHTTPSession.h>            // RHTTPSession
#include <RHTTPTransaction.h>            // RHTTPTransaction

#include <MHttpDataSupplier.h>

#include "NewCommon.h"

class CHTTPFormEncoder;

enum
{
    EMaxUrlLength = 128,
    EMaxNameLength = 32
};



//抽象的數據接口, 回調函數
class MHttpEngineObserver
{
  public:
    //返回鏈接狀態
    virtual void ResponseStatusL(TInt aStatusCode, const TDesC8& aStatusText, TNewHeader& newheader) = 0;
   
    //返回數據
    virtual void ResponseReceivedL( const TDesC8& aResponseBuffer) = 0;
    //virtual void ResponseNewStatusL()=0;
};



class CHttpEngine : public CBase, MHTTPTransactionCallback, MHTTPDataSupplier
    {
    public:
      static CHttpEngine* NewL(MHttpEngineObserver& aObserver);
      static CHttpEngine* NewLC(MHttpEngineObserver& aObserver);

        ~CHttpEngine();

        void GetRequestL(const TDesC8& aUri);
        void PostRequestL(const TDesC8& aPostUri, const TDesC8& aName);

        // Cancel an outstanding transaction
        void Cancel();

    private: // from MHTTPTransactionCallback
        virtual void MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent);
        virtual TInt MHFRunError(TInt aError, RHTTPTransaction aTransaction, const THTTPEvent& aEvent);

    private:
        CHttpEngine(MHttpEngineObserver& aObserver);
        void ConstructL();

        void ParseUriL(const TDesC8& aUri);
        void AddHeaderL(RHTTPHeaders aHeaders, TInt aHeaderField, const TDesC8& aHeaderValue);
        void AddHeaderExL(RHTTPHeaders aHeaders, const TDesC8 &aHeaderField, const TDesC8 &aHeaderValue);
        TInt GetHeaderL(RHTTPHeaders aHeaders, const TDesC8 &aHeaderField, THTTPHdrVal &aHeaderValue);
        void DumpRespHeadersL(RHTTPTransaction& aTrans);
    private://from MHTTPDataSupplier
          TBool GetNextDataPart(TPtrC8& aDataPart);
          void ReleaseData();
          TInt OverallDataSize();
          TInt Reset();
         
    private://data
        RHTTPSession          iSession;
        RHTTPTransaction      iTransaction;
        HBufC8*               iPostData;    // Data for HTTP POST
        HBufC8*               iResponseBuffer;

        CHTTPFormEncoder*     iFormEncoder;
       
        MHttpEngineObserver&  iObserver;
    };

#endif //_CHTTPENGINE_H_



//CHttpEngine.cpp


#include <chttpformencoder.h>    // CHTTPFormEncoder
#include <httpstringconstants.h>  // HTTP string table
#include <rhttpheaders.h>      // RHTTPHeaders
#include <mhttpdatasupplier.h>    // MHTTPDataSupplier

#include "CHttpEngine.h"



// CONSTANTS
// HTTP header values
_LIT8(KUserAgent, "NewEyes(1.0)");  // Name of this client app
_LIT8(KAccept, "*/*");        // Accept any (but only) text content
_LIT8(KPostParamName, "NAME");      // Name of the parameter sent in a POST request
_LIT8(KPostContentType, "text/plain");  // Content type sent in a POST request
_LIT8(KXHost,"X-Online-Host:");
_LIT8(KIP,"222.66.92.54");



CHttpEngine* CHttpEngine::NewL(MHttpEngineObserver& aObserver)
{
  CHttpEngine* self = CHttpEngine::NewLC(aObserver);
  CleanupStack::Pop(self);
  return self;
}



CHttpEngine* CHttpEngine::NewLC(MHttpEngineObserver& aObserver)
{
  CHttpEngine* self = new (ELeave) CHttpEngine(aObserver);
  CleanupStack::PushL(self);
  self->ConstructL();
  return self;
}



CHttpEngine::CHttpEngine(MHttpEngineObserver& aObserver): iObserver(aObserver)
{
}



CHttpEngine::~CHttpEngine()
{
  // Close session
  iSession.Close();  // Will also close any open transactions
  delete iResponseBuffer;
  delete iFormEncoder;
  //delete iUri;
}



void CHttpEngine::ConstructL()
{
    TRAPD( err, iSession.OpenL() );//創建會話并捕獲異常
    if( err != KErrNone ) {
        iFormEncoder = CHTTPFormEncoder::NewL();
        User::Leave( err );
    }
}






/**
* Override of pure virtual method in MHTTPTransactionCallback.
* Called to report progress by a currently outstanding transaction.
*
* @param aTransaction The transaction reporting progress
* @param aEvent The event being notified
*/
void CHttpEngine::MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent)
{
  switch (aEvent.iStatus)
  {
    case THTTPEvent::EGotResponseHeaders:
    {
      // HTTP response headers have been received. Pass status information to observer.
      RHTTPResponse resp = aTransaction.Response();

      TInt statusCode = resp.StatusCode();
     
      RHTTPHeaders headers = resp.GetHeaderCollection();

      TNewHeader aNewHeader;
     
      THTTPHdrVal aHeaderValue;
      GetHeaderL(headers, _L8("Content-Length"), aHeaderValue);
      aNewHeader._data_len = aHeaderValue.Int();
     
      GetHeaderL(headers, _L8("Text-content-length"), aHeaderValue);
     
      RStringPool strP = aTransaction.Session().StringPool();
      RStringF fieldValStr = strP.StringF(aHeaderValue.StrF());
      const TDesC8& fieldValDesC = fieldValStr.DesC();

      TLex8 iLex(fieldValDesC);
      TInt iNum2;
      iLex.Val(iNum2);
     
      aNewHeader._xml_len = iNum2;
     
      fieldValStr.Close();
      //strP.Close();
     
      // Get status text
      RStringF statusStr = resp.StatusText();

      // Inform observer 調用返回鏈接狀態的用戶接口
      iObserver.ResponseStatusL(statusCode, statusStr.DesC(), aNewHeader);
      statusStr.Close();
    }
      break;


    case THTTPEvent::EGotResponseBodyData:
    {
      //dataSupplier
      // Get text of response body
      MHTTPDataSupplier* abody = aTransaction.Response().Body();
      TPtrC8 ptr;
      TBool isLast = abody->GetNextDataPart(ptr);

      // Append to iResponseBuffer
      if (!iResponseBuffer)
      {
        iResponseBuffer = ptr.Alloc();
      }
      else
      {
        iResponseBuffer = iResponseBuffer->ReAllocL(iResponseBuffer->Length() + ptr.Length());
        iResponseBuffer->Des().Append(ptr);
      }
     
      // Release the body data
      abody->ReleaseData();
    }
      break;

    case THTTPEvent::EResponseComplete:
    {
      // Pass the response buffer by reference to the observer
      iObserver.ResponseReceivedL(*iResponseBuffer);
      if(iResponseBuffer != NULL)
      {
          delete iResponseBuffer;
          iResponseBuffer = NULL;
      }
       
    }
      break;
    case THTTPEvent::ESucceeded:
    {
    }
      break;

    case THTTPEvent::EFailed:
    {
    }
      break;

    default:
    {
      TBuf8<64> text;
      if (aEvent.iStatus < 0)
      {
        _LIT8(KErrorStr, "Error: %d");
        text.Format(KErrorStr, aEvent.iStatus);
        // Just close the transaction on errors
        aTransaction.Close();
      }
      else
      {
        // Other events are not errors (e.g. permanent and temporary redirections)
        _LIT8(KUnrecognisedEvent, "Unrecognised event: %d");
        text.Format(KUnrecognisedEvent, aEvent.iStatus);
      }
      //iObserver.DataReceived(6, text);
    }
      break;
  }
}




TInt CHttpEngine::MHFRunError(TInt aError, RHTTPTransaction /*aTransaction*/, const THTTPEvent& /*aEvent*/)
{
  return aError;
}



void CHttpEngine::GetRequestL(const TDesC8& aUri)
{
  TUriParser8 uri;
  uri.Parse(aUri);

  // Create the transaction
  iTransaction = iSession.OpenTransactionL(uri, *this, iSession.StringPool().StringF(HTTP::EGET, RHTTPSession::GetTable()));

  // Set transaction headers
  RHTTPHeaders headers = iTransaction.Request().GetHeaderCollection();
  AddHeaderL(headers, HTTP::EUserAgent, KUserAgent);
  AddHeaderL(headers, HTTP::EAccept, KAccept);
  AddHeaderExL(headers,KXHost,KIP);
  // Submit the request
  iTransaction.SubmitL();
}



void CHttpEngine::PostRequestL(const TDesC8& aPostUri, const TDesC8& aBody)
{
  // Build form encoder
  // Start by removing any previous content
  /*
  delete iFormEncoder;
  iFormEncoder = NULL;
  iFormEncoder = CHTTPFormEncoder::NewL();
  TBuf8<EMaxNameLength> buf8;
  buf8.Copy(aName);
  iFormEncoder->AddFieldL(KPostParamName, buf8);
*/
  // Create transaction
  TUriParser8 uri;
  uri.Parse(aPostUri);

 
  delete iPostData;
  iPostData = aBody.AllocL();
 
  iTransaction = iSession.OpenTransactionL(uri, *this, iSession.StringPool().StringF(HTTP::EPOST, RHTTPSession::GetTable()));

  // Set transaction headers
  RHTTPHeaders headers = iTransaction.Request().GetHeaderCollection();
  AddHeaderL(headers, HTTP::EUserAgent, KUserAgent);
  AddHeaderL(headers, HTTP::EAccept, KAccept);
  AddHeaderL(headers, HTTP::EContentType, KPostContentType);
  AddHeaderExL(headers,KXHost,KIP);

  MHTTPDataSupplier* dataSupplier = this;
  iTransaction.Request().SetBody(*dataSupplier);
  // Set the form encoder as the data supplier
  //iTransaction.Request().SetBody(*iFormEncoder);

  // Submit the request
  iTransaction.SubmitL();
}



TBool CHttpEngine::GetNextDataPart(TPtrC8& aDataPart)
{

    if(iPostData){
        aDataPart.Set(iPostData->Des());
    }
    return ETrue;
}


void CHttpEngine::ReleaseData()
{
    // It's safe to delete iPostData now.
    delete iPostData;
    iPostData = NULL;
}


TInt CHttpEngine::OverallDataSize()
{
    if(iPostData)
        return iPostData->Length();
    else
        return KErrNotFound ;
}




TInt CHttpEngine::Reset()
{
    return KErrNone;
}


TInt CHttpEngine::GetHeaderL(RHTTPHeaders aHeaders, const TDesC8 &aHeaderField, THTTPHdrVal &aHeaderValue)
{
  RStringPool string_pool = iSession.StringPool();
  RStringF contLength = string_pool.OpenFStringL(aHeaderField);
 
  TInt err = aHeaders.GetField(contLength,0,aHeaderValue);

  contLength.Close();
  return err;
}


void CHttpEngine::AddHeaderL(RHTTPHeaders aHeaders, TInt aHeaderField, const TDesC8& aHeaderValue)
{
  RStringPool stringPool = iSession.StringPool();
  RStringF valStr = stringPool.OpenFStringL(aHeaderValue);
  THTTPHdrVal headerVal(valStr);
  aHeaders.SetFieldL(stringPool.StringF(aHeaderField, RHTTPSession::GetTable()), headerVal);
  valStr.Close();
}


void CHttpEngine::AddHeaderExL(RHTTPHeaders aHeaders, const TDesC8 &aHeaderField, const TDesC8 &aHeaderValue)
{
    RStringPool stringPool = iSession.StringPool();
    RStringF valStr = stringPool.OpenFStringL(aHeaderValue);
    THTTPHdrVal headerVal(valStr);
    RStringF sHeaderField = stringPool.OpenFStringL(aHeaderField);
    aHeaders.SetFieldL(sHeaderField, headerVal);
    valStr.Close();
    sHeaderField.Close();
}

/**
* Cancel any outstanding transaction
*/
void CHttpEngine::Cancel()
{
  iTransaction.Cancel();
}







void CHttpEngine::DumpRespHeadersL(RHTTPTransaction& aTrans)
{
    TBuf<64> fieldName16;
    TBuf<128> fieldVal16;
   
    RHTTPResponse resp = aTrans.Response();
    RStringPool strP = aTrans.Session().StringPool();
    RHTTPHeaders hdr = resp.GetHeaderCollection();
    // Get an iterator for the collection of response headers
    THTTPHdrFieldIter it = hdr.Fields();
    while (it.AtEnd() == EFalse)
    {
        // Get name of next header field
        RStringTokenF fieldName = it();
        RStringF fieldNameStr = strP.StringF(fieldName);
        // Get the field value
        THTTPHdrVal fieldVal;
        if (hdr.GetField(fieldNameStr,0,fieldVal) == KErrNone)
        {
            const TDesC8& fieldNameDesC = fieldNameStr.DesC();
            fieldName16.Copy(fieldNameDesC.Left(fieldNameDesC.Length()));
            switch (fieldVal.Type())
            {
                case THTTPHdrVal::KTIntVal:
                    //Printf(_L("%S: %d\n"), &fieldName16, fieldVal.Int());
                    break;
                case THTTPHdrVal::KStrFVal:
                    {
                    RStringF fieldValStr = strP.StringF(fieldVal.StrF());
                    const TDesC8& fieldValDesC = fieldValStr.DesC();
                    fieldVal16.Copy(fieldValDesC.Left(fieldValDesC.Length()));
                    //Printf(_L("%S: %S\n"), &fieldName16, &fieldVal16);
                    }
                    break;
                case THTTPHdrVal::KStrVal:
                    {
                    RString fieldValStr = strP.String(fieldVal.Str());
                    const TDesC8& fieldValDesC = fieldValStr.DesC();
                    fieldVal16.Copy(fieldValDesC.Left(fieldValDesC.Length()));
                    //Printf(_L("%S: %S\n"), &fieldName16, &fieldVal16);
                    }
                    break;
                case THTTPHdrVal::KDateVal:
                    {
                    TDateTime date = fieldVal.DateTime();
                    TBuf<40> dateTimeString;
                    TTime t(date);
                    t.FormatL(dateTimeString,_L("%H:%T:%S on %E, %F%D-%*M-%Y"));
                    //Printf(_L("%S: %S\n"), &fieldName16, &dateTimeString);
                    }
                    break;
                default:
                    //Printf(_L("%S: <unrecognised value type>\n"), &fieldName16);
                    break;
            }
           
           
           
        }
            // Advance the iterator to get the next field
        ++it;
    }
}






調用他們的程序需要實現那些虛接口.

/* ====================================================================
 * File: NewEyesAppUi.h
 * Created: 12/14/07
 * Author: Khan.Lau
 * Copyright (c): 2007, All rights reserved
 * ==================================================================== */

#ifndef __NEWEYES_APPUI_H__
#define __NEWEYES_APPUI_H__

#include <aknappui.h>

#include "CHttpEngine.h"
#include "XmlHandler.h"


// Forward reference
class CNewEyesAppView;


class CAknNavigationDecorator;
class CAknTabGroup;
class CHttpEngine;
//class CXmlHandler;

/*!
  @class CNewEyesAppUi
 
  @discussion An instance of class CNewEyesAppUi is the UserInterface part of the AVKON
  application framework for the NewEyes example application
  */
class CNewEyesAppUi : public CAknAppUi,
                      public MHttpEngineObserver,
                      public MXmlHandlerObserver
    {
public:
    void ConstructL();

    CNewEyesAppUi();



    ~CNewEyesAppUi();


public: // from CAknAppUi
    void HandleCommandL(TInt aCommand);
   
private://CEikServAppUiBase
    TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);

private: // from MHttpEngineObserver
    virtual void ResponseStatusL(TInt aStatusCode, const TDesC8& aStatusText, TNewHeader& newheader);
    virtual void ResponseReceivedL(const TDesC8& aResponse);

   
private://MXmlHandlerObserver
    virtual void OnParseCompleted( TInt aError );

private:
    void InitNaviPane();
   
    void ConvUni2Gbk(TDesC& original, TDes8& res) ;

private:
    CNewEyesAppView* iAppView;
    CAknNavigationDecorator *iNaviDecorator;
    CAknTabGroup* iTabGroup;
   
   
    CXmlHandler* iXmlHandler;
   
    CHttpEngine* iEngine;
    TNewHeader iNewheader;
    TInt    iIndex;
    };


#endif // __NEWEYES_APPUI_H__



/* ====================================================================
 * File: NewEyesAppUi.cpp
 * Created: 12/14/07
 * Author: Khan.Lau
 * Copyright (c): 2007 All rights reserved
 * ==================================================================== */

#include <avkon.hrh>
#include <aknnotewrappers.h>

#include <aknnavi.h>               // for CAknNavigationControlContainer
#include <eikspane.h>              // for CEikStatusPane
#include <aknnavide.h>             // for CAknNavigationDecorator
#include <akntabgrp.h>             // CAknTabGroup
#include <akntitle.h>

#include <e32base.h>
//#include <utf.h>
#include <charconv.h>

#include "NewEyes.pan"
#include "NewEyesAppUi.h"
#include "NewEyesAppView.h"
#include "NewEyes.hrh"

#include "CFile.h"



const TInt KStatusCodeLength = 10;  // Enough room in a descriptor for code + ": "


// ConstructL is called by the application framework
void CNewEyesAppUi::ConstructL()
{
    BaseConstructL();
    iIndex = 0;
   
   
    iEngine = CHttpEngine::NewL(*this);
   
    iXmlHandler = CXmlHandler::NewL( *this );
   
    InitNaviPane();
   
    if(iAppView)
    {
        RemoveFromStack(iAppView);
        delete iAppView;
        iAppView = NULL;
    }
   

    TUid muid;
    muid.iUid = iIndex;
    iAppView = CNewEyesAppView::NewL(ClientRect(), muid);   
    AddToStackL(iAppView);
}



CNewEyesAppUi::CNewEyesAppUi()                             
{
    this->iNewheader._data_len = 0;
    this->iNewheader._xml_len = 0;
}



CNewEyesAppUi::~CNewEyesAppUi()
{
    delete iNaviDecorator;
    delete iXmlHandler;
    delete iEngine;
}

// handle any menu commands
void CNewEyesAppUi::HandleCommandL(TInt aCommand)
{
    switch(aCommand)
    {
        case EEikCmdExit:
        case EAknSoftkeyExit:
            Exit();
            break;

        case ENewEyesCommand1:
        {
             iEngine->GetRequestL(_L8("http://222.66.92.54:8080/cmcc/phone?c=as"));
        }
            break;

        default:
            Panic(ENewEyesBasicUi);
            break;
    }
}


void CNewEyesAppUi::InitNaviPane()
{
    CEikStatusPane* statusPane = StatusPane();

    CEikStatusPaneBase::TPaneCapabilities subPane = statusPane->PaneCapabilities(TUid::Uid(EEikStatusPaneUidNavi));


    if (subPane.IsPresent() && subPane.IsAppOwned())
    {

        CAknNavigationControlContainer* naviPane =(CAknNavigationControlContainer *) statusPane->ControlL(TUid::Uid(EEikStatusPaneUidNavi));

        delete iNaviDecorator;
        iNaviDecorator = NULL;

        iNaviDecorator = naviPane->CreateTabGroupL();

        iTabGroup = (CAknTabGroup*) iNaviDecorator->DecoratedControl();

        iTabGroup->SetTabFixedWidthL(KTabWidthWithTwoTabs);

        TInt tabId = 0;


        iTabGroup->AddTabL(tabId++, _L("aaaaaaaaa"));
        iTabGroup->AddTabL(tabId++, _L("bbbbbbbbb"));
        iTabGroup->AddTabL(tabId++, _L("ccccccccc"));
       
        iTabGroup->SetActiveTabByIndex(iIndex);
        naviPane->PushL(*iNaviDecorator);
    }
}



TKeyResponse CNewEyesAppUi::HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType){
    if(iTabGroup == NULL){
        return EKeyWasNotConsumed;
    }
    //如果按下的是左方向鍵或右方向鍵
    if(aKeyEvent.iCode==EKeyLeftArrow || aKeyEvent.iCode == EKeyRightArrow){
   
        TUid muid;
        muid.iUid = iTabGroup->ActiveTabIndex();
        if(aKeyEvent.iCode==EKeyLeftArrow)
        {
            if(muid.iUid > 0)
            {
                //ActivateLocalViewL(TUid::Uid(ViewId));
                muid.iUid--;
            }
        }
        else
        {
            if(muid.iUid < iTabGroup->TabCount() - 1)
            {
                //ActivateLocalViewL(TUid::Uid(ViewId));
                muid.iUid++;
            }
        }
       
        if(    muid.iUid != iTabGroup->ActiveTabIndex())
        {
            if(iAppView)
            {
                RemoveFromStack(iAppView);
                delete iAppView;
                iAppView = NULL;
            }
            CEikStatusPane* statusPane = StatusPane();
            CAknTitlePane* aTitlePane=(CAknTitlePane*)statusPane->ControlL(TUid::Uid(EEikStatusPaneUidTitle));
           
           
            aTitlePane->SetTextL(_L("453543634") );
            iAppView = CNewEyesAppView::NewL(ClientRect(), muid);   
            AddToStackL(iAppView);
        }
       
        return iTabGroup->OfferKeyEventL(aKeyEvent, aType);
    } else {
        return EKeyWasNotConsumed;
    }
}





void CNewEyesAppUi::ResponseStatusL(TInt aStatusCode, const TDesC8& aStatusText, TNewHeader& newheader)
{
    iNewheader._data_len = newheader._data_len;
    iNewheader._xml_len = newheader._xml_len;
   
   
    HBufC* buf = HBufC::NewLC(aStatusText.Length() + KStatusCodeLength);
    buf->Des().Format(_L("%d: %S"), aStatusCode, &aStatusText);
    CAknInformationNote* note = new (ELeave) CAknInformationNote;
    note->ExecuteLD(*buf);
    CleanupStack::PopAndDestroy(buf);
}



/**
* Callback from engine invoked when the complete response has been received.
*
* @param aResponse Text of the HTTP response
*/
void CNewEyesAppUi::ResponseReceivedL(const TDesC8& aResponse)
{

  if(iNewheader._data_len > 0 && iNewheader._xml_len < iNewheader._data_len)
  {
      HBufC8* buf8 = HBufC8::NewLC(iNewheader._xml_len);
    buf8->Des().Copy(aResponse.Left( iNewheader._xml_len));

    //CFile::LogToFile(_L("c:\\debug.txt"), (TDes8&)buf8->Des());
    buf8->Des().TrimAll();
    iXmlHandler->StartParsingL(buf8->Des());
    CleanupStack::PopAndDestroy(buf8);
  }

  iNewheader._data_len = 0;
  iNewheader._xml_len = 0;
}


void CNewEyesAppUi::OnParseCompleted( TInt aError )
    {
    if ( KErrNone == aError )
        {
        TPtr8 resultPtr( iXmlHandler->DisplayResult() );
        //iXmlHandlerp->
       
        //HBufC* buffer = HBufC::NewLC(resultPtr.Length());
        //buffer->Des().Copy(resultPtr);
        //iAppView->SetTextL( buffer->Des() );
       
        //CleanupStack::PopAndDestroy(); // buffer
        CFile::LogToFile(_L("c:\\debug.txt"), resultPtr);
        }
    else
        {
        TBuf8<50> buffer;
        buffer.Append( _L("Error: " ) );
        buffer.AppendNum( aError );
        CFile::LogToFile(_L("c:\\debug.txt"), (TDes8&)buffer);
        //iAppView->SetTextL( buffer );
        }
    }


本例中是將http發過來的文檔解析后. 存入log

mmp中需要引入的lib
LIBRARY     aknicon.lib
LIBRARY     fbscli.lib
LIBRARY     eikcoctl.lib
LIBRARY     http.lib
LIBRARY     InetProtUtil.lib    // TUriParser
LIBRARY     bafl.lib            // String pool APIs
LIBRARY     charconv.lib
LIBRARY     efsrv.lib           // Rfs
LIBRARY     xmlframework.lib


以上內容, 轉載請注明出處. 本人保留所有權利, 如果對代碼有修改, 請在版權信息中注明.

posted on 2007-12-19 14:11 Khan 閱讀(6948) 評論(13)  編輯 收藏 引用 所屬分類: GCC/G++

評論

# re: 搞定symbian的http 和xml, xml采用sdk自帶的cparser[未登錄]  回復  更多評論   

大哥,能不能換個背景色,
看著真的很壓抑
2008-01-06 15:21 | robin

# re: 搞定symbian的http 和xml, xml采用sdk自帶的cparser  回復  更多評論   

@robin
嘿嘿. 個人愛好. 你帖到editplus或者vim里面看吧
2008-04-01 10:41 | Khan's Notebook

# re: 搞定symbian的http 和xml, xml采用sdk自帶的cparser  回復  更多評論   

你好,你的文章很好,但是為什么CHttpEngine文件編譯不過,你的LIB文件我都已經包含了。
2008-05-10 16:56 | diyer

# re: 搞定symbian的http 和xml, xml采用sdk自帶的cparser  回復  更多評論   

@diyer

這個...不清楚你的編程環境.... 也不清楚你的RP.... 僅僅憑借一句編譯不過我很難解釋的哦....
代碼確定沒問題的...
2008-05-21 12:08 | 思春貼調查員

# re: 搞定symbian的http 和xml, xml采用sdk自帶的cparser  回復  更多評論   

where is "NewCommon.h"?
2008-07-04 17:51 | ouccomputer

# re: 搞定symbian的http 和xml, xml采用sdk自帶的cparser  回復  更多評論   

@ouccomputer
NewCommon.h 里沒有跟你相關的東西
2008-07-07 10:21 | Khan's Notebook

# re: 搞定symbian的http 和xml, xml采用sdk自帶的cparser  回復  更多評論   

知道了,3q~
2008-07-08 12:59 | ouccomputer

# re: 搞定symbian的http 和xml, xml采用sdk自帶的cparser  回復  更多評論   

太強悍了。。。小弟佩服佩服。。。
2008-07-26 16:37 | Airon

# re: 搞定symbian的http 和xml, xml采用sdk自帶的cparser  回復  更多評論   

使用你設計的類如果解析<a>1234</a>Xml文件,在哪個函數或方法中能取得
"1234"的值,謝謝指點,!!!!

在OnStartElementL函數中通過 aElement.LocalName().DesC()取得

tag <a> 但是怎么取得1234那???
2008-09-14 13:09 | 緣分天空

# re: 搞定symbian的http 和xml, xml采用sdk自帶的cparser  回復  更多評論   

@緣分天空
代碼實在太久了. 我不太記得了. 你自己查查sdk吧.... 我已經好久不碰symbian了
2008-09-16 10:22 | Khan's Notebook

# re: 搞定symbian的http 和xml, xml采用sdk自帶的cparser  回復  更多評論   

NewCommon.h文件里是不是這樣的啊
struct TNewHeader
{
TInt _data_len;
TInt _xml_len;
};
另外,要增加System includes,包含epoc32/include/http和epoc32/include/ecom
要不然編譯不過去啊
2008-10-22 10:31 | Youngmingxin

# re: 搞定symbian的http 和xml, xml采用sdk自帶的cparser  回復  更多評論   

大哥,mobile中的ini怎么用啊,是sdk。現成的API函數都用不了,自己封裝的老說是文件報錯說2,系統找不到指定的文件。if( (stream = fopen( lpFileName, "r" )) != NULL ) // 根據所指定的路徑和名字打開文件

mobile,vs2005中,怎么用ini呢
2008-11-24 15:58 | adler0518

# re: 搞定symbian的http 和xml, xml采用sdk自帶的cparser  回復  更多評論   

我這段代碼就是在wm5下用的
找不到指定文件就說明你路徑錯了
2008-11-27 13:55 | Khan.Lau
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            亚洲清纯自拍| 欧美乱妇高清无乱码| 久久综合久久综合九色| 亚洲欧美日韩在线观看a三区| 一本色道久久99精品综合| 99伊人成综合| 一区二区国产精品| 亚洲欧美999| 久久久久久久久久久久久9999 | 一区二区免费在线播放| 一本色道久久综合亚洲精品不| 亚洲一级片在线观看| 久久成人国产精品| 久久精视频免费在线久久完整在线看| 午夜一区不卡| 亚洲毛片一区| 一级成人国产| 香蕉久久久久久久av网站| 久久精品视频导航| 亚洲国产岛国毛片在线| 巨胸喷奶水www久久久免费动漫| 蜜臀av性久久久久蜜臀aⅴ| 亚洲精品国偷自产在线99热| 亚洲一区高清| 欧美国产日韩一区| 国产一区美女| 亚洲视频一区二区免费在线观看| 久久精品av麻豆的观看方式| 亚洲日韩视频| 久久国产日韩| 欧美三级日本三级少妇99| 国内外成人免费激情在线视频网站 | 香蕉久久精品日日躁夜夜躁| 美女图片一区二区| 国产精品美女| 日韩亚洲欧美一区| 久久在线精品| 午夜精品久久久| 欧美日韩在线精品| 亚洲国内在线| 久久久久高清| 亚洲尤物精选| 欧美午夜精品久久久久久人妖 | 夜夜夜精品看看| 欧美不卡激情三级在线观看| 亚洲欧美一区二区原创| 欧美日韩国产大片| 亚洲精品乱码久久久久久蜜桃91 | 99re66热这里只有精品4| 久久久五月婷婷| 亚洲一区二区3| 欧美亚州在线观看| 一区二区日韩| 日韩一区二区高清| 欧美精品一区二区三区很污很色的 | 国产精品久久激情| 激情成人av在线| 欧美在线中文字幕| 亚洲免费视频成人| 国产麻豆9l精品三级站| 欧美一级一区| 亚洲欧美日韩直播| 国产亚洲二区| 久久久噜噜噜久久人人看| 久久成人免费电影| 悠悠资源网久久精品| 免费观看亚洲视频大全| 久久久免费av| 最新日韩在线| 日韩视频免费在线观看| 欧美日韩亚洲国产一区| 正在播放欧美视频| 亚洲免费观看高清完整版在线观看| 欧美成人四级电影| 在线亚洲免费| 亚洲午夜精品福利| 国产精品手机在线| 久久久久国产一区二区| 久久精品国产亚洲一区二区三区| 韩国一区二区三区美女美女秀| 久久―日本道色综合久久| 久久久久高清| 日韩一区二区高清| 亚洲一区免费观看| 狠狠色综合网| 亚洲精品一区二区三区四区高清| 国产精品成人一区二区三区夜夜夜| 欧美一区二区在线观看| 久久人人97超碰国产公开结果| 亚洲精品字幕| 午夜精品理论片| 亚洲国内在线| 亚洲欧美三级伦理| 亚洲国产黄色片| 亚洲天堂黄色| 亚洲国产精品女人久久久| 一本高清dvd不卡在线观看| 国产一区二区三区av电影| 亚洲春色另类小说| 国产精品久久久久99| 噜噜噜在线观看免费视频日韩| 欧美理论在线| 久久尤物视频| 国产精品午夜电影| 亚洲激情一区二区| 国内在线观看一区二区三区| 91久久香蕉国产日韩欧美9色 | 欧美日韩久久久久久| 欧美一区二区三区日韩| 欧美成人亚洲成人| 久久夜色精品| 国产精品卡一卡二卡三| 最新高清无码专区| 亚洲大胆人体在线| 欧美在线二区| 欧美一级日韩一级| 国产精品久久99| 久久亚洲欧美| 欧美在线欧美在线| 亚洲美女免费视频| 国产真实久久| 亚洲无吗在线| 一区二区三区免费看| 久久亚洲春色中文字幕| 久久er99精品| 国产精品实拍| 中文日韩在线视频| 国产精品99久久久久久久久久久久| 久热综合在线亚洲精品| 久久米奇亚洲| 国产午夜久久| 亚洲欧美精品一区| 午夜精品久久| 国产精品久久夜| 亚洲无限av看| 久久成人久久爱| 国产欧美日韩中文字幕在线| 欧美一区二区三区视频免费| 欧美午夜精品一区| 99re这里只有精品6| 一本色道久久加勒比88综合| 欧美日韩精品一区二区在线播放 | 亚洲国产视频a| 亚洲国产视频一区| 农村妇女精品| 亚洲激情啪啪| 一本色道久久综合亚洲精品不| 欧美成人三级在线| 亚洲美女在线国产| 亚洲一区二区免费| 国产精品私人影院| 欧美在线关看| 欧美成人综合| 日韩午夜一区| 欧美色中文字幕| 亚洲欧美日韩在线综合| 欧美亚洲一区| 在线电影国产精品| 欧美激情精品| 中文在线不卡| 裸体素人女欧美日韩| 亚洲日产国产精品| 国产精品国产三级国产aⅴ浪潮| 亚洲一区国产视频| 免费在线观看精品| 亚洲一二三区在线观看| 国产人久久人人人人爽| 久久午夜激情| 一区二区三区免费看| 久久久99国产精品免费| 亚洲国产视频一区| 国产麻豆9l精品三级站| 麻豆久久精品| 亚洲欧美国产精品va在线观看| 快she精品国产999| 亚洲一区精品电影| 在线观看日韩av电影| 欧美日韩免费高清| 久久免费视频在线| 亚洲午夜精品17c| 亚洲国产精品精华液2区45 | 久久国产精品99精品国产| 美日韩丰满少妇在线观看| 一卡二卡3卡四卡高清精品视频| 国产精品视频免费观看www| 久久综合狠狠综合久久激情| 亚洲四色影视在线观看| 亚洲大胆美女视频| 久久久福利视频| 中文av一区二区| 亚洲国产精品一区二区久| 国产精品一区二区久久精品| 欧美高潮视频| 久久久久久久久一区二区| 亚洲一区二区三区乱码aⅴ| 亚洲国产导航| 美女脱光内衣内裤视频久久影院| 中文欧美字幕免费| 最新亚洲电影| 亚洲国产99精品国自产|