]>
Commit | Line | Data |
---|---|---|
1 | /////////////////////////////////////////////////////////////////////////////// | |
2 | // Name: src/palmos/snglinst.cpp | |
3 | // Purpose: implements wxSingleInstanceChecker class for Win32 using | |
4 | // named mutexes | |
5 | // Author: William Osborne - minimal working wxPalmOS port | |
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 | // For compilers that support precompilation, includes "wx.h". | |
22 | #include "wx/wxprec.h" | |
23 | ||
24 | #ifdef __BORLANDC__ | |
25 | #pragma hdrstop | |
26 | #endif | |
27 | ||
28 | #if wxUSE_SNGLINST_CHECKER | |
29 | ||
30 | #ifndef WX_PRECOMP | |
31 | #include "wx/string.h" | |
32 | #include "wx/log.h" | |
33 | #endif //WX_PRECOMP | |
34 | ||
35 | #include "wx/snglinst.h" | |
36 | ||
37 | #include "wx/palmos/private.h" | |
38 | ||
39 | // ---------------------------------------------------------------------------- | |
40 | // wxSingleInstanceCheckerImpl: the real implementation class | |
41 | // ---------------------------------------------------------------------------- | |
42 | ||
43 | class WXDLLEXPORT wxSingleInstanceCheckerImpl | |
44 | { | |
45 | public: | |
46 | wxSingleInstanceCheckerImpl() | |
47 | { | |
48 | } | |
49 | ||
50 | bool Create(const wxString& name) | |
51 | { | |
52 | return false; | |
53 | } | |
54 | ||
55 | bool WasOpened() const | |
56 | { | |
57 | return false; | |
58 | } | |
59 | ||
60 | ~wxSingleInstanceCheckerImpl() | |
61 | { | |
62 | } | |
63 | ||
64 | private: | |
65 | // the result of the CreateMutex() call | |
66 | bool m_wasOpened; | |
67 | ||
68 | // the mutex handle, may be NULL | |
69 | HANDLE m_hMutex; | |
70 | ||
71 | wxDECLARE_NO_COPY_CLASS(wxSingleInstanceCheckerImpl); | |
72 | }; | |
73 | ||
74 | // ============================================================================ | |
75 | // wxSingleInstanceChecker implementation | |
76 | // ============================================================================ | |
77 | ||
78 | bool wxSingleInstanceChecker::Create(const wxString& name, | |
79 | const wxString& WXUNUSED(path)) | |
80 | { | |
81 | return false; | |
82 | } | |
83 | ||
84 | bool wxSingleInstanceChecker::IsAnotherRunning() const | |
85 | { | |
86 | return false; | |
87 | } | |
88 | ||
89 | wxSingleInstanceChecker::~wxSingleInstanceChecker() | |
90 | { | |
91 | } | |
92 | ||
93 | #endif // wxUSE_SNGLINST_CHECKER |