1 /* 2 * ***** BEGIN LICENSE BLOCK ***** 3 * Zimbra Collaboration Suite Web Client 4 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2013, 2014, 2016 Synacor, Inc. 5 * 6 * The contents of this file are subject to the Common Public Attribution License Version 1.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at: https://www.zimbra.com/license 9 * The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 10 * have been added to cover use of software over a computer network and provide for limited attribution 11 * for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B. 12 * 13 * Software distributed under the License is distributed on an "AS IS" basis, 14 * WITHOUT WARRANTY OF ANY KIND, either express or implied. 15 * See the License for the specific language governing rights and limitations under the License. 16 * The Original Code is Zimbra Open Source Web Client. 17 * The Initial Developer of the Original Code is Zimbra, Inc. All rights to the Original Code were 18 * transferred by Zimbra, Inc. to Synacor, Inc. on September 14, 2015. 19 * 20 * All portions of the code are Copyright (C) 2007, 2008, 2009, 2010, 2011, 2013, 2014, 2016 Synacor, Inc. All Rights Reserved. 21 * ***** END LICENSE BLOCK ***** 22 */ 23 24 /** 25 * @overview 26 * 27 * This file defines an application event. 28 * 29 */ 30 31 /** 32 * Creates an empty application event. 33 * @class 34 * This class represents an event related to a change of state for an individual 35 * application or for ZCS as a whole. 36 * 37 * @param {Object} the application to which this event applies; if <code>null</code>, the event applies to ZCS 38 * 39 * @extends ZmEvent 40 */ 41 ZmAppEvent = function(app) { 42 ZmEvent.call(this); 43 }; 44 45 ZmAppEvent.prototype = new ZmEvent; 46 ZmAppEvent.prototype.constructor = ZmAppEvent; 47 48 /** 49 * Event used to notify listeners before startup (i.e. before the first 50 * app is activated). This is a bit of a misnomer because this event occurs 51 * after the apps are initialized but before the first app is shown. This 52 * allows code to be executed after the apps have registered settings 53 * but before the app actually acts on those settings. 54 * 55 * @see ZmAppEvent.POST_STARTUP 56 */ 57 ZmAppEvent.PRE_STARTUP = "PRESTARTUP"; 58 59 /** 60 * Defines the event used to notify listeners post-startup. 61 */ 62 ZmAppEvent.POST_STARTUP = "POSTSTARTUP"; 63 /** 64 * Defines the event used to notify listeners pre-launch. 65 */ 66 ZmAppEvent.PRE_LAUNCH = "PRELAUNCH"; 67 /** 68 * Defines the event used to notify listeners post-launch. 69 */ 70 ZmAppEvent.POST_LAUNCH = "POSTLAUNCH"; 71 /** 72 * Defines the event used to notify listeners post-render. 73 */ 74 ZmAppEvent.POST_RENDER = "POSTRENDER"; 75 76 ZmAppEvent.ACTIVATE = "ACTIVATE"; 77 78 // Triggered after processing of an async response finishes 79 ZmAppEvent.RESPONSE = "RESPONSE"; 80 81 /** 82 * Returns a string representation of the object. 83 * 84 * @return {String} a string representation of the object 85 */ 86 ZmAppEvent.prototype.toString = 87 function() { 88 return "ZmAppEvent"; 89 }; 90