This file is indexed.

/usr/include/gnash/rc.h is in gnash-dev 0.8.11~git20160109-1build1.

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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
// rc.h:  "Run Command" configuration file declarations, for Gnash.
// 
//   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
//   Free Software Foundation, Inc
// 
// 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 3 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, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

#ifndef GNASH_RC_H
#define GNASH_RC_H

#include "dsodefs.h"
#include <string>
#include <vector>
#include <iosfwd>
#include <sstream>
#include <cstdint>
#include <boost/tokenizer.hpp>

#include "StringPredicates.h"

#if !defined(_WIN32) && !defined(__HAIKU__) && !defined(ANDROID)
#include <sys/shm.h>
#else
#ifdef _WIN32
  typedef std::uint32_t key_t;
#endif // _WIN32
#endif // _WIN32 and __HAIKU__

namespace gnash {
  
class DSOEXPORT RcInitFile 
{
public:

    /// Return the default instance of RC file
    static RcInitFile& getDefaultInstance();

    /// Load and parse files, looking in the usual places
    //
    void loadFiles();

    bool parseFile(const std::string& filespec);

    /// \brief    
    /// Writes a valid gnashrc file. If the file already exists,
    /// is is overwritten.
    //
    /// @param filespec the file to write
    /// @return whether the file was successfully written.
    bool updateFile(const std::string& filespec);
    
    /// \brief Writes a gnashrc file to the file specified in the
    /// GNASHRC environment variable OR to the user's home
    /// directory.
    //
    /// @return whether the file was successfully written.
    bool updateFile();
    
    bool useSplashScreen() const { return _splashScreen; }
    void useSplashScreen(bool value);

    bool useActionDump() const { return _actionDump; }
    void useActionDump(bool value);

    bool useParserDump() const { return _parserDump; }
    void useParserDump(bool value);

    bool useWriteLog() const { return _writeLog; }
    void useWriteLog(bool value);

    int getTimerDelay() const { return _delay; }
    void setTimerDelay(int x) { _delay = x; }

    bool showASCodingErrors() const { return _verboseASCodingErrors; }
    void showASCodingErrors(bool value);

    bool showMalformedSWFErrors() const { return _verboseMalformedSWF; }
    void showMalformedSWFErrors(bool value);

    bool showMalformedAMFErrors() const { return _verboseMalformedAMF; }
    void showMalformedAMFErrors(bool value);

    int getMovieLibraryLimit() const { return _movieLibraryLimit; }
    void setMovieLibraryLimit(int value) { _movieLibraryLimit = value; }

    bool enableExtensions() const { return _extensionsEnabled; }

    /// Return true if user is willing to start the gui in "stop" mode
    //
    /// defaults to false.
    bool startStopped() const { return _startStopped; }
    void startStopped(bool value) { _startStopped = value; }

    bool insecureSSL() const { return _insecureSSL; }
    void insecureSSL(bool value) { _insecureSSL = value; }
    
    int qualityLevel() const { return _quality; }
    void qualityLevel(int value) { _quality = value; }
    
    int verbosityLevel() const { return _verbosity; }
    void verbosityLevel(int value) { _verbosity = value; }
    
    void setDebugLog(const std::string &x) { _log = x; }
    const std::string& getDebugLog() const { return _log; }

    void setDocumentRoot(const std::string &x) { _wwwroot = x; }
    std::string getDocumentRoot() { return _wwwroot; }
    
    bool useDebugger() const { return _debugger; }
    void useDebugger(bool value) { _debugger = value; }

    bool useSound() const { return _sound; }
    void useSound(bool value) { _sound = value; }

    // strk: I'd drop this, and allow an -f switch to select
    //       the gnashrc file to use instead
    bool usePluginSound() const { return _pluginSound; }
    void usePluginSound(bool value) { _pluginSound = value; }

    bool popupMessages() const { return _popups; }
    void interfacePopups(bool value) { _popups = value; }

    bool useLocalDomain() const { return _localdomainOnly; }
    void useLocalDomain(bool value);

    /// Whether to restrict access to the local host   
    bool useLocalHost() const { return _localhostOnly; }

    /// Set whether to restrict access to the local host
    void useLocalHost(bool value);

    typedef std::vector<std::string> PathList;

    /// Get the current RcInitFile whitelist of domains to allow
    //
    /// @return a std::vector of strings containing allowed domains 
    const PathList& getWhiteList() const { return _whitelist; }

    /// Sets the RcInitFile whitelist of domains to allow
    //
    /// @param list a std::vector of strings containing domains without protocol
    void setWhitelist (const std::vector<std::string>& list) { _whitelist = list; }

    /// Get the current RcInitFile blacklist of domains to block
    //
    /// @return a std::vector of strings containing blocked domains    
    const PathList& getBlackList() const { return _blacklist; }

    /// Whether to forcibly show the mouse pointer even if the SWF file
    /// disables it. THis allows touchscreen based SWF files to
    /// work on a normal non-touchscreen desktop.
    bool showMouse() const { return _showMouse; }
    
    /// Sets the RcInitFile blacklist of domains to block
    //
    /// @param list a std::vector of strings containing domains without protocol
    void setBlacklist (const std::vector<std::string>& list) { 
        _blacklist = list;
    }

    /// Return the list of directories to be used as the 'local' sandbox
    //
    /// Local sendbox is the set of resources on the filesystem we want to
    /// give the current movie access to.
    ///
    const PathList& getLocalSandboxPath() const { return _localSandboxPath; }

    /// Add a directory to the local sandbox list
    void addLocalSandboxPath(const std::string& dir)
    {
        _localSandboxPath.push_back(dir);
    }

    /// Sets a list of sandbox paths. Gnash will only allow movies access
    /// to files in these paths. The path of the movie playing is automatically
    /// added.
    //
    /// @param list a std::vector of strings containing paths to allow
    void setLocalSandboxPath(const PathList& path)
    {
        _localSandboxPath = path;
    }

    const std::string& getFlashVersionString() const {
        return _flashVersionString;
    }
    
    void setFlashVersionString(const std::string& value) {
        _flashVersionString = value;
    }

    const std::string& getFlashSystemOS() const {
        return _flashSystemOS;
    }
    
    void setFlashSystemOS(const std::string& value) {
        _flashSystemOS = value;
    }

    const std::string& getFlashSystemManufacturer() const {
        return _flashSystemManufacturer;
    }
    
    void setFlashSystemManufacturer(const std::string& value) {
        _flashSystemManufacturer = value;
    }
    
    const std::string& getGstAudioSink() const { return _gstaudiosink; }
    
    void setGstAudioSink(const std::string& value) { _gstaudiosink = value; }

    int getRetries() const { return _retries; }
    
    void setRetries(int x) { _retries = x; }

    /// The number of seconds of inactivity before timing out streams downloads
    double getStreamsTimeout() const { return _streamsTimeout; }

    /// Set seconds of inactivity before timing out streams downloads
    void setStreamsTimeout(const double &x) { _streamsTimeout = x; }

    /// Get the URL opener command format
    //
    /// The %u label will need to be substituted by the actual url
    /// properly escaped.
    ///
    const std::string &getURLOpenerFormat() const
    {
        return _urlOpenerFormat;
    }
    
    void setURLOpenerFormat(const std::string& value)
    {
        _urlOpenerFormat = value;
    }
 
    // Get the name of the hardware acclerator to use for video
    const std::string &getHWAccel() const { return _hwaccel; }

    // Set the name of the hardware acclerator to use for video
    void setHWAccel(const std::string &x) { _hwaccel = x; }

    // Get the name of the renderer to draw the display
    const std::string& getRenderer() const { return _renderer; }

    // Set the name of the renderer to draw the display
    void setRenderer(const std::string& x) { _renderer = x; }

    // Get the name of the media handler to use for video/audio
    const std::string& getMediaHandler() const { return _mediahandler; }

    // Set the name of the media handler to use for video/audio
    void setMediaHandler(const std::string& x) { _mediahandler = x; }

    // Get the location of the sandbox for .sol files
    const std::string &getSOLSafeDir() const { return _solsandbox; }

    // Set the location of the sandbox for .sol files
    void setSOLSafeDir(const std::string &x) { _solsandbox = x; }

    bool getSOLLocalDomain() const { return _sollocaldomain; }
    
    void setSOLLocalDomain(bool x) { _sollocaldomain = x; }
    
    bool getSOLReadOnly() const { return _solreadonly; }
    
    void setSOLReadOnly(bool x) { _solreadonly = x; }
    
    bool getLocalConnection() const { return _lcdisabled; }
    
    void setLocalConnection(bool x) { _lcdisabled = x; }
    
    /// \brief Enable tracing all LocalConnection traffic
    bool getLCTrace() const { return _lctrace; }
    
    void setLCTrace(bool x) { _lctrace = x; }

    key_t getLCShmKey() const { return static_cast<key_t>(_lcshmkey); }
    
    void setLCShmKey(bool x) { _lcshmkey = x; }

    bool ignoreFSCommand() const { return _ignoreFSCommand; }
    
    void ignoreFSCommand(bool value) { _ignoreFSCommand = value; }
    
    void saveStreamingMedia(bool value) { _saveStreamingMedia = value; }

    bool saveStreamingMedia() const { return _saveStreamingMedia; }

    void saveLoadedMedia(bool value) { _saveLoadedMedia = value; }

    bool saveLoadedMedia() const { return _saveLoadedMedia; }

    void setMediaDir(const std::string& value) { _mediaCacheDir = value; }

    const std::string& getMediaDir() const { return _mediaCacheDir; }
	
    void setWebcamDevice(int value) {_webcamDevice = value;}
    
    int getWebcamDevice() const {return _webcamDevice;}
    
    void setAudioInputDevice(int value) {_microphoneDevice = value;}
    
    int getAudioInputDevice() {return _microphoneDevice;}

    /// \brief Get the Root SSL certificate
    const std::string& getRootCert() const {
        return _rootcert;
    }
    /// \brief Set the Root SSL certificate
    void setRootCert(const std::string& value) {
        _rootcert = value;
    }

    /// \brief Get the Client SSL certificate
    const std::string& getCertFile() const {
        return _certfile;
    }
    /// \brief Set the Client SSL certificate
    void setCertFile(const std::string& value) {
        _certfile = value;
    }

    /// \brief Get the directory for client SSL certificates
    const std::string& getCertDir() const {
        return _certdir;
    }
    /// \brief Set the directory for client SSL certificates
    void setCertDir(const std::string& value) {
        _certdir = value;
    }

    void ignoreShowMenu(bool value) { _ignoreShowMenu=value; }

    bool ignoreShowMenu() const { return _ignoreShowMenu; }

    int getScriptsTimeout() const { return _scriptsTimeout; }

    void setScriptsTimeout(int x) { _scriptsTimeout = x; }

    int getScriptsRecursionLimit() const { return _scriptsRecursionLimit; }

    void setScriptsRecursionLimit(int x) { _scriptsRecursionLimit = x; }

    void lockScriptLimits(bool x) { _lockScriptLimits = x; }

    bool lockScriptLimits() const { return _lockScriptLimits; }

    void dump();    

protected:
    
    // A function only for writing path lists to an outstream.
    void writeList(const PathList& list, std::ostream& o);

    /// Construct only by getDefaultInstance()
    RcInitFile();

    /// Never destroy (TODO: add a destroyDefaultInstance)
    ~RcInitFile();

    /// Substitutes user's home directory for ~ on a path string
    /// according to POSIX standard.
    ///
    /// @param path the path to expand.
    static void expandPath(std::string& path);

    /// \brief
    /// If variable matches pattern (case-insensitive)
    /// set var according to value
    //
    /// @return true if variable matches pattern, false otherwise
    /// @param var the variable to change
    /// @param pattern the pattern for matching
    /// @variable the variable to match to pattern
    /// @value the value to adopt if variable matches pattern.
    static bool extractSetting(bool &var, const std::string& pattern,
                        const std::string &variable, const std::string &value);

    /// \brief
    /// If variable matches pattern (case-insensitive)
    /// set num according to value
    //
    /// @return true if variable matches pattern, false otherwise
    /// @param num the variable to change
    /// @param pattern the pattern for matching
    /// @variable the variable to match to pattern
    /// @value the value to adopt if variable matches pattern.
    template<typename T>
    static bool extractNumber(T& num, const std::string& pattern,
                        const std::string &variable, const std::string &value)
    {

        StringNoCaseEqual noCaseCompare;

        if (noCaseCompare(variable, pattern)) {
            std::istringstream in(value);
            if (in >> num) return true;
            
            num = 0;
            return true;
        }
        
        return false;
    }

    /// \brief
    /// If variable matches pattern (case-insensitive)
    /// set out according to value
    //
    /// @return true if variable matches pattern, false otherwise
    /// @param out the variable to change
    /// @param pattern the pattern for matching
    /// @variable the variable to match to pattern
    /// @value the value to adopt if variable matches pattern.
    static bool extractDouble(double &out, const std::string& pattern,
                        const std::string &variable, const std::string &value);


    /// \brief parses a space-separated list into std::vector list 
    //
    /// @param list the vector to modify or generate.
    /// @param action either 'set' or 'append': whether to add to or
    ///         clear the vector.
    /// @param items string of space-separated values. This gets nuked.
    void parseList(std::vector<std::string>& list, const std::string &action,
			        const std::string &items);

    typedef boost::char_separator<char> Sep;
    typedef boost::tokenizer< Sep > Tok;

    /// The timer delay
    std::uint32_t  _delay;

    /// Max number of movie clips to store in the library      
    std::uint32_t  _movieLibraryLimit;

    /// Enable debugging of this class
    bool _debug;

    /// Enable the Flash movie debugger
    bool _debugger;

    /// Level of debugging output
    std::uint32_t  _verbosity;

    /// Command format to use to open urls
    //
    /// The %u label will need to be substituted by the url
    /// (properly escaped)
    ///
    std::string  _urlOpenerFormat;

    /// String to pass as $version in Actionscript
    std::string  _flashVersionString;
    
    /// String representing the first GStreamer audio output pipeline to try
    std::string _gstaudiosink;

    /// \brief String to pass as System.capabilities.os
    /// in Actionscript. If empty, leaves detection
    /// to System.cpp (default).
    std::string  _flashSystemOS;       

    /// \brief String to pass as
    /// System.capabilities.manufacturer
    /// in Actionscript
    std::string  _flashSystemManufacturer;

    /// Enable dumping actionscript classes
    bool _actionDump;

    /// Enable dumping parser data
    bool _parserDump;

    /// Enable ActionScript errors verbosity
    bool _verboseASCodingErrors;

    /// Enable Malformed SWF verbosity
    bool _verboseMalformedSWF;

    /// Enable Malformed AMF verbosity
    bool _verboseMalformedAMF;

    /// Display a splash screen when loading a movie
    bool _splashScreen;

    /// Only access network resources in the local domain
    bool _localdomainOnly;
    
    /// Only access network resources on the local host
    bool _localhostOnly;

    /// Show the mouse pointer
    bool _showMouse;

    /// Allowed domains
    PathList _whitelist;
    
    /// Blocked Domains 
    PathList _blacklist;
    
    /// The name of the debug log
    std::string _log;
    
    /// Enable writing the debug log to disk
    bool _writeLog;
    
    /// The root path for the streaming server        
    std::string _wwwroot;
    
    /// the number of retries for a thread 
    int _retries;
    
    /// Enable the sound handler at startup         
    bool _sound;
    
    /// Enable sound for the plugin
    bool _pluginSound;		

    /// Enable scanning plugin path for extensions
    bool _extensionsEnabled;	

    /// Start the gui in "stop" mode
    bool _startStopped;		

    /// Allow SSL connections without verifying the certificate
    bool _insecureSSL;		

    /// The number of seconds of inactivity triggering download timeout
    double _streamsTimeout;

    /// \brief Local sandbox: the set of resources on the
    /// filesystem we want to give the current movie access to.
    PathList _localSandboxPath;

    /// \brief SOL Sandbox: This is the only dir .sol (Shared Object)
    /// files can be written in, or read from.
    std::string _solsandbox;

    /// Whether SOL files can be written
    bool _solreadonly;
    bool _sollocaldomain;
    
    // Disable local connection
    bool _lcdisabled;
    
    /// Trace local connection activity (in log)
    bool _lctrace;
    
    /// Shared memory segment key (can be set for
    /// compatibility with other players.)
    std::uint32_t _lcshmkey;
    
    /// Whether the player should respond to fscommands
    /// (showmenu, quit etc)
    bool _ignoreFSCommand;

    /// The quality to display SWFs in. -1 to allow the SWF to override.
    int _quality;

    bool _saveStreamingMedia;
    
    bool _saveLoadedMedia;

    std::string _mediaCacheDir;

    bool _popups;

    ///FIXME: this should probably eventually be changed to a more readable
    ///config option instead of an integer
    int _webcamDevice;
    
    int _microphoneDevice;

    /// \var _certfile
    ///		This is the name of the client certificate file
    std::string _certfile;

    /// \var _certdir
    ///		This is the path to the directory containing cert files
    std::string _certdir;

    /// \var _rootcert
    ///		This is the name of the root certificate
    std::string _rootcert;

    /// Whether the player will recognize changes to Stage.showMenu in AS
    /// default value is true
    bool _ignoreShowMenu;

    /// Whether to use HW video decoding support, no value means disabled.
    /// The only currently supported values are: none or vaapi
    /// support is coming. 
    std::string _hwaccel;

    /// Which renderer backend to use, no value means use the default.
    /// The currently supported values are agg, opengl, or cairo. AGG
    /// being the default.
    std::string _renderer;

    /// Which media player backend to use, no value means use the default.
    /// The default is set in the MediaFactory initialization table.
    std::string _mediahandler;

    /// The number of seconds after which action execution is
    /// considered to be slow enough to prompt the user for aborting
    int _scriptsTimeout;

    /// The max actionscript function call stack depth
    int _scriptsRecursionLimit;

    /// Whether to ignore SWF ScriptLimits tags 
    bool _lockScriptLimits;
};

// End of gnash namespace 
}

#endif


// local Variables:
// mode: C++
// indent-tabs-mode: t
// End: