home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / maestro / source / ntwrkprt / receiver.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-15  |  4.1 KB  |  110 lines

  1. /*
  2.  * Copyright (c) 1990, 1991 Stanford University
  3.  *
  4.  * Permission to use, copy, modify, and distribute this software and 
  5.  * its documentation for any purpose is hereby granted without fee, provided
  6.  * that (i) the above copyright notices and this permission notice appear in
  7.  * all copies of the software and related documentation, and (ii) the name
  8.  * Stanford may not be used in any advertising or publicity relating to
  9.  * the software without the specific, prior written permission of
  10.  * Stanford.
  11.  * 
  12.  * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
  13.  * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
  14.  * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
  15.  *
  16.  * IN NO EVENT SHALL STANFORD BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
  17.  * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
  18.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT
  19.  * ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY,
  20.  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  21.  * SOFTWARE.
  22.  */
  23.  
  24. /* $Header: /Source/Media/drapeau/NetworkProtocol/RCS/Receiver.h,v 1.17 92/05/29 12:40:37 drapeau Exp $ */
  25. /* $Log:    Receiver.h,v $
  26.  * Revision 1.17  92/05/29  12:40:37  drapeau
  27.  * Changed the name of the "Selection" structure to "MAESelection",
  28.  * to avoid name conflicts with other software packages and toolkits
  29.  * that might also define a "Selection" structure.
  30.  * 
  31.  * Revision 1.16  91/09/26  23:23:35  drapeau
  32.  * Modified definition of CreateSocketOnPort() so that it takes a pointer to
  33.  * integer.
  34.  * 
  35.  * Revision 1.15  91/09/18  12:43:59  drapeau
  36.  * - Modified the definition of ReceiverGetPortFromName() to return a list of matching Ports, rather
  37.  *   than a single Port.
  38.  * - Changed the name of the major include file from LinkProtocol.h to MAEstro.h, in keeping with the
  39.  *   project name.
  40.  * 
  41.  * Revision 1.14  91/09/03  16:57:41  drapeau
  42.  * Modified the definition of ReceiverGetPortFromName() so that it
  43.  * returns a Port* instead of a void*.
  44.  * 
  45.  * Revision 1.13  91/06/19  14:08:20  drapeau
  46.  * Added support for five new messages:
  47.  *  - PauseSelection
  48.  *  - ResumeSelection
  49.  *  - HideApplication
  50.  *  - ShowApplication
  51.  *  - GetAppIcon
  52.  * Also, replaced the "PerformPartialSelection" message with
  53.  * "HaltSelection" message.
  54.  * 
  55.  * Revision 1.12  91/06/17  18:17:21  drapeau
  56.  * Added copyright notice.
  57.  * 
  58.  * Revision 1.11  1991/02/28  07:17:41  drapeau
  59.  * No code changes; this version uses a new version numbering scheme and a new
  60.  * version of RCS.
  61.  *
  62.  * Revision 1.1  90/10/24  18:26:11  drapeau
  63.  * Initial revision
  64.  *  */
  65.  
  66. #ifndef _Receiver_
  67. #define _Receiver_
  68.  
  69. static char ReceiverHeaderRcsid[] = "$Header: /Source/Media/drapeau/NetworkProtocol/RCS/Receiver.h,v 1.17 92/05/29 12:40:37 drapeau Exp $";
  70.  
  71. #include <MAEstro.h>
  72. #include <Sender.h>
  73.  
  74. typedef struct _Receiver
  75. {
  76.   Port        receivePort;
  77.   int        receiveSocket;
  78.   int        createErrorCode;
  79.   SVCXPRT*    transport;
  80. } Receiver;
  81.  
  82.  
  83. Receiver*    NewReceiver(Sender* portMgrSender, char* appName, int receivingPort);
  84. void        DestroyReceiver(Sender* portMgrSender, Receiver* receiver);
  85. void        ReceiverListenForMessages();
  86. int        ReceiverGetReceiverSocket(Receiver* receiver);
  87. void        ReceiverOpenDocument(char** docName);
  88. char**        ReceiverGetCurrentDocName(void* unusedArg);
  89. MAESelection*    ReceiverGetSelection(void* unusedArg);
  90. void        ReceiverSetSelection(MAESelection* selection);
  91. void        ReceiverPerformSelection(void* unusedArg);
  92. void        ReceiverConnectWithPortMgr(Port* app);
  93. PortArray*    ReceiverGetOpenApps(void* unusedArg);
  94. PortArray*    ReceiverGetPortFromName(Port* appPort);
  95. void        ReceiverDispatchMessage(struct svc_req* requestPtr, SVCXPRT* transport);
  96. void        ReceiverDisconnectFromPortMgr(Port* appPort);
  97. void        ReceiverPing(void* unusedArg);
  98. void        ReceiverHaltSelection(void* unusedArg);
  99. void        ReceiverPauseSelection(void* unusedArg);
  100. void        ReceiverResumeSelection(void* unusedArg);
  101. void        ReceiverHideApplication(void* unusedArg);
  102. void        ReceiverShowApplication(void* unusedArg);
  103. IconData*    ReceiverGetAppIcon(void* unusedArg);
  104. void        BuildDispatchTable(DispatchTable* table);
  105. int        CreateSocketOnPort(int* portNumber);
  106.  
  107. extern DispatchTable ReceiverDispatchTable;
  108.  
  109. #endif
  110.