~ubuntu-branches/ubuntu/saucy/vmware-view-open-client/saucy

« back to all changes in this revision

Viewing changes to util.hh

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2010-06-04 17:45:04 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20100604174504-zjltuc0hdp4mv7de
Tags: 4.5.0-264434+dfsg-1
* Merging upstream version 4.5.0-264434+dfsg.
* Updating date and version header in manpage.
* Rediffing doc-pdf.patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 
35
35
#include <boost/function.hpp>
36
36
#include <exception>
37
 
 
38
 
#ifndef _WIN32
 
37
#if !defined(_WIN32) || defined(__MINGW32__)
39
38
#include <glib/gi18n.h>
40
39
#endif
 
40
 
41
41
#ifdef VIEW_GTK
42
42
#include <gtk/gtkbutton.h>
43
43
#include <gtk/gtkcomboboxentry.h>
99
99
   : public std::exception
100
100
{
101
101
public:
102
 
   explicit exception(const string &msg, const string &code = "")
 
102
   explicit exception(const string &msg, const string &code = "",
 
103
                      const string &details = "")
103
104
      : mMsg(msg),
104
 
        mCode(code) {}
 
105
        mCode(code),
 
106
        mDetails(details) {}
105
107
 
106
108
   virtual ~exception() throw () {}
107
109
   virtual const char *what() const throw () { return mMsg.c_str(); }
108
110
   const string &code() const throw() { return mCode; }
 
111
   const string &details() const throw () { return mDetails; }
109
112
 
110
113
private:
111
114
   string mMsg;
112
115
   string mCode;
 
116
   string mDetails;
113
117
};
114
118
 
115
119
 
131
135
void UserWarning(const char *format, ...);
132
136
string GetUsefulPath(const string systemPath, const string relativePath);
133
137
 
134
 
 
135
 
string IDNToASCII(const string &text);
136
138
string ParseHostLabel(const string &label, unsigned short *port, bool *secure);
137
139
string GetHostLabel(const string &hostname, unsigned short port, bool secure);
138
140
 
 
141
string GetClientHostName();
139
142
ClientInfoMap GetClientInfo(const string broker, int port);
140
143
string GetMacAddr(int sock, struct sockaddr_in *addr);
141
144
ClientInfoMap GetNICInfo(const string broker, int port);
 
145
 
 
146
int Utf8Casecmp(const char *str1, const char *str2);
 
147
 
 
148
int MkdirWithParents(const char *path, int mode);
142
149
bool EnsureFilePermissions(const char *path, int mode);
143
150
 
144
 
int Utf8Casecmp (const char *str1, const char *str2);
145
 
 
146
151
/*
147
152
 *-----------------------------------------------------------------------------
148
153
 *