]>
Commit | Line | Data |
---|---|---|
ffecfa5a JS |
1 | /////////////////////////////////////////////////////////////////////////////// |
2 | // Name: palmos/snglinst.cpp | |
3 | // Purpose: implements wxSingleInstanceChecker class for Win32 using | |
4 | // named mutexes | |
5 | // Author: William Osborne | |
6 | // Modified by: | |
7 | // Created: 10/13/04 | |
8 | // RCS-ID: $Id: | |
9 | // Copyright: (c) William Osborne | |
10 | // Licence: wxWindows licence | |
11 | /////////////////////////////////////////////////////////////////////////////// | |
12 | ||
13 | // ============================================================================ | |
14 | // declarations | |
15 | // ============================================================================ | |
16 | ||
17 | // ---------------------------------------------------------------------------- | |
18 | // headers | |
19 | // ---------------------------------------------------------------------------- | |
20 | ||
21 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) | |
22 | #pragma implementation "snglinst.h" | |
23 | #endif | |
24 | ||
25 | // For compilers that support precompilation, includes "wx.h". | |
26 | #include "wx/wxprec.h" | |
27 | ||
28 | #ifdef __BORLANDC__ | |
29 | #pragma hdrstop | |
30 | #endif | |
31 | ||
32 | #if wxUSE_SNGLINST_CHECKER | |
33 | ||
34 | #ifndef WX_PRECOMP | |
35 | #include "wx/string.h" | |
36 | #include "wx/log.h" | |
37 | #endif //WX_PRECOMP | |
38 | ||
39 | #include "wx/snglinst.h" | |
40 | ||
41 | #include "wx/palmos/private.h" | |
42 | ||
43 | // ---------------------------------------------------------------------------- | |
44 | // wxSingleInstanceCheckerImpl: the real implementation class | |
45 | // ---------------------------------------------------------------------------- | |
46 | ||
47 | class WXDLLEXPORT wxSingleInstanceCheckerImpl | |
48 | { | |
49 | public: | |
50 | wxSingleInstanceCheckerImpl() | |
51 | { | |
52 | } | |
53 | ||
54 | bool Create(const wxString& name) | |
55 | { | |
56 | return false; | |
57 | } | |
58 | ||
59 | bool WasOpened() const | |
60 | { | |
61 | return false; | |
62 | } | |
63 | ||
64 | ~wxSingleInstanceCheckerImpl() | |
65 | { | |
66 | } | |
67 | ||
68 | private: | |
69 | // the result of the CreateMutex() call | |
70 | bool m_wasOpened; | |
71 | ||
72 | // the mutex handle, may be NULL | |
73 | HANDLE m_hMutex; | |
74 | ||
75 | DECLARE_NO_COPY_CLASS(wxSingleInstanceCheckerImpl) | |
76 | }; | |
77 | ||
78 | // ============================================================================ | |
79 | // wxSingleInstanceChecker implementation | |
80 | // ============================================================================ | |
81 | ||
82 | bool wxSingleInstanceChecker::Create(const wxString& name, | |
83 | const wxString& WXUNUSED(path)) | |
84 | { | |
85 | return false; | |
86 | } | |
87 | ||
88 | bool wxSingleInstanceChecker::IsAnotherRunning() const | |
89 | { | |
90 | return false; | |
91 | } | |
92 | ||
93 | wxSingleInstanceChecker::~wxSingleInstanceChecker() | |
94 | { | |
95 | } | |
96 | ||
97 | #endif // wxUSE_SNGLINST_CHECKER |