This file is indexed.

/usr/include/SampleICC/IccProfile.h is in libsampleicc-dev 1.6.4-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
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
/** @file
    File:       IccProfile.h

    Contains:   Header for implementation of the CIccProfile class.

    Version:    V1

    Copyright:  © see ICC Software License
*/

/*
 * The ICC Software License, Version 0.2
 *
 *
 * Copyright (c) 2003-2010 The International Color Consortium. All rights 
 * reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer. 
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. In the absence of prior written permission, the names "ICC" and "The
 *    International Color Consortium" must not be used to imply that the
 *    ICC organization endorses or promotes products derived from this
 *    software.
 *
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR
 * ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of the The International Color Consortium. 
 *
 *
 * Membership in the ICC is encouraged when this software is used for
 * commercial purposes. 
 *
 *  
 * For more information on The International Color Consortium, please
 * see <http://www.color.org/>.
 *  
 * 
 */

////////////////////////////////////////////////////////////////////// 
// HISTORY:
//
// -Initial implementation by Max Derhak 5-15-2003
//
//////////////////////////////////////////////////////////////////////

#if !defined(_ICCPROFILE_H)
#define _ICCPROFILE_H

#include "IccDefs.h"
#include <list>
#include <string>

#ifdef USESAMPLEICCNAMESPACE
namespace sampleICC {
#endif

class ICCPROFLIB_API CIccTag;
class ICCPROFLIB_API CIccIO;
class ICCPROFLIB_API CIccMemIO;

/**
 **************************************************************************
 * Type: Structure
 * 
 * Purpose: 
 *  This structure stores all the information of an individual tag 
 *  including the header information (tag signature, offset and size).
 **************************************************************************
 */
struct IccTagEntry
{

  icTag TagInfo;
  CIccTag* pTag;
};

/**
 **************************************************************************
 * Type: List
 * 
 * Purpose: List of all the tag entries.
 *
 **************************************************************************
 */
typedef std::list<IccTagEntry> TagEntryList;

/**
 **************************************************************************
 * Type: Structure
 * 
 * Purpose: Contains pointer to a tag.
 **************************************************************************
 */
typedef struct {CIccTag *ptr;} IccTagPtr;

/**
 **************************************************************************
 * Type: List
 * 
 * Purpose: List of pointers to the tags.
 *  
 **************************************************************************
 */
typedef std::list<IccTagPtr> TagPtrList;

typedef enum {
  icVersionBasedID,
  icAlwaysWriteID,
  icNeverWriteID,
}icProfileIDSaveMethod;

/**
 **************************************************************************
 * Type: Class
 * 
 * Purpose: 
 *  This is the base class for an ICC profile. All the operations 
 *  on a profile is done using this object.
 **************************************************************************
 */
class ICCPROFLIB_API CIccProfile  
{
public:
  CIccProfile();
  CIccProfile(const CIccProfile &Profile);
  CIccProfile &operator=(const CIccProfile &Profile);
  virtual ~CIccProfile();

  icHeader m_Header;

  TagEntryList *m_Tags;

  CIccTag* FindTag(icSignature sig);
  bool AttachTag(icSignature sig, CIccTag *pTag);
  bool DeleteTag(icSignature sig);
  CIccMemIO* GetTagIO(icSignature sig); //caller should delete returned result
	bool ReadTags(CIccProfile* pProfile); // will read in all the tags using the IO of the passed profile

  bool Attach(CIccIO *pIO);
  bool Detach();
  bool Read(CIccIO *pIO);
  icValidateStatus ReadValidate(CIccIO *pIO, std::string &sReport);
  bool Write(CIccIO *pIO, icProfileIDSaveMethod nWriteId=icVersionBasedID);

  void InitHeader();
  icValidateStatus Validate(std::string &sReport) const;

  icUInt16Number GetSpaceSamples() const;

  bool AreTagsUnique() const;
	bool IsTagPresent(icSignature sig) const { return (GetTag(sig)!=NULL); }

protected:

  void Cleanup();
  IccTagEntry* GetTag(icSignature sig) const;
  IccTagEntry* GetTag(CIccTag *pTag) const;
  bool ReadBasic(CIccIO *pIO);
  bool LoadTag(IccTagEntry *pTagEntry, CIccIO *pIO);
  bool DetachTag(CIccTag *pTag);

  // Profile Validation functions
  icValidateStatus CheckRequiredTags(std::string &sReport) const;
  bool CheckTagExclusion(std::string &sReport) const;
  icValidateStatus CheckHeader(std::string &sReport) const;
  icValidateStatus CheckTagTypes(std::string &sReport) const;
  bool IsTypeValid(icTagSignature tagSig, icTagTypeSignature typeSig) const;
  bool CheckFileSize(CIccIO *pIO) const;

  CIccIO *m_pAttachIO;

  TagPtrList *m_TagVals;
};

CIccProfile ICCPROFLIB_API *ReadIccProfile(const icChar *szFilename);
CIccProfile ICCPROFLIB_API *ReadIccProfile(const icUInt8Number *pMem, icUInt32Number nSize);
CIccProfile ICCPROFLIB_API *OpenIccProfile(const icChar *szFilename);
CIccProfile ICCPROFLIB_API *OpenIccProfile(const icUInt8Number *pMem, icUInt32Number nSize);  //pMem must be available for entire life of returned CIccProfile Object

CIccProfile ICCPROFLIB_API *ValidateIccProfile(CIccIO *pIO, std::string &sReport, icValidateStatus &nStatus);
CIccProfile ICCPROFLIB_API *ValidateIccProfile(const icChar *szFilename, std::string &sReport, icValidateStatus &nStatus);

bool ICCPROFLIB_API SaveIccProfile(const icChar *szFilename, CIccProfile *pIcc, icProfileIDSaveMethod nWriteId=icVersionBasedID);

void ICCPROFLIB_API CalcProfileID(CIccIO *pIO, icProfileID *profileID);
bool ICCPROFLIB_API CalcProfileID(const icChar *szFilename, icProfileID *profileID);

#ifdef WIN32
CIccProfile ICCPROFLIB_API *ReadIccProfile(const icWChar *szFilename);
CIccProfile ICCPROFLIB_API *OpenIccProfile(const icWChar *szFilename);
CIccProfile ICCPROFLIB_API *ValidateIccProfile(const icWChar *szFilename, std::string &sReport, icValidateStatus &nStatus);
bool ICCPROFLIB_API SaveIccProfile(const icWChar *szFilename, CIccProfile *pIcc, icProfileIDSaveMethod nWriteId=icVersionBasedID);
bool ICCPROFLIB_API CalcProfileID(const icWChar *szFilename, icProfileID *profileID);
#endif

#ifdef USESAMPLEICCNAMESPACE
} //namespace sampleICC
#endif

#endif // !defined(_ICCPROFILE_H)