~ubuntu-branches/ubuntu/oneiric/notecase/oneiric

« back to all changes in this revision

Viewing changes to src/_unx/SingleInstance.h

  • Committer: Bazaar Package Importer
  • Author(s): Vijay(Vijay)
  • Date: 2007-06-14 00:13:48 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070614001348-z9e2vbgtenb9nhoo
Tags: 1.5.6-0ubuntu1
* New Upstream release 
*  The libgnomevfs2-dev is also added to Build-Depends 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
////////////////////////////////////////////////////////////////////////////
2
 
// NoteCase notes manager project <http://notecase.sf.net>
3
 
//
4
 
// This code is licensed under BSD license.See "license.txt" for more details.
5
 
//
6
 
// File: object of this class should be alive as long as program lives
7
 
//               so that instance can be detected (by using named mutex object)
8
 
////////////////////////////////////////////////////////////////////////////
9
 
 
10
 
#ifndef __SINGLEINSTANCE_H__
11
 
#define __SINGLEINSTANCE_H__
12
 
 
13
 
#include <sys/ipc.h>
14
 
#include <sys/shm.h>
15
 
 
16
 
class CSingleInstance
17
 
{
18
 
public:
19
 
        CSingleInstance(const char *szName);
20
 
        ~CSingleInstance();
21
 
 
22
 
        bool ProgramAlreadyStarted();
23
 
 
24
 
protected:
25
 
        int     m_nMem;
26
 
        bool    m_bAlreadyExists;
27
 
};
28
 
 
29
 
#endif // __SINGLEINSTANCE_H__
30
 
 
 
1
////////////////////////////////////////////////////////////////////////////
 
2
// NoteCase notes manager project <http://notecase.sf.net>
 
3
//
 
4
// This code is licensed under BSD license.See "license.txt" for more details.
 
5
//
 
6
// File: object of this class should be alive as long as program lives
 
7
//               so that instance can be detected (by using named mutex object)
 
8
////////////////////////////////////////////////////////////////////////////
 
9
 
 
10
#ifndef __SINGLEINSTANCE_H__
 
11
#define __SINGLEINSTANCE_H__
 
12
 
 
13
#include <sys/ipc.h>
 
14
#include <sys/shm.h>
 
15
 
 
16
class CSingleInstance
 
17
{
 
18
public:
 
19
        CSingleInstance(const char *szName);
 
20
        ~CSingleInstance();
 
21
 
 
22
        bool ProgramAlreadyStarted();
 
23
 
 
24
protected:
 
25
        int     m_nMem;
 
26
        bool    m_bAlreadyExists;
 
27
};
 
28
 
 
29
#endif // __SINGLEINSTANCE_H__
 
30