This file is indexed.

/usr/include/kopete/kopetestatusmanager.h is in libkopete-dev 4:15.12.3-0ubuntu1.

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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
/*
    kopetestatusmanager.h - Kopete Status Manager

    Copyright (c) 2008      by Roman Jarosz          <kedgedev@centrum.cz>
    Kopete    (c) 2008      by the Kopete developers <kopete-devel@kde.org>

    *************************************************************************
    *                                                                       *
    * This library is free software; you can redistribute it and/or         *
    * modify it under the terms of the GNU Lesser General Public            *
    * License as published by the Free Software Foundation; either          *
    * version 2 of the License, or (at your option) any later version.      *
    *                                                                       *
    *************************************************************************
*/
#ifndef KOPETESTATUSMANAGER_H
#define KOPETESTATUSMANAGER_H

#include <QtCore/QObject>

#include "kopete_export.h"
#include "kopetestatusmessage.h"

class QDomElement;

namespace Kopete {

class Account;
class OnlineStatus;

namespace Status {
	class StatusGroup;
	class StatusItem;
}

/**
 * StatusManager manages status items that are used to build status menu.
 * It also stores current status message and sets auto away status.
 *
 * StatusManager is a singleton, you may uses it with @ref StatusManager::self()
 *
 * @author Roman Jarosz <kedgedev@centrum.cz>
 */
class KOPETE_EXPORT StatusManager : public QObject
{
	Q_OBJECT
public:
	/**
	 * Get the only instance of StatusManager
	 * @return StatusManager single instance
	 */
	static StatusManager *self();

	~StatusManager();

	/**
	 * Save status data tree into XML file
	 */
	void saveXML();
	
	/**
	 * Load status data tree into XML file
	 */
	void loadXML();

	/**
	 * Set new status data tree
	 */
	void setRootGroup( Status::StatusGroup * rootGroup );
	
	/**
	 * Get current status data tree
	 */
	Status::StatusGroup *getRootGroup() const;

	/**
	 * Copy current status data tree
	 */
	Status::StatusGroup *copyRootGroup() const;

	/**
	 * Find status item for given uid
	 */
	const Status::StatusItem *itemForUid( const QString &uid ) const;

	/**
	 * Convert status item to XML structure
	 *
	 * @note it's public because it's also used for drag&drop
	 */
	static QDomElement storeStatusItem( const Status::StatusItem *item );
	
	/**
	 * Restore status item from XML structure
	 *
	 * @note it's public because it's also used for drag&drop
	 */
	static Status::StatusItem *parseStatusItem( QDomElement element );

	/**
	 * Remember current global status
	 */
	void setGlobalStatus( uint category, const Kopete::StatusMessage &statusMessage = Kopete::StatusMessage() );
	
	/**
	 * Remember current global status message
	 */
	void setGlobalStatusMessage( const Kopete::StatusMessage &statusMessage = Kopete::StatusMessage() );

	/**
	 * Get current global status message
	 */
	Kopete::StatusMessage globalStatusMessage() const;

	/**
	 * Get current global status category
	 */
	uint globalStatusCategory() const;

	/**
	 * Returns true if auto away status was set
	 */
	bool autoAway();

	/**
	 * Returns true if global away status was set
	 */
	bool globalAway();

public Q_SLOTS:
	/**
	 * Undo auto away
	 */
	void setActive();

	/**
	 * Confirm with the user, then set auto away
	 */
	void askAndSetActive();
	
	/**
	 * Set all online account to auto away status
	 */
	void setAutoAway();

Q_SIGNALS:
	/**
	 * This signal is emitted when root item of status data tree has changed.
	 */
	void changed();

	/**
	 * This signal is emitted when global status has changed.
	 */
	void globalStatusChanged();

private Q_SLOTS:
	void accountUnregistered( const Kopete::Account *account );
	void checkIdleTimer();
	void loadSettings();
	void loadBehaviorSettings();
	
private:
	StatusManager();
	void updateUidHash( Status::StatusItem *item );

	Status::StatusGroup *defaultStatuses() const;

	static StatusManager *instance;

	class Private;
	Private * const d;
};

}

#endif