This file is indexed.

/usr/include/kopete/kopeteidentitymanager.h is in libkopete-dev 4:4.13.0-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
/*
    kopeteidentitymanager.h - Kopete Identity Manager

    Copyright (c) 2007      by Gustavo Pichorim Boiko <gustavo.boiko@kdemail.net>

    Kopete    (c) 2002-2007 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 __kopeteidentitymanager_h__
#define __kopeteidentitymanager_h__

#include <QtCore/QObject>

#include "kopete_export.h"
#include "kopeteonlinestatus.h"
#include "kopeteidentity.h"
#include "kopetestatusmessage.h"

namespace Kopete 
{

/**
 * IdentityManager manages all defined identities in Kopete. You can
 * query them and globally set them all online or offline from here.
 *
 * IdentityManager is a singleton, you may uses it with @ref IdentityManager::self()
 *
 * @author Gustavo Pichorim Boiko <gustavo.boiko\@kdemail.net>
 */
class KOPETE_EXPORT IdentityManager : public QObject
{
	Q_OBJECT

public:
	/**
	 * \brief Retrieve the instance of IdentityManager.
	 *
	 * The identity manager is a singleton class of which only a single
	 * instance will exist. If no manager exists yet this function will
	 * create one for you.
	 *
	 * \return the instance of the IdentityManager
	 */
	static IdentityManager* self();

	~IdentityManager();

	/**
	 * \brief Retrieve the list of identities
	 * \return a list of all the identities
	 */
	const Identity::List & identities() const;

	/**
	 * \brief Return the identity asked
	 * \param identityId is the ID for the identity
	 * \return the Identity object found or NULL if no identity was found
	 */
	Identity* findIdentity( const QString &identityId );


	/**
	 * \brief Returs the default identity to be used
	 *
	 * This is the default identity configured in kopete. If no identity was created
	 * yet, this function will create a new identity, set it as the default identity
	 * and return it.
	 * If there are identities already created, but none of them was set as the default,
	 * it will return the first identity of the list.
	 * @return the default identity
	 */
	Identity* defaultIdentity();

	/**
	 * @brief Sets a new default identity
	 *
	 * By changing the default identity, you do NOT change the accounts' identity
	 * association. They are kept as if nothing has changed
	 */
	void setDefaultIdentity(Identity *ident);
	
	/**
	 * \brief Delete the identity and clean the config data
	 *
	 * This will mostly be called when no account is assigned to an identity
	 */
	void removeIdentity( Identity *identity );

	/**
	 * @brief Register the identity.
	 *
	 * This adds the identity in the manager's identity list.
	 * It will check no identities already exist with the same ID, if any, the identity is deleted. and not added
	 *
	 * @return @p identity, or 0L if the identity was deleted because id collision
	 */
	Identity *registerIdentity( Identity *identity );

public slots:
	
	/**
	 * @brief Set all identities a status in the specified category
	 *
	 * @param category is one of the Kopete::OnlineStatusManager::Categories
	 * @param statusMessage is the new status message
	 * @param flags is a bitmask of SetOnlineStatusFlag
	 */
	void setOnlineStatus( /*Kopete::OnlineStatusManager::Categories*/ uint category,
	                      const Kopete::StatusMessage &statusMessage = Kopete::StatusMessage(), uint flags=0);

	/**
	 * \internal
	 * Save the identity data to KConfig
	 */
	void save();

	/**
	 * \internal
	 * Load the identity data from KConfig
	 */
	void load();

signals:
	/**
	 * \brief Signals when an identity is ready for use
	 */
	void identityRegistered( Kopete::Identity *identity );

	/**
	 * \brief Signals when an identity has been unregistered
	 *
	 * At this state, we are already in the Identity destructor.
	 */
	void identityUnregistered( const Kopete::Identity *identity );

	/**
	 * \brief Signals when the default identity has changed
	 */
	void defaultIdentityChanged( Kopete::Identity *identity );
	
	void identityOnlineStatusChanged( Kopete::Identity *identity );

private:
	/**
	 * Private constructor, because we're a singleton
	 */
	IdentityManager();

private slots:
	void slotIdentityOnlineStatusChanged( Kopete::Identity *i );

	/**
	 * \internal
	 * Unregister the identity.
	 */
	void unregisterIdentity( const Kopete::Identity *identity );

private:
	static IdentityManager *s_self;
	class Private;
	Private * const d;
};

} //END namespace Kopete


#endif