WEB开发网
开发学院手机开发Symbian 开发 symbian 使用http get post方式获取网页信息 阅读

symbian 使用http get post方式获取网页信息

 2010-05-31 19:38:00 来源:WEB开发网   
核心提示:73. // CClientEngine::~CClientEngine()74. //75. // Destructor.76. // 77. CClientEngine::~CClientEngine()78. {79. iSession.Close();80. // and finally close handl

73. // CClientEngine::~CClientEngine()

74. //

75. // Destructor.

76. // ----------------------------------------------------------------------------

77. CClientEngine::~CClientEngine()

78. {

79. iSession.Close();

80. // and finally close handles

81. iConnection.Close();

82. iSocketServ.Close();

83. delete iPostData;

84. }

85.

86. // ----------------------------------------------------------------------------

87. // CClientEngine::ConstructL()

88. //

89. // Second phase construction.

90. // ----------------------------------------------------------------------------

91. void CClientEngine::ConstructL()

92. {

93. // Open RHTTPSession with default protocol ("HTTP/TCP")

94. TRAPD(err, iSession.OpenL());

95. if(err != KErrNone)

96. {

97. // Most common error; no access point configured, and session creation

98. // leaves with KErrNotFound.

99. _LIT(KErrMsg,

100. "Cannot create session. Is internet access point configured?");

101. _LIT(KExitingApp, "Exiting app.");

102. CEikonEnv::Static()- >InfoWinL(KErrMsg, KExitingApp);

103. User::Leave(err);

104. }

105. // Install this class as the callback for authentication requests. When

106. // page requires authentication the framework calls GetCredentialsL to get

107. // user name and password.

108. InstallAuthenticationL(iSession);

109. }

110.

111. // ----------------------------------------------------------------------------

112. // CClientEngine::SetHeaderL()

113. //

114. // Used to set header value to HTTP request

上一页  1 2 3 4 5 6 7 8  下一页

Tags:symbian 使用 http

编辑录入:coldstar [复制链接] [打 印]
赞助商链接