/usr/include/licq/icq/owner.h is in licq-dev 1.8.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | /*
* This file is part of Licq, an instant messaging client for UNIX.
* Copyright (C) 2012 Licq developers <licq-dev@googlegroups.com>
*
* Licq is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Licq is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Licq; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef LICQ_ICQ_OWNER_H
#define LICQ_ICQ_OWNER_H
#include "../contactlist/owner.h"
#include "user.h"
namespace Licq
{
/**
* An ICQ protocol account
*/
class IcqOwner : public Owner, public virtual IcqUser
{
public:
void SetWebAware(bool b) { m_bWebAware = b; save(SaveOwnerInfo); }
void SetWebAwareStatus(char c) { SetWebAware(c); }
bool WebAware() const { return m_bWebAware; }
/// Current random chat group (0=none)
unsigned randomChatGroup() const { return myRandomChatGroup; }
bool autoUpdateInfo() const { return myAutoUpdateInfo; }
bool autoUpdateInfoPlugins() const { return myAutoUpdateInfoPlugins; }
bool autoUpdateStatusPlugins() const { return myAutoUpdateStatusPlugins; }
void setAutoUpdateInfo(bool b) { myAutoUpdateInfo = b; }
void setAutoUpdateInfoPlugins(bool b) { myAutoUpdateInfoPlugins = b; }
void setAutoUpdateStatusPlugins(bool b) { myAutoUpdateStatusPlugins = b; }
bool useServerContactList() const { return myUseServerContactList; }
void setUseServerContactList(bool b) { myUseServerContactList = b; }
bool reconnectAfterUinClash() const { return myReconnectAfterUinClash; }
void setReconnectAfterUinClash(bool b) { myReconnectAfterUinClash = b; }
protected:
/// Constructor
IcqOwner(const UserId& id);
/// Destructor
virtual ~IcqOwner();
bool m_bWebAware;
unsigned myRandomChatGroup;
bool myAutoUpdateInfo;
bool myAutoUpdateInfoPlugins;
bool myAutoUpdateStatusPlugins;
bool myUseServerContactList;
bool myReconnectAfterUinClash;
};
/**
* Read mutex guard for Licq::IcqOwner
*/
class IcqOwnerReadGuard : public OwnerReadGuard
{
public:
// Derived costructors
IcqOwnerReadGuard(const UserId& userId)
: OwnerReadGuard(userId)
{ }
IcqOwnerReadGuard(const IcqOwner* owner, bool locked = false)
: OwnerReadGuard(owner, locked)
{ }
IcqOwnerReadGuard(IcqOwnerReadGuard* guard)
: OwnerReadGuard(guard)
{ }
// Access operators
const IcqOwner* operator*() const
{ return dynamic_cast<const IcqOwner*>(OwnerReadGuard::operator*()); }
const IcqOwner* operator->() const
{ return dynamic_cast<const IcqOwner*>(OwnerReadGuard::operator->()); }
};
/**
* Write mutex guard for Licq::IcqOwner
*/
class IcqOwnerWriteGuard : public OwnerWriteGuard
{
public:
// Derived costructors
IcqOwnerWriteGuard(const UserId& userId)
: OwnerWriteGuard(userId)
{ }
IcqOwnerWriteGuard(IcqOwner* owner, bool locked = false)
: OwnerWriteGuard(owner, locked)
{ }
IcqOwnerWriteGuard(IcqOwnerWriteGuard* guard)
: OwnerWriteGuard(guard)
{ }
// Access operators
IcqOwner* operator*() const
{ return dynamic_cast<IcqOwner*>(OwnerWriteGuard::operator*()); }
IcqOwner* operator->() const
{ return dynamic_cast<IcqOwner*>(OwnerWriteGuard::operator->()); }
};
} // namespace Licq
#endif
|