This file is indexed.

/usr/include/unique-1.0/unique/uniqueapp.h is in libunique-dev 1.1.6-4ubuntu2.

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
/* Unique - Single Instance Backendlication library
 * uniqueapp.h: Base class for single instance applications
 *
 * Copyright (C) 2007  Emmanuele Bassi  <ebassi@o-hand.com>
 *
 * 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.1 of the License, or (at your option) any later version.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA
 */

#ifndef __UNIQUE_APP_H__
#define __UNIQUE_APP_H__

#include <glib-object.h>
#include <unique/uniquemessage.h>
#include <gtk/gtk.h>

G_BEGIN_DECLS

#define UNIQUE_TYPE_APP                 (unique_app_get_type ())
#define UNIQUE_APP(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNIQUE_TYPE_APP, UniqueApp))
#define UNIQUE_IS_APP(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNIQUE_TYPE_APP))
#define UNIQUE_APP_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass), UNIQUE_TYPE_APP, UniqueAppClass))
#define UNIQUE_IS_APP_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass), UNIQUE_TYPE_APP))
#define UNIQUE_APP_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj), UNIQUE_TYPE_APP, UniqueAppClass))

/**
 * UniqueCommand:
 * @UNIQUE_INVALID: used internally
 * @UNIQUE_ACTIVATE: request to activate a currently active instance; this
 *   usually means calling gtk_window_present() on the application window.
 * @UNIQUE_NEW: request to create a new file.
 * @UNIQUE_OPEN: request to open a file.
 * @UNIQUE_CLOSE: requests to close the currently running instance.
 *
 * Command to send to a currently active instance. User defined commands
 * should be positive integers, and should be added using the
 * unique_app_add_command() function after creating a #UniqueApp instance
 */
typedef enum { /*< prefix=UNIQUE >*/
  UNIQUE_INVALID  = 0,
  UNIQUE_ACTIVATE = -1,
  UNIQUE_NEW      = -2,
  UNIQUE_OPEN     = -3,
  UNIQUE_CLOSE    = -4
} UniqueCommand;

/**
 * UniqueResponse:
 * @UNIQUE_RESPONSE_INVALID: Internal error code, should never be used.
 * @UNIQUE_RESPONSE_OK: The command was successfully executed.
 * @UNIQUE_RESPONSE_CANCEL: The command was cancelled by the user.
 * @UNIQUE_RESPONSE_FAIL: The command failed due to a IPC failure.
 * @UNIQUE_RESPONSE_PASSTHROUGH: The command was not handled
 *
 * Response that a currently active instance of the application should
 * return to the caller which sent a command.
 */
typedef enum { /*< prefix=UNIQUE_RESPONSE >*/
  UNIQUE_RESPONSE_INVALID = 0,
  UNIQUE_RESPONSE_OK,
  UNIQUE_RESPONSE_CANCEL,
  UNIQUE_RESPONSE_FAIL,
  UNIQUE_RESPONSE_PASSTHROUGH
} UniqueResponse;

typedef struct _UniqueApp               UniqueApp;
typedef struct _UniqueAppPrivate        UniqueAppPrivate;
typedef struct _UniqueAppClass          UniqueAppClass;

/**
 * UniqueApp:
 *
 * The base class for every single instance application. The #UniqueApp
 * structure contains only private data and should be manipulated only
 * with the provided functions.
 */
struct _UniqueApp
{
  /*< private >*/
  GObject parent_instance;

  UniqueAppPrivate *priv;
};

/**
 * UniqueAppClass:
 * @message_received: Signal class closure for the UniqueApp::message_received
 *   signal.
 *
 * Base class for every single instance application.
 */
struct _UniqueAppClass
{
  /*< private >*/
  GObjectClass parent_class;

  /*< public >*/
  UniqueResponse (* message_received) (UniqueApp         *app,
                                       gint               command,
                                       UniqueMessageData *message_data,
                                       guint              time_);
  
  /*< private >*/
  /* padding */
  void (*_unique_reserved1) (void);
  void (*_unique_reserved2) (void);
  void (*_unique_reserved3) (void);
  void (*_unique_reserved4) (void);
};

GType          unique_app_get_type            (void) G_GNUC_CONST;

UniqueApp *    unique_app_new                 (const gchar       *name,
                                               const gchar       *startup_id);
UniqueApp *    unique_app_new_with_commands   (const gchar       *name,
                                               const gchar       *startup_id,
                                               const gchar       *first_command_name,
                                               ...) G_GNUC_NULL_TERMINATED;
void           unique_app_add_command         (UniqueApp         *app,
                                               const gchar       *command_name,
                                               gint               command_id);
void           unique_app_watch_window        (UniqueApp         *app,
                                               GtkWindow         *window);

gboolean       unique_app_is_running          (UniqueApp         *app);
UniqueResponse unique_app_send_message        (UniqueApp         *app,
                                               gint               command_id,
                                               UniqueMessageData *message_data);

G_END_DECLS

#endif /* __UNIQUE_APP_H__ */