This file is indexed.

/usr/include/grapple/grapple_lobby.h is in libgrapple-dev 0.9.1-0ubuntu3.

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
/*
    Grapple - A fully featured network layer with a simple interface
    Copyright (C) 2006 Michael Simms

    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 St, Fifth Floor, Boston, MA  02110-1301  USA

    Michael Simms
    michael@linuxgamepublishing.com
*/

#ifndef GRAPPLE_LOBBY_H
#define GRAPPLE_LOBBY_H

#include "grapple_defines.h"
#include "grapple_error.h"
#include "grapple_protocols.h"
#include "grapple_types.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef int grapple_lobby;
typedef int grapple_lobbyclient;
typedef int grapple_lobbygameid;
typedef int grapple_lobbyroomid;

#define GRAPPLE_LOBBY_ENTRY_ROOM "Entry"

typedef enum
  {
    GRAPPLE_LOBBYMSG_ROOMLEAVE    = 1,
    GRAPPLE_LOBBYMSG_ROOMENTER,
    GRAPPLE_LOBBYMSG_ROOMCREATE,
    GRAPPLE_LOBBYMSG_ROOMDELETE,
    GRAPPLE_LOBBYMSG_CHAT,
    GRAPPLE_LOBBYMSG_DISCONNECTED,
    GRAPPLE_LOBBYMSG_NEWGAME,
    GRAPPLE_LOBBYMSG_DELETEGAME,
    GRAPPLE_LOBBYMSG_GAME_MAXUSERS,
    GRAPPLE_LOBBYMSG_GAME_USERS,
    GRAPPLE_LOBBYMSG_GAME_CLOSED,
  } grapple_lobbymessagetype;

typedef struct _grapple_lobbymessage
{
  grapple_lobbymessagetype type;

  union
  {
    struct 
    {
      grapple_user id;
      int length;
      char *message;
    } CHAT;
    struct 
    {
      grapple_lobbyroomid roomid;
      grapple_user userid;
      char *name;
    } ROOM;
    struct
    {
      grapple_lobbygameid id;
      char *name;
      int maxusers;
      int currentusers;
      int needpassword;
      int closed;
    } GAME;
  };

  struct _grapple_lobbymessage *next;
  struct _grapple_lobbymessage *prev;

} grapple_lobbymessage;

typedef struct
{
  grapple_lobbygameid gameid;
  char *name;
  int currentusers;
  int maxusers;
  int needpassword;
  grapple_lobbyroomid room;
  int closed;
} grapple_lobbygame;

//The callback typedef
typedef int(*grapple_lobbycallback)(grapple_lobbymessage *,void *);


/////////////////////SERVER//////////////////////

extern grapple_lobby grapple_lobby_init(const char *,const char *);
extern int grapple_lobby_ip_set(grapple_lobby,const char *);
extern int grapple_lobby_port_set(grapple_lobby,int);
extern int grapple_lobby_start(grapple_lobby);

extern int grapple_lobby_destroy(grapple_lobby);
extern grapple_error grapple_lobby_error_get(grapple_lobbyclient);

/////////////////////CLIENT//////////////////////

extern grapple_lobbyclient grapple_lobbyclient_init(const char *,const char *);
extern int grapple_lobbyclient_address_set(grapple_lobbyclient, const char *);
extern int grapple_lobbyclient_port_set(grapple_lobbyclient,int);
extern int grapple_lobbyclient_name_set(grapple_lobbyclient, const char *);
extern int grapple_lobbyclient_start(grapple_lobbyclient);
extern int grapple_lobbyclient_destroy(grapple_lobbyclient);

extern int grapple_lobbyclient_room_create(grapple_lobbyclient,const char *);
extern int grapple_lobbyclient_room_enter(grapple_lobbyclient,grapple_lobbyroomid);
extern int grapple_lobbyclient_room_leave(grapple_lobbyclient);
extern int grapple_lobbyclient_chat(grapple_lobbyclient,const char *);

extern grapple_lobbymessage *grapple_lobbyclient_message_pull(grapple_lobbyclient);

extern grapple_lobbygameid grapple_lobbyclient_game_register(grapple_lobbyclient,
							     grapple_server);
extern int grapple_lobbyclient_game_unregister(grapple_lobbyclient);
extern int grapple_lobbyclient_game_join(grapple_lobbyclient,
					 grapple_lobbygameid, grapple_client);
extern int grapple_lobbyclient_game_leave(grapple_lobbyclient,grapple_client);

extern grapple_lobbyroomid grapple_lobbyclient_currentroomid_get(grapple_lobbyclient);

extern grapple_lobbyroomid *grapple_lobbyclient_roomlist_get(grapple_lobbyclient);
extern char *grapple_lobbyclient_roomname_get(grapple_lobbyclient,
					      grapple_lobbyroomid);
extern grapple_lobbyroomid grapple_lobbyclient_roomid_get(grapple_lobbyclient,
							  const char *);

extern grapple_user *grapple_lobbyclient_roomusers_get(grapple_lobbyclient,
						       grapple_lobbyroomid);
extern grapple_lobbygameid *grapple_lobbyclient_gamelist_get(grapple_lobbyclient,
							     grapple_user);

extern grapple_lobbygame *grapple_lobbyclient_game_get(grapple_lobbyclient,grapple_lobbygameid);
extern int grapple_lobbyclient_game_dispose(grapple_lobbygame *);

extern int grapple_lobbyclient_callback_set(grapple_lobbyclient,
					    grapple_lobbymessagetype,
					    grapple_lobbycallback,
					    void *);
extern int grapple_lobbyclient_callback_setall(grapple_lobbyclient,
					       grapple_lobbycallback,
					       void *);
extern int grapple_lobbyclient_callback_unset(grapple_lobbyclient,
					      grapple_lobbymessagetype);

extern grapple_error grapple_lobbyclient_error_get(grapple_lobbyclient);


/////////////////////////OTHER//////////////////////
extern int grapple_lobbymessage_dispose(grapple_lobbymessage *);

#ifdef __cplusplus
}
#endif

#endif