#### Server configuration
#
# The :base_url specifies the prefix for all default http responders.
:base_url: '/'
#
# This setting defines if requests should be gzip-compressed or not.
# This is a trade-off between cpu cycles used and network bandwidth used.
# It's generally a good idea to leave it as false (gzipping enabled).
:no_gzip: false
#
# Enabling this appends all msg.reply call output to stdout
:trace: false
#
# The settings for the index_html plugin
:index_html:
  #
  # HTML template file path relative to the plugin dir
  :index_tmpl: 'tmpl/index.html'
  #
  # The index.html page <title>
  :title: 'RSence'
  #  
  :noscript: '<h1>Sorry!</h1><p>This site requires a Javascript -capable web browser.</p><p>Please enable Javascript or upgrade your browser.</p>'
  #
  :instance: null
  #
  # A list of javascript dependencies to include in the html
  :deps: [ ]
  #
  # Boot library:
  :boot_lib: rsence
  #
  # Default additional libraries to use:
  :default_libs: []
#
# The settings for the main plugin
:main_plugin:
  #
  # The background color of the web page when loading is done
  :bg_color:            '#ffffff'
  #
  # how many milliseconds to wait before doing an idle poll
  :server_poll_interval: 2000 # 2 seconds
#
# The settings for the daemon
:daemon:
  #
  # How long to wait before binding the broker to the
  # HTTP address and port after starting the Transporter.
  # A value of -1 disables the broker completely.
  # Before waiting, the daemon starts all subsystems except the
  # http handling front-end (Broker).
  # Useful in situations where RSence itself configures the
  # network interfaces or the interfaces become available after
  # RSence is started.
  :http_delayed_start: 0
  #
  # Save plugin and session state every n seconds.
  # Set to 0 or negative to disable.
  :autosave_interval: 180 # once every 3 minutes
  #
  # Daemon helper files, leave empty for defaults.
  #:pid_fn: /var/run/rsence.pid
  #:log_fn: /var/log/rsence.log
#
# Switches on debug-mode:
#  - Generates more output
#  - Each time /hello is post-requested:
#    - Plugins are reloaded from source 
#    - GZFiles are reloaded (if more recent than in memory)
:debug_mode: false
#
# Web server-related settings:
:http_server:
  #
  # Simulate network latency. Good for testing how your
  # app behaves with laggy connections.
  :latency: 0
  #
  # HTTP Port number to listen to.
  :port:  '8001'
  #
  # Bind this ip address ('0.0.0.0' means all)
  :bind_address:  '127.0.0.1'
  #
  # Rack handler to use, defaults to puma
  :rack_require: puma
  #
  # These are default options. Ymmv, but these work fine for puma
  :handler_options:
    :Verbose: false
    :Threads: '4:64' # puma default is '0:16'
#
# When enabled, sets http cache headers
# to cache content as long as possible.
:cache_maximize: true
#
# When :cache_maximize is enabled,
# this is the time (in seconds) the cached
# content will expire in
:cache_expire: 14515200 # 6 months
#
# Paths to scan for available plugins
:plugin_paths: [ ]
#
# List of files that include strings
:string_files: [
  "conf/default_strings.yaml"
]
#
# Transporter settings:
:transporter_conf:
  #
  # The HApplication priority of the client, when actively polling.
  :client_poll_priority: 60
  #
  # Reload the client after any plugins are reloaded:
  :client_autoreload: true
#
#
# Session-related settings
:session_conf:
  #
  # Enable cookie-based sessions
  :session_cookies: true
  #
  # Trusting the cookies means ignoring the client protocol session key exchange.
  # Enabled by default, because in most cases, extreme security measures aren't necessary
  # and the drawback of having an invalid session because a tcp packet got lost isn't
  # tolerable as a default setting.
  :trust_cookies: true
  #
  # The comment string in the session cookie
  :ses_cookie_comment: "RSence Session Key"
  #
  # Disposable keys. When enabled, runs in a more secure way and changes the session key on each xhr.
  :disposable_keys:    true
  #
  # Timeout controls how long a session is valid
  :timeout_secs:       900 # 15 minutes
  #
  # Key length controls the length of the random-part of the key.
  :key_length:   12
  #
  # Cookie keys are this many times longer than xhr keys
  :cookie_key_multiplier: 2
  #
  #
  # When enabled, deletes all old sessions upon server startup.
  # If the --reset-sessions command-line switch is provided,
  # switches this one to true.
  :reset_sessions: false
  #
  # When this is enabled, multiple sessions are allowed for each client
  # When it's enabled, the old session is left intact and a new one is
  # created by making a clone of the last session.
  # If enabled, also check the maximum number of clones allowed in
  # :session_cookie_max_clones
  # Defaults to false, will be the default in a future version.
  :clone_cookie_sessions: true
  #
  # This option overrides the default session timeout.
  # Don't set this to less than the expected poll interval,
  # otherwise the session might expire before the previous
  # (cloned) session re-connects the next time.
  # A safe value for a 60 second poll interval is 120 (default).
  :cloned_session_expires_in: 120
  #
  # Message strings
  :messages:
    #
    # if the session is invalid for one reason or another, display this:
    :invalid_session:
      :title: 'Invalid Session'
      :descr: 'Your session is invalid. Please reload the page to continue.'
      :uri:    '/'
#
# Database configuration
:database:
  # Session database storage string. Leave empty here to enable the wizard for storage.
  :ses_db: 'sqlite://db/ses.db'

#
# ValueManager settings
:values_conf:
  # Key length controls the length of the random-part of the key.
  :key_length:    8
  #
  # Disposable keys, when enabled, changes the value id on each session restoration
  :disposable_keys:   true
#
# Entered by code, empty container
:broker_urls: { }

#### Client package build configuration
#
#
:client_pkg:

  # Source directories to scan
  :src_dirs: []

  # List of theme names to include and pack
  :theme_names:
    - default  # Makes default_theme.js containing css and html templates
    - bright   # Makes bright_theme.js containing css and html templates

  # List of packages to build
  :packages:

    # The core package, loaded by default using a script tag in index_html
    core:

      # RSence.*
      - rsence_ns

      - locale_settings    # HLocaleSettings

      # RSence.Core
      - class             # HClass
      - elem              # ELEM
      - event             # Event

      # RSence.Util
      - sha               # SHA

      # RSence.Foundation
      - system            # HSystem
      - valueresponder    # HValueResponder
      - application       # HApplication

      # COMM
      - comm              # COMM
      - queue             # COMM.Queue
      - session           # COMM.Session
      - transporter       # COMM.Transporter
      - sessionwatcher    # COMM.SessionWatcher
      - urlresponder      # COMM.URLResponder
      - autosync          # ( automatic sync setup )
      - values            # COMM.Values
      - value             # HValue
      - jsloader          # COMM.JSLoader
      - json_renderer     # COMM.JSONRenderer
      - valuematrix       # HValueMatrixInterface & HValueMatrix
      - point             # HPoint
      - rect              # HRect
      - thememanager      # HThemeManager
      - markupview        # HMarkupView
      - morphanimation    # HMorphAnimation
      - viewdefaults      # HViewDefaults
      - view              # HView
      - eventresponder    # HEventResponder
      - dummyvalue        # HDummyValue
      - eventmanager      # EVENT
      - controldefaults   # HControlDefaults
      - control           # HControl
      - valueaction       # HValueAction
      - dyncontrol        # HDynControl
      - centerview        # HCenterView
      - scrollview        # HScrollView
      - inlineview        # HInlineView

    # The default collection of simple control widgets (components)
    controls:
      - button            # HButton & HClickValueButton
      - checkbox          # HCheckbox
      - radiobutton       # HRadioButton
      - stringview        # HStringView
      - textcontrol       # HTextControl
      - passwordcontrol   # HPasswordControl
      - textarea          # HTextArea
      - searchfield       # HSearchField
      - uploader          # HUploader
      - slider            # HSlider
      - vslider           # HVSlider
      - progressbar       # HProgressBar
      - progressindicator # HProgressIndicator
      - imageview         # HImageView
      - stepper           # HStepper
      - validatorview     # HValidatorView
      - window            # HWindow
      - tab               # HTab & HTabView & HTabItem
      - sheet             # HSheet
      - alert_sheet       # HAlertSheet
      - confirm_sheet     # HConfirmSheet

    # Server error message application ( the Reload / Reset Session dialog )
    servermessage:
      - reloadapp # ReloadApp

    # Special package for Internet Explorer 6.0
    iefix:
      - iefix

    # Date and time -related control widgets (components)
    # These are not complete; they are still under development
    # and will be included in the controls package when finalized.
    datetime:
      - datetimevalue       # HDateTime
      - calendar            # HCalendar
      - datetimepicker      # HDateTimePicker
      - timesheet           # HTimeSheet
      - timesheet_item      # HTimeSheetItem
      - timesheet_item_edit # HTimeSheetItemEditor

    # List related control widgets (components)
    # These are not complete; they are still under development
    # and will be included in the controls package when finalized.
    lists:
      - listitems           # HListItems
      - checkboxlist        # HCheckboxList
      - radiobuttonlist     # HRadiobuttonList
      - propertylist        # HPropertyList
      - propertylisteditor  # HPropertyEditor
      - minimenu            # HMiniMenu
      - minimenuitem        # HMiniMenuItem
      - popupmenu           # HPopupMenu
      - menuitem            # HMenuItem

    tables:
      - table               # HTable

    # Graphics related control widgets (components)
    # These are not complete and there will probably never be any
    # serious efforts to support legacy browsers, like old IE versions,
    # unless someone is interested in sponsoring such efforts.
    graphics:
      - svgcontrol

  # Special packages that include other packages
  :compound_packages:
    rsence:
      - core
      - default_theme
      - controls
      - lists
      - datetime
      - tables
      - graphics
      - servermessage
    std_widgets:
      - default_theme
      - controls
      - lists
      - datetime
      - tables
      - graphics
      - servermessage

  # List of variables and other names beginning
  # with a underscore that should not be obfuscated
  :reserved_names:
    - _ID
    - _id
    - _WIDTH
    - _width
    - _HEIGHT
    - _height
    - _

  # List of file extensions considered graphics image types.
  # Used for theme graphics inclusion.
  :gfx_formats:
    - .jpg
    - .gif
    - .png
    - .swf
    - .svg
    - .pdf

  # If disabled, makes packages out of single source bundles automatically
  :dont_pack_undefined: true

  # Replacement prefix for obfuscated names
  :repl_prefix: _

  # If enabled, doesn't obfuscate code (useful for debugging)
  :no_obfuscation: false

  # If enabled, doesn't remove whitespace (useful for debugging)
  :no_whitespace_removal: false

  # If enabled, doesn't make gzipped packages
  :no_gzip: false

  # The strategy for gzip, a number between 0 and 9
  #  - 0 means largest size, but fast compression
  #  - 9 means smallest size, but slow compression
  #  - any number in between is a compromise
  :gz_strategy: 9