test/test_util.h
author Krista Bennett <krista@pep-project.org>
Fri, 19 Jan 2018 14:12:02 +0100
changeset 2418 05678e77bc6a
parent 2282 eed4a7047201
child 2444 a97dd32908e5
permissions -rw-r--r--
fixed update_identity call that could be called on a myself value in outgoing_message_rating
     1 #include <string>
     2 #include "pEpEngine.h"
     3 #include "message_api.h"
     4 
     5 // reads a whole file and returns it as std::string
     6 // throws std::runtime_error() if the file cannot be read. Empty file is not an error.
     7 std::string slurp(const std::string& filename);
     8 
     9 // dumps char* to file
    10 // throws std::runtime_error() if the file cannot be opened.
    11 void dump_out(const char* filename, const char* outdata);
    12 
    13 // Returns the string value of the input rating enum value. 
    14 const char* tl_rating_string(PEP_rating rating);
    15 
    16 // Returns the string value of the input comm_type enum value. 
    17 const char* tl_ct_string(PEP_comm_type ct);
    18 
    19 // Returns the string value of the input status enum value. 
    20 const char* tl_status_string(PEP_STATUS status);