PRemotePrintJob.ipdl (1969B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */ 3 /* This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 include protocol PContent; 8 9 namespace mozilla { 10 namespace layout { 11 12 [ChildImpl=virtual, ParentImpl=virtual] 13 async protocol PRemotePrintJob 14 { 15 manager PContent; 16 17 both: 18 // Tell either side to abort printing and clean up. 19 async AbortPrint(nsresult aRv); 20 21 parent: 22 // Initialize the real print device with the given information. 23 async InitializePrint(nsString aDocumentTitle, 24 int32_t aStartPage, int32_t aEndPage); 25 26 // Translate the page recording writen into |fd| and play back the events to 27 // the real print device. 28 async ProcessPage(int32_t aWidthInPoints, int32_t aHeightInPoints, uint64_t[] aDeps); 29 30 // This informs the real print device that we've finished, so it can trigger 31 // the actual print. 32 async FinalizePrint(); 33 34 // Report a progress change to listeners in the parent process. 35 async ProgressChange(long aCurSelfProgress, 36 long aMaxSelfProgress, 37 long aCurTotalProgress, 38 long aMaxTotalProgress); 39 40 // Report a status change to listeners in the parent process. 41 async StatusChange(nsresult aStatus); 42 43 child: 44 // Inform the child that the print has been initialized in the parent or has 45 // failed with result aRv. Includes a file descriptor which the first page 46 // can be written to. 47 async PrintInitializationResult(nsresult aRv, FileDescriptor aFd); 48 49 // Inform the child that the latest page has been processed remotely. Includes 50 // a file descriptor which the next page can be written to. 51 async PageProcessed(FileDescriptor aFd); 52 53 async __delete__(); 54 }; 55 56 } // namespace layout 57 } // namespace mozilla