Changeset 62231ec0359b34f6a82b6688a7af97f2eb2ede10

Show
Ignore:
Timestamp:
08/29/10 15:19:50 (18 months ago)
Author:
Antti-Juhani Kaijanaho <antti-juhani@…>
Children:
c504199e7e127458fff243397776ee854e62b7a3
Parents:
8fab37d78032b4009b127dc2d5c06b71a627ebd5
git-committer:
Antti-Juhani Kaijanaho <antti-juhani@…> (08/29/10 15:19:50)
Message:

[msg::entity] Add a stub for get_decoded_body.

Signed-off-by: Antti-Juhani Kaijanaho <antti-juhani@…>

Location:
msg
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • msg/entity.cc

    r868b365 r62231ec  
    11/*  This file is part of Alue, the multiprotocol Internet discussion daemon 
    22 
    3     Copyright © 2009 Antti-Juhani Kaijanaho 
     3    Copyright © 2009, 2010 Antti-Juhani Kaijanaho 
    44 
    55    Alue is free software: you can redistribute it and/or modify it 
     
    239239                return rv; 
    240240        } 
     241 
     242        std::string entity::get_decoded_body() const 
     243        { 
     244                /* This here would decode content-transfer-encoding, 
     245                   but lacking realistic test cases I'm leaving this 
     246                   for later. */ 
     247                return get_body(); 
     248        } 
    241249} 
  • msg/entity.hh

    r19beb87 r62231ec  
    5353                std::string get_header() const; 
    5454                std::string get_body() const { return body; } 
     55                std::string get_decoded_body() const; 
    5556                std::string get_entity() const { 
    5657                        return get_header() + "\r\n" + get_body(); 
  • msg/text_plain.cc

    r868b365 r62231ec  
    11/*  This file is part of Alue, the multiprotocol Internet discussion daemon 
    22 
    3     Copyright © 2009 Antti-Juhani Kaijanaho 
     3    Copyright © 2009, 2010 Antti-Juhani Kaijanaho 
    44 
    55    Alue is free software: you can redistribute it and/or modify it 
     
    4646        void text_plain::init() 
    4747        { 
    48                 std::string text = get_body(); 
     48                std::string text = get_decoded_body(); 
    4949                content_type ct = get_content_type(); 
    5050                if (ct.get_type() != msg::content_type::TEXT ||