1 /**
  2  * Copyright (C) 2012-2013 KO GmbH <copyright@kogmbh.com>
  3  *
  4  * @licstart
  5  * This file is part of WebODF.
  6  *
  7  * WebODF is free software: you can redistribute it and/or modify it
  8  * under the terms of the GNU Affero General Public License (GNU AGPL)
  9  * as published by the Free Software Foundation, either version 3 of
 10  * the License, or (at your option) any later version.
 11  *
 12  * WebODF is distributed in the hope that it will be useful, but
 13  * WITHOUT ANY WARRANTY; without even the implied warranty of
 14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 15  * GNU Affero General Public License for more details.
 16  *
 17  * You should have received a copy of the GNU Affero General Public License
 18  * along with WebODF.  If not, see <http://www.gnu.org/licenses/>.
 19  * @licend
 20  *
 21  * @source: http://www.webodf.org/
 22  * @source: https://github.com/kogmbh/WebODF/
 23  */
 24 
 25 /*global ops */
 26 /*jslint emptyblock: true, unparam: true */
 27 
 28 /**
 29  * A document that keeps all data related to the mapped document.
 30  * @interface
 31  */
 32 ops.Document = function Document() { "use strict"; };
 33 /**
 34  * @return {!Array.<string>}
 35  */
 36 ops.Document.prototype.getMemberIds = function () { "use strict"; };
 37 /**
 38  * @param {!string} memberid
 39  * @return {!boolean}
 40  */
 41 ops.Document.prototype.removeCursor = function (memberid) { "use strict"; };
 42 /**
 43  * @return {!Element}
 44  */
 45 ops.Document.prototype.getDocumentElement = function () { "use strict"; };
 46 /**
 47  * Return the element where the document content begins.
 48  * Document content means the body of the document. In the case of ODF this is
 49  * office:text, office:spreadsheet, office:presentation. For most XML documents
 50  * getRootNode() will return the same node as getDocumentElement().
 51  * @return {!Element}
 52  */
 53 ops.Document.prototype.getRootNode = function () { "use strict"; };
 54 /**
 55  * @return {!Document}
 56  */
 57 ops.Document.prototype.getDOMDocument = function () { "use strict"; };
 58 /**
 59  * @return {!Element}
 60  */
 61 ops.Document.prototype.cloneDocumentElement = function () { "use strict"; };
 62 /**
 63  * @param {!Element} element
 64  * @return {undefined}
 65  */
 66 ops.Document.prototype.setDocumentElement = function (element) { "use strict"; };
 67 /**
 68  * @param {!string} eventid
 69  * @param {!Function} cb
 70  * @return {undefined}
 71  */
 72 ops.Document.prototype.subscribe = function (eventid, cb) { "use strict"; };
 73 /**
 74  * @param {!string} eventid
 75  * @param {!Function} cb
 76  * @return {undefined}
 77  */
 78 ops.Document.prototype.unsubscribe = function (eventid, cb) { "use strict"; };
 79 // vim:expandtab
 80 /**
 81  * @return {!ops.Canvas}
 82  */
 83 ops.Document.prototype.getCanvas = function () { "use strict"; };
 84 /**
 85  * @param {string|!Node} inputMemberId
 86  * @return {!core.PositionFilter}
 87  */
 88 ops.Document.prototype.createRootFilter = function (inputMemberId) { "use strict"; };
 89 /**
 90  * @param {!Node} rootNode
 91  * @return {!core.PositionIterator}
 92  */
 93 ops.Document.prototype.createPositionIterator = function (rootNode) { "use strict"; };
 94 /**
 95  * @param {!string} memberid
 96  * @return {!boolean}
 97  */
 98 ops.Document.prototype.hasCursor = function (memberid) { "use strict"; };
 99 
100 /**@const*/
101 ops.Document.signalCursorAdded =   "cursor/added";
102 /**@const*/
103 ops.Document.signalCursorRemoved = "cursor/removed";
104 /**@const*/
105 ops.Document.signalCursorMoved =   "cursor/moved";
106 /**@const*/
107 ops.Document.signalMemberAdded =   "member/added";
108 /**@const*/
109 ops.Document.signalMemberUpdated = "member/updated";
110 /**@const*/
111 ops.Document.signalMemberRemoved = "member/removed";
112