HTTPExampleEngine
| Mon, 2007-12-31 11:25 | |
|
|
Hi all, when i include the following files.. HTTPExampleEngine.h and in in my project for the http Handling it gives lot of errors... the file ' MHTTPAuthenticationCallback.h' can not be opened. i have included following library files..... //////////////////////////////// HTTPExampleEngine.h ////////////////////////////////////////// // INCLUDES // CONSTANTS // FORWARD DECLARATIONS // CLASS DECLARATION /** /** void GetRequestL(const TDesC& aUri); // Cancel an outstanding transaction private: // from MHTTPTransactionCallback private: void ParseUriL(const TDesC& aUri);// Convert the URI to an 8-bit descriptor private: HBufC* iResponseBuffer; MHTTPExampleEngineObserver& iObserver; #endif // #ifndef HTTPEXAMPLEENGINE_H // End of File ////////////////////////////////////// HTTPExampleEngine.cpp ////////////////////////////////////// /** // Class include // System includes // User includes // CONSTANTS // URL for POST request. // ================= MEMBER FUNCTIONS ======================= /** /** /** // Construct the form encoder /** /** // Get status code // Get status text // Inform observer CleanupStack::PopAndDestroy(statusBuf); case THTTPEvent::EGotResponseBodyData: // Convert to 16-bit descriptor // Append to iResponseBuffer // Release buf // Release the body data case THTTPEvent::EResponseComplete: /** /** // Create the transaction // Set transaction headers // Submit the request /** // Create transaction // Set transaction headers // Set the form encoder as the data supplier // Submit the request // /** /** /** Life is too short ! so do as many good things as you can do... |






Forum posts: 1058
The HTTP header files are in a subdirectory http. Did you specify that subdirectory in your include statements? It does not look that way, and that may be the problem.
An import should look like this:
#include <http\MHTTPAuthenticationCallback.h>René Brunner
Forum posts: 123
Hi rburnner,
i was a VC++ programmer but due to some reason i decided to switch myself in Symbian C++ .I want to know is it a good decesion according to the future....What is the future of Symbian C++ in comparison with VC++?
thanks...
Brajesh...
Life is too short ! so do as many good things as you can do...
Brajesh Kumar...
Beginner in Symbian C++
Forum posts: 123
The above files
HTTPExampleEngine.h and
HTTPExampleEngine.cpp
Which i have added in my project was working properly in the previous Example code "HTTPExample" .it was not needed to include like this #include .
please help...
Thanks...
Life is too short ! so do as many good things as you can do...
Brajesh Kumar...
Beginner in Symbian C++
Forum posts: 1058
I am not sure what you mean.
Anyway, for me the following error line that you posted
the file ' MHTTPAuthenticationCallback.h' can not be opened.tells me that you have an include statement somewhere for a header file 'MHTTPAuthenticationCallback.h' (a file name that is itself probably correct) that the compiler cannot find. I think the compiler cannot find it because your include statement does not specify the subdirectory 'http', as I said in my first post.
I personally tend to think that the future is what *I* make out of it. Don't ask me where more programmers will be needed in the future, for Symbian C++ or VC++, but I am sure that both will continue into the future and need programmers. So my thinking goes like this: If I am good, I will find a job, doing Symbian C++ or VC++, if I am not good, I won't have a job, whatever happens to those two systems. I try not to worry about the future in general, because I have near zero influence there, but care about *my* future that I can and should influence.
René Brunner
Forum posts: 123
Hi,
To test the correctness of the code, i created a header file and a source file in the header file i included
MHTTPAuthenticationCallback.h file and added the library file http.lib in mmp file but still following error is comming.
the file ' MHTTPAuthenticationCallback.h' can not be opened.
undefined identifier 'MHTTPTransactionCallback'
Life is too short ! so do as many good things as you can do...
Brajesh Kumar...
Beginner in Symbian C++
Forum posts: 1058
Can you please post the exact source line that you used to include that header file?
René Brunner
Forum posts: 123
i created a file a.h and a.cpp
//-----This is a.h----------------------------------//
#include <MHTTPAuthenticationCallback.h>
class A
{
public:
void Display();
};
//-----This is a.cpp----------------------------------//
void A::Display()
{
}
error is comming.
the file ' MHTTPAuthenticationCallback.h' can not be opened.
undefined identifier 'MHTTPTransactionCallback'
Life is too short ! so do as many good things as you can do...
Brajesh Kumar...
Beginner in Symbian C++
Forum posts: 1058
Thanks. Now compare your include line with the one that I gave already in my earlier post:
#include <http\MHTTPAuthenticationCallback.h>Do you see the difference? That's what I meant by giving the subdirectory in the include line.
René Brunner
Forum posts: 123
now following error is coming
ecom.h can not be opened
cauthenticationfilterinterface.h line 15
Life is too short ! so do as many good things as you can do...
Brajesh Kumar...
Beginner in Symbian C++
Forum posts: 1058
ecom.h needs "ecom\" instead of "http\", but otherwise same story...
You find the exact locations of header files in the S60 SDK documentation, mostly. Just look closely for any subdirectories given in include lines.
René Brunner
Forum posts: 123
in an another application it is decleared simply as
#include <MHTTPAuthenticationCallback.h>and it is working fine in that application...
Life is too short ! so do as many good things as you can do...
Brajesh Kumar...
Beginner in Symbian C++
Forum posts: 95
Add the path of the directory to your mmp file under "Systeminclude" path.
If the path is defined in systeminclude path of mmp file, then there is no need to specify the sub-directory.
Chao,
Raghav
Forum posts: 123
i added the path of the directory in SYSTEMINCLUDE path of mmp file but stll problem exist...
Life is too short ! so do as many good things as you can do...
Brajesh Kumar...
Beginner in Symbian C++
Forum posts: 95
The mmp file should look something like:
SYSTEMINCLUDE \epoc32\includeSYSTEMINCLUDE \epoc32\include\http
SYSTEMINCLUDE \epoc32\include\ecom
source file:
#include <MHTTPAuthenticationCallback.h>#include <ecom.h>
Make file has to be re-generated after modifying the mmp file before generating the target.
Chao,
Raghav
Forum posts: 123
Hi raghav_an,
Thank you very much for the great help....
i got the solution...
now my code is working properly....
Thank you very much...
Brajesh...
Life is too short ! so do as many good things as you can do...
Brajesh Kumar...
Beginner in Symbian C++