define(
  "igbtoolbox/igb/ping-events",
  [],

  function() {
    'use strict';


    /**
     * Enum for events supported by the controller.
     * @enum {string}
     */
    var pingEvents = {

      /**
       * json object as received from server
       */
      PONG_RECEIVED: 'ping_pong_received',

      /**
       * true|false - enables or disables periodically pings
       */
      NEED_PING_ACTIVITY_SET: 'ping_need_ping_activity_set',

      /**
       * true|false - shows or hides ping ui control
       */
      NEED_PING_UI_VISIBILITY_SET: 'ping_need_ping_ui_visibility_set',

      /**
       * true|false - current statis if periodically pings are enabled
       */
      PING_ACTIVITY_STATUS: 'ping_activity_status',

      /**
       * pingEvents.SystemChanged
       */
      SYSTEM_CHANGED: 'ping_system_changed',

      /**
       * pingEvents.ShipChanged
       */
      SHIP_CHANGED: 'ping_ship_changed',

      /**
       * pingEvents.StationChanged
       */
      STATION_CHANGED: 'ping_station_changed',

      /**
       * Pilot - emitted upon any changes to the pilot
       */
      PILOT_CHANGED: 'ping_pilot_changed',

      /**
       * pingEvents.PilotKilled
       */
      PILOT_KILLED: 'ping_pilot_killed',

      /**
       * Forces immediate ping execution
       */
      NEED_PING: 'ping_force',

      /**
       * pingEvents.AddPiggybackParam
       */
      NEED_PIGGYPACK_PARAM: 'ping_add_param',

      /**
       * Forced PILOT_UPDATED event if any pilot is set
       */
      NEED_PILOT: 'ping_need_pilot'

    };


    pingEvents.SystemChanged = function(pilot, oldSystemId, newSystemId) {
      this.pilot = pilot;
      this.oldSystemId = oldSystemId;
      this.newSystemId = newSystemId;
    };

    pingEvents.ShipChanged = function(pilot, oldShipId, newShipId) {
      this.pilot = pilot;
      this.oldShipId = oldShipId;
      this.newShipId = newShipId;
    };

    pingEvents.PilotKilled = function(pilot, oldShipId, newShipId) {
      this.pilot = pilot;
      this.oldShipId = oldShipId;
      this.newShipId = newShipId;
    };

    pingEvents.StationChanged = function(pilot, oldStationId, newStationId) {
      this.pilot = pilot;
      this.oldStationId = oldStationId;
      this.newStationId = newStationId;
    };

    pingEvents.AddPiggybackParam = function(param, enable) {
      this.param = param;
      this.enable = enable;
    };

    return pingEvents;
  }
);
