This file is indexed.

/usr/include/gnucash/gncCustomer.h is in gnucash-common 1:2.6.15-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
/********************************************************************\
 * gncCustomer.h -- the Core Customer Interface                     *
 *                                                                  *
 * This program 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.              *
 *                                                                  *
 * This program 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 this program; if not, contact:                        *
 *                                                                  *
 * Free Software Foundation           Voice:  +1-617-542-5942       *
 * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
 * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
 *                                                                  *
\********************************************************************/
/** @addtogroup Business
    @{ */
/** @addtogroup Customer
    @{ */
/** @file gncCustomer.h
    @brief Core Customer Interface
    @author Copyright (C) 2001,2002 Derek Atkins <warlord@MIT.EDU>
*/

#ifndef GNC_CUSTOMER_H_
#define GNC_CUSTOMER_H_

/** @struct GncCustomer

credit, discount and shipaddr are unique to GncCustomer\n
id, name, notes, terms, addr, currency, taxtable, taxtable_override
taxincluded, active and jobs are identical to ::GncVendor.

@param	QofInstance     inst;
@param	char *          id;
@param	char *          name;
@param	char *          notes;
@param	GncBillTerm *   terms;
@param	GncAddress *    addr;
@param	gnc_commodity * currency;
@param	GncTaxTable*    taxtable;
@param	gboolean        taxtable_override;
@param	GncTaxIncluded  taxincluded;
@param	gboolean        active;
@param	GList *         jobs;
@param	gnc_numeric     credit;
@param	gnc_numeric     discount;
@param	GncAddress *    shipaddr;

*/
typedef struct _gncCustomer GncCustomer;
typedef struct _gncCustomerClass GncCustomerClass;

#include "gncAddress.h"
#include "gncBillTerm.h"
#include "gncTaxTable.h"
#include "gncJob.h"

#define GNC_ID_CUSTOMER       "gncCustomer"

/* --- type macros --- */
#define GNC_TYPE_CUSTOMER            (gnc_customer_get_type ())
#define GNC_CUSTOMER(o)              \
     (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_CUSTOMER, GncCustomer))
#define GNC_CUSTOMER_CLASS(k)        \
     (G_TYPE_CHECK_CLASS_CAST((k), GNC_TYPE_CUSTOMER, GncCustomerClass))
#define GNC_IS_CUSTOMER(o)           \
     (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_CUSTOMER))
#define GNC_IS_CUSTOMER_CLASS(k)     \
     (G_TYPE_CHECK_CLASS_TYPE ((k), GNC_TYPE_CUSTOMER))
#define GNC_CUSTOMER_GET_CLASS(o)    \
     (G_TYPE_INSTANCE_GET_CLASS ((o), GNC_TYPE_CUSTOMER, GncCustomerClass))
GType gnc_customer_get_type(void);

/** @name Create/Destroy Functions
 @{ */
GncCustomer *gncCustomerCreate (QofBook *book);
void gncCustomerDestroy (GncCustomer *customer);
void gncCustomerBeginEdit (GncCustomer *customer);
void gncCustomerCommitEdit (GncCustomer *customer);
/** @} */

/** @name Set Functions
 @{ */

void gncCustomerSetID (GncCustomer *customer, const char *id);
void gncCustomerSetName (GncCustomer *customer, const char *name);
void gncCustomerSetNotes (GncCustomer *customer, const char *notes);
void gncCustomerSetTerms (GncCustomer *customer, GncBillTerm *term);
void gncCustomerSetTaxIncluded (GncCustomer *customer, GncTaxIncluded taxincl);
void gncCustomerSetActive (GncCustomer *customer, gboolean active);
void gncCustomerSetDiscount (GncCustomer *customer, gnc_numeric discount);
void gncCustomerSetCredit (GncCustomer *customer, gnc_numeric credit);
void gncCustomerSetCurrency (GncCustomer *customer, gnc_commodity *currency);

void gncCustomerSetTaxTableOverride (GncCustomer *customer, gboolean override);
void gncCustomerSetTaxTable (GncCustomer *customer, GncTaxTable *table);

void gncCustomerAddJob (GncCustomer *customer, GncJob *job);
void gncCustomerRemoveJob (GncCustomer *customer, GncJob *job);

/** @} */

/** @name Get Functions
 @{ */
/** Return a pointer to the instance gncCustomer that is identified
 *  by the guid, and is residing in the book. Returns NULL if the
 *  instance can't be found.
 *  Equivalent function prototype is
 *  GncCustomer * gncCustomerLookup (QofBook *book, const GncGUID *guid);
 */
static inline GncCustomer * gncCustomerLookup (const QofBook *book, const GncGUID *guid)
{
    QOF_BOOK_RETURN_ENTITY(book, guid, GNC_ID_CUSTOMER, GncCustomer);
}

const char * gncCustomerGetID (const GncCustomer *customer);
const char * gncCustomerGetName (const GncCustomer *customer);
GncAddress * gncCustomerGetAddr (const GncCustomer *customer);
GncAddress * gncCustomerGetShipAddr (const GncCustomer *customer);
const char * gncCustomerGetNotes (const GncCustomer *customer);
GncBillTerm * gncCustomerGetTerms (const GncCustomer *customer);
GncTaxIncluded gncCustomerGetTaxIncluded (const GncCustomer *customer);
gboolean gncCustomerGetActive (const GncCustomer *customer);
gnc_numeric gncCustomerGetDiscount (const GncCustomer *customer);
gnc_numeric gncCustomerGetCredit (const GncCustomer *customer);
gnc_commodity * gncCustomerGetCurrency (const GncCustomer *customer);

gboolean gncCustomerGetTaxTableOverride (const GncCustomer *customer);
GncTaxTable* gncCustomerGetTaxTable (const GncCustomer *customer);

/** @} */

int gncCustomerCompare (const GncCustomer *a, const GncCustomer *b);

#define CUSTOMER_ID         "id"
#define CUSTOMER_NAME       "name"
#define CUSTOMER_ADDR       "addr"
#define CUSTOMER_SHIPADDR   "shipaddr"
#define CUSTOMER_NOTES      "notes"
#define CUSTOMER_DISCOUNT   "amount of discount"
#define CUSTOMER_CREDIT     "amount of credit"
#define CUSTOMER_TT_OVER    "tax table override"
#define CUSTOMER_TAX_INC    "customer_tax_included"
#define CUSTOMER_TERMS      "customer_terms"
#define CUSTOMER_ACTIVE     "customer_is_active"
#define CUSTOMER_SLOTS      "customer_values"

/** @deprecated functions, should be removed */
#define gncCustomerGetGUID(x) qof_instance_get_guid(QOF_INSTANCE(x))
#define gncCustomerRetGUID(x) (x ? *(qof_instance_get_guid(QOF_INSTANCE(x))) : *(guid_null()))
#define gncCustomerGetBook(x) qof_instance_get_book(QOF_INSTANCE(x))
#define gncCustomerLookupDirect(g,b) gncCustomerLookup((b), &(g))

/** Test support function, used in gets-dbi-business-stuff.c */
gboolean gncCustomerEqual(const GncCustomer *a, const GncCustomer *b);

GList * gncCustomerGetJoblist (const GncCustomer *customer, gboolean show_all);
gboolean gncCustomerIsDirty (GncCustomer *customer);

#endif /* GNC_CUSTOMER_H_ */
/** @} */
/** @} */