×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Dec 2005
    Location
    Albacete, Spain
    Posts
    380

    Problem with descriptor

    Hello,

    I am having a newie problem with descriptors that I am not sure how to solve.

    I define a variable inside a class header file as:

    TBuf<128> serverurl;

    The variable is initilized Ok inside the ContructL() for the class.

    I want to use this variable as the first argument of method defined as:

    void IssueHTTPPostL(const TDesC8& aUri,
    const TDesC8& aContentType,
    const TDesC8& aBody);

    which I actually "borrowed" from the HTTPClientExample in this forum.

    The way I call this method inside my code is:

    iEngine->IssueHTTPPostL(serverurl, KMimeType, postdata); // ERROR LINE

    where "postdata" is also defined as a TBuf<128>, but inside the code (not in the header file).

    When I try to compile the code I get an error on the line with the iEngine->IssueHTTPPostL... saying:

    error: no matching function for call to `CHTTPEngine::IssueHTTPPostL(TBuf<128>&, const TLitC8<34>&, TDes8&)'

    The thing is that it complaints about the first argument but not about the 3rd. They both have the same types (TBuf<..>), the only difference is that the first is defined in the header file and the third inside the code (inside the function that includes the ERROR LINE).

    How can I solve this?

    BR/ Juan Noguera

  2. #2
    Registered User
    Join Date
    May 2007
    Location
    Poland
    Posts
    606

    Re: Problem with descriptor

    Hello,
    as you can see:
    Code:
    void IssueHTTPPostL(const TDesC8& aUri,
    const TDesC8& aContentType,
    const TDesC8& aBody);
    the parameter aContentType is a 8-bit descriptor so you have to pass to IssueHTTPPostL 8-bit descriptor as a first parameter.
    If you define
    Code:
    TBuf8<128> serverurl;
    instead of
    Code:
    TBuf<128> serverurl;
    it will compile

    where "postdata" is also defined as a TBuf<128>, but inside the code (not in the header file).
    Are you sure?

    good luck
    Nuker85

Similar Threads

  1. netcards - Problem with opening adapter
    By kernj in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2007-01-10, 08:56
  2. Problem: S60 SDK for CW in PC with .NET
    By anttij in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2005-02-28, 11:36
  3. About 6230 Bt Problem
    By eerkek in forum Bluetooth Technology
    Replies: 17
    Last Post: 2005-02-08, 12:33
  4. CRLF, _LIT8() and escape sequences problem?
    By nawkboy in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2003-04-03, 00:44
  5. CRLF, _LIT8() and escape sequences problem?
    By nawkboy in forum Symbian C++
    Replies: 0
    Last Post: 2003-04-03, 00:43

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •