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

Diff of /smsdaemon/Util.h

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

revision 132 by torben, Sun Dec 7 00:59:05 2008 UTC revision 196 by torben, Thu Dec 18 06:53:29 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 27  namespace Util Line 30  namespace Util
30          std::string str_gsm2latin(std::string str);          std::string str_gsm2latin(std::string str);
31          std::string str_latin2gsm(std::string str);          std::string str_latin2gsm(std::string str);
32    
33          std::string readUrl(std::string url, std::string tempfile);  //  Deprecated:: use HttpClient instead
34    //      std::string readUrl(std::string url, std::string tempfile);
35    
36            std::string iconv_wrapper(std::string _input, std::string to_format, std::string from_format);
37    
38          std::string convertToUnicode(std::string);          std::string convertToUnicode(std::string);
39          std::string convertFromUnicode(std::string);          std::string convertFromUnicode(std::string);
# Line 43  namespace Util Line 49  namespace Util
49    
50          inline void Sleep(unsigned int msec)          inline void Sleep(unsigned int msec)
51          {          {
52                  if (msec < 1000)                  if (msec < 1000)
53                  {                  {
54                          usleep(1000*msec);                          usleep(1000*msec);
55                  }                  }
56                  else                  else
57                  {                  {
58                  for (unsigned int i=0; i<msec; ++i)                          for (unsigned int i=0; i<msec; ++i)
59                          usleep(1000);                                  usleep(1000);
60                  }                  }
61          }          }
62    

Legend:
Removed from v.132  
changed lines
  Added in v.196

  ViewVC Help
Powered by ViewVC 1.1.20