/[projects]/smsdaemon/Util.h
ViewVC logotype

Diff of /smsdaemon/Util.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 89 by torben, Mon Jun 16 10:09:17 2008 UTC revision 185 by torben, Mon Dec 15 09:10:05 2008 UTC
# Line 9  struct timeval; Line 9  struct timeval;
9    
10  namespace Util  namespace Util
11  {  {
12            //use whitespace
13            std::vector<std::string> str_split(std::string input);
14    
15          std::vector<std::string> str_split(std::string input, std::string delimiter);          std::vector<std::string> str_split(std::string input, std::string delimiter);
16          void str_dump(const std::string& str);          void str_dump(const std::string& str);
17    
# Line 29  namespace Util Line 32  namespace Util
32    
33          std::string readUrl(std::string url, std::string tempfile);          std::string readUrl(std::string url, std::string tempfile);
34    
35            std::string iconv_wrapper(std::string _input, std::string to_format, std::string from_format);
36    
37          std::string convertToUnicode(std::string);          std::string convertToUnicode(std::string);
38          std::string convertFromUnicode(std::string);          std::string convertFromUnicode(std::string);
39    
# Line 37  namespace Util Line 42  namespace Util
42    
43          timeval GetTimeOfDay();          timeval GetTimeOfDay();
44    
45          int my_system(const char* cmd);          int my_system(const char* cmd, std::string* response = 0);
46    
47            std::string readfile(std::string filename);
48    
49          inline void Sleep(unsigned int msec)          inline void Sleep(unsigned int msec)
50          {          {
51              for (unsigned int i=0; i<msec; ++i)                  if (msec < 1000)
52                  usleep(1000);                  {
53                            usleep(1000*msec);
54                    }
55                    else
56                    {
57                    for (unsigned int i=0; i<msec; ++i)
58                            usleep(1000);
59                    }
60          }          }
61    
62  }  }

Legend:
Removed from v.89  
changed lines
  Added in v.185

  ViewVC Help
Powered by ViewVC 1.1.20