Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Removed file that shouldn't be there.
[xestiaab/.git] / source / common / dirs.cpp
1 #include <wx/wx.h>
3 wxString GetUserDir()
4 {
5     
6     wxString UserDir;
7     
8 #if defined(__HAIKU__)
9     
10     //preffilename = wxT("noo");
11     
12 #elif defined(__WIN32__)
13     
14     UserDir.Clear();
15     UserDir.Append(wxString::FromUTF8(getenv("APPDATA")));
16     UserDir.Append(wxT("\\Xestia\\Address Book\\"));
17     
18 #elif defined(__APPLE__)
19     
20     UserDir.Clear();
21     UserDir.Append(wxString::FromUTF8(getenv("HOME")));
22     UserDir.Append(wxT("/Library/Preferences/Xestia/Address Book/"));
23     
24 #else
25     
26     UserDir.Clear();
27     UserDir.Append(wxString::FromUTF8(getenv("HOME")));
28     UserDir.Append(wxT("/.xestiaab/"));
29     
30 #endif
31     
32     return UserDir;
33     
34 }
36 wxString GetUserPrefDir()
37 {
38     
39     wxString UserPrefDir;
40     
41 #if defined(__HAIKU__)
42     
43     //preffilename = wxT("noo");
44     
45 #elif defined(__WIN32__)
46     
47     UserPrefDir.Clear();
48     UserPrefDir.Append(wxString::FromUTF8(getenv("APPDATA")));
49     UserPrefDir.Append(wxT("\\Xestia\\Address Book\\preferences\\"));
50     
51 #elif defined(__APPLE__)
52     
53     UserPrefDir.Clear();
54     UserPrefDir.Append(wxString::FromUTF8(getenv("HOME")));
55     UserPrefDir.Append(wxT("/Library/Preferences/Xestia/Address Book/preferences/"));
56     
57 #else
58     
59     UserPrefDir.Clear();
60     UserPrefDir.Append(wxString::FromUTF8(getenv("HOME")));
61     UserPrefDir.Append(wxT("/.xestiaab/preferences/"));
62     
63 #endif
64     
65     return UserPrefDir;
66     
67 }
69 wxString GetRecoveryDB()
70 {
71     
72     wxString RecoveryDBFile;
73     
74 #if defined(__HAIKU__)
75     
76     //preffilename = wxT("noo");
77     
78 #elif defined(__WIN32__)
79     
80     RecoveryDBFile.Clear();
81     RecoveryDBFile.Append(wxString::FromUTF8(getenv("APPDATA")));
82     RecoveryDBFile.Append(wxT("\\Xestia\\Address Book\\recovery.db"));
83     
84 #elif defined(__APPLE__)
85     
86     RecoveryDBFile.Clear();
87     RecoveryDBFile.Append(wxString::FromUTF8(getenv("HOME")));
88     RecoveryDBFile.Append(wxT("/Library/Preferences/Xestia/Address Book/recovery.db"));
89     
90 #else
91     
92     RecoveryDBFile.Clear();
93     RecoveryDBFile.Append(wxString::FromUTF8(getenv("HOME")));
94     RecoveryDBFile.Append(wxT("/.xestiaab/.recovery.db"));
95     
96 #endif
97     
98     return RecoveryDBFile;
99     
102 wxString GetAccountDir(wxString AccName, bool ServerCert)
104     
105     wxString AccountDir;
106     
107 #if defined(__HAIKU__)
108     
109 #elif defined(__WIN32__)
110     
111     AccountDir.Clear();
112     AccountDir.Append(wxString::FromUTF8(getenv("APPDATA")));
113     AccountDir.Append(wxT("\\Xestia\\Address Book\\accounts\\"));
114     AccountDir.Append(AccName);
115     AccountDir.Append(wxT("\\"));
116     if (ServerCert == TRUE){
117         AccountDir.Append(wxT("server.crt"));
118     }
119     
120 #elif defined(__APPLE__)
121     
122     AccountDir.Clear();
123     AccountDir.Append(wxString::FromUTF8(getenv("HOME")));
124     AccountDir.Append(wxT("/Library/Preferences/Xestia/Address Book/accounts/"));
125     AccountDir.Append(AccName);
126     AccountDir.Append(wxT("/"));
127     if (ServerCert == TRUE){
128         AccountDir.Append(wxT("server.crt"));
129     }
130     
131 #else
132     
133     AccountDir.Clear();
134     AccountDir.Append(wxString::FromUTF8(getenv("HOME")));
135     AccountDir.Append(wxT("/.xestiaab/accounts/"));
136     AccountDir.Append(AccName);
137     AccountDir.Append(wxT("/"));
138     if (ServerCert == TRUE){
139         AccountDir.Append(wxT("server.crt"));
140     }
141     
142 #endif
143     
144     return AccountDir;
145     
148 wxString GetAccountsFile()
150     
151     wxString AccountsFile;
152     
153 #if defined(__HAIKU__)
154     
155 #elif defined(__WIN32__)
156     
157     AccountsFile.Clear();
158     AccountsFile.Append(wxString::FromUTF8(getenv("APPDATA")));
159     AccountsFile.Append(wxT("\\Xestia\\Address Book\\preferences\\accounts"));
160     
161 #elif defined(__WIN32__)
162     
163     AccountsFile.Clear();
164     AccountsFile.Append(wxString::FromUTF8(getenv("HOME")));
165     AccountsFile.Append(wxT("/Library/Preferences/Xestia/Address Book/preferences/accounts"));
166     
167 #else
168     
169     AccountsFile.Clear();
170     AccountsFile.Append(wxString::FromUTF8(getenv("HOME")));
171     AccountsFile.Append(wxT("/.xestiaab/preferences/accounts"));
172     
173 #endif
174     
175     return AccountsFile;
176     
179 wxString GetSettingsFile()
181     
182     wxString SettingsFile;
183     
184 #if defined(__HAIKU__)
185     
186 #elif defined(__WIN32__)
187     
188     SettingsFile.Clear();
189     SettingsFile.Append(wxString::FromUTF8(getenv("APPDATA")));
190     SettingsFile.Append(wxT("\\Xestia\\Address Book\\preferences\\settings"));
191     
192 #elif defined(__APPLE__)
193     
194     SettingsFile.Clear();
195     SettingsFile.Append(wxString::FromUTF8(getenv("HOME")));
196     SettingsFile.Append(wxT("/Library/Preferences/Xestia/Address Book/preferences/settings"));
197     
198 #else
199     
200     SettingsFile.Clear();
201     SettingsFile.Append(wxString::FromUTF8(getenv("HOME")));
202     SettingsFile.Append(wxT("/.xestiaab/preferences/settings"));
203     
204 #endif
205     
206     return SettingsFile;
207     
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy