LCOV - code coverage report
Current view: top level - Servidor - ChatDatabaseManager.h (source / functions) Hit Total Coverage
Test: coverage_merged.info Lines: 1 1 100.0 %
Date: 2016-07-11 17:43:33 Functions: 1 1 100.0 %

          Line data    Source code
       1             : #ifndef SOURCE_CHATDATABASEMANAGER_H
       2             : #define SOURCE_CHATDATABASEMANAGER_H
       3             : 
       4             : #define NEW_MSGS_PREFIX "NewMsgsFor_"
       5             : 
       6             : #include "DatabaseManager.h"
       7             : 
       8           4 : class ChatDatabaseManager: public DatabaseManager {
       9             : public:
      10             :         ChatDatabaseManager(rocksdb::DB *database);
      11             : 
      12             :         void saveMessage(std::string message, std::string sender,
      13             :                         std::string receiver);
      14             : 
      15             :         /*En chat history quedan de a uno por linea
      16             :          *    usernameSender,msg
      17             :          * ordenados de mas viejo a mas nuevo.*/
      18             : 
      19             :         bool getHistory(std::string sender,
      20             :                         std::string receiver, std::string& chat_history);
      21             : 
      22             :         void getNewMsgs(std::string sender,std::string receiver, std::string &newMsgs);
      23             : 
      24             : private:
      25             : 
      26             :         std::string getConversationKey(std::string sender, std::string receiver);
      27             : 
      28             :         std::string getNewMessagesKey(std::string sender, std::string receiver);
      29             : 
      30             :         void saveNewMsgs(std::string messageWithSender, std::string sender,
      31             :                         std::string receiver);
      32             : 
      33             : };
      34             : 
      35             : 
      36             : #endif //SOURCE_CHATDATABASEMANAGER_H

Generated by: LCOV version 1.12-4-g04a3c0e