Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
FDEF.c
/************************************************************************************ |
P R O J E C T I N F O |
************************************************************************************* |
Project Name: Simon |
File Name: FDEF.c |
Description: Contains C code specific to the main definition code resource |
of a simple file transfer tool. |
Copyright © 1992 Apple Computer, Inc. |
All rights reserved. |
************************************************************************************* |
A U T H O R I D E N T I T Y |
************************************************************************************* |
Initials Name |
-------- ----------------------------------------------- |
CH Craig Hotchkiss |
************************************************************************************* |
R E V I S I O N H I S T O R Y |
************************************************************************************* |
Change History (most recent first): |
<0> 5/8/92 CH Creation date |
************************************************************************************/ |
/************************************************************************************ |
STANDARD Mac HEADERS |
************************************************************************************/ |
#ifdef DUMPFILENAME |
#pragma load DUMPFILENAME |
#else |
#define DoNotDump 1 |
#include Load.c |
#endif |
/************************************************************************************ |
Procedure: FDEF |
Purpose: |
Inputs: |
Outputs: |
************************************************************************************/ |
pascal long FDEF( FTHandle toolHandle, short message, |
long p1, long p2, long p3 ) |
{ |
long retValue = ftNotSupported; |
#if Debugging == 1 |
#if DefaultDebug == 1 |
Str255 tempString; |
#endif |
#endif |
#pragma unused ( p1, p2, p3 ) |
(**toolHandle).errCode = noErr; |
switch ( message ) { |
case ftInitMsg: |
/* ********************* |
Parameter Definitions |
********************* |
p1: Unused |
p2: Unused |
p3: Unused |
returns: FTErr in the form of a long indicating any failure. |
*/ |
#if Debugging == 1 |
#if ShowMessage == 1 |
DebugStr( "\p FDEF/ftInitMsg received.;g" ); |
#endif |
#endif |
break; |
case ftDisposeMsg: |
/* ********************* |
Parameter Definitions |
********************* |
p1: Unused |
p2: Unused |
p3: Unused |
returns: nothing |
*/ |
#if Debugging == 1 |
#if ShowMessage == 1 |
DebugStr( "\p FDEF/ftDisposeMsg received.;g" ); |
#endif |
#endif |
break; |
case ftSuspendMsg: |
/* ********************* |
Parameter Definitions |
********************* |
p1: Unused |
p2: Unused |
p3: Unused |
returns: nothing |
*/ |
#if Debugging == 1 |
#if ShowMessage == 1 |
DebugStr( "\p FDEF/ftSuspendMsg received.;g" ); |
#endif |
#endif |
break; |
case ftResumeMsg: |
/* ********************* |
Parameter Definitions |
********************* |
p1: Unused |
p2: Unused |
p3: Unused |
returns: nothing |
*/ |
#if Debugging == 1 |
#if ShowMessage == 1 |
DebugStr( "\p FDEF/ftResumeMsg received.;g" ); |
#endif |
#endif |
break; |
case ftMenuMsg: |
/* ********************* |
Parameter Definitions |
********************* |
p1: short menuID |
p2: short menuItem |
p3: Unused |
returns: FTErr in the form of a long indicating any failure. |
*/ |
#if Debugging == 1 |
#if ShowMessage == 1 |
DebugStr( "\p FDEF/ftMenuMsg received.;g" ); |
#endif |
#endif |
break; |
case ftEventMsg: |
/* ********************* |
Parameter Definitions |
********************* |
p1: EventRecord* myEvent |
p2: Unused |
p3: Unused |
returns: nothing |
*/ |
#if Debugging == 1 |
#if ShowMessage == 1 |
DebugStr( "\p FDEF/ftEventMsg received.;g" ); |
#endif |
#endif |
break; |
case ftActivateMsg: |
/* ********************* |
Parameter Definitions |
********************* |
p1: Unused |
p2: Unused |
p3: Unused |
returns: nothing |
*/ |
#if Debugging == 1 |
#if ShowMessage == 1 |
DebugStr( "\p FDEF/ftActivateMsg received.;g" ); |
#endif |
#endif |
break; |
case ftDeactivateMsg: |
/* ********************* |
Parameter Definitions |
********************* |
p1: Unused |
p2: Unused |
p3: Unused |
returns: nothing |
*/ |
#if Debugging == 1 |
#if ShowMessage == 1 |
DebugStr( "\p FDEF/ftDeactivateMsg received.;g" ); |
#endif |
#endif |
break; |
case ftGetErrorStringMsg: |
/* ********************* |
Parameter Definitions |
********************* |
p1: Unused |
p2: Unused |
p3: Unused |
returns: nothing |
*/ |
#if Debugging == 1 |
#if ShowMessage == 1 |
DebugStr( "\p FDEF/ftGetErrorStringMsg received.;g" ); |
#endif |
#endif |
break; |
case ftAbortMsg: |
/* ********************* |
Parameter Definitions |
********************* |
p1: Unused |
p2: Unused |
p3: Unused |
returns: FTErr in the form of a long indicating any failure. |
*/ |
#if Debugging == 1 |
#if ShowMessage == 1 |
DebugStr( "\p FDEF/ftAbortMsg received.;g" ); |
#endif |
#endif |
break; |
case ftStartMsg: |
/* ********************* |
Parameter Definitions |
********************* |
p1: Unused |
p2: Unused |
p3: Unused |
returns: FTErr in the form of a long indicating any failure. |
*/ |
#if Debugging == 1 |
#if ShowMessage == 1 |
DebugStr( "\p FDEF/ftStartMsg received.;g" ); |
#endif |
#endif |
break; |
case ftExecMsg: |
/* ********************* |
Parameter Definitions |
********************* |
p1: Unused |
p2: Unused |
p3: Unused |
returns: nothing |
*/ |
#if Debugging == 1 |
#if ShowMessage == 1 |
DebugStr( "\p FDEF/ftExecMsg received.;g" ); |
#endif |
#endif |
break; |
case ftSendMsg: |
/* ********************* |
Parameter Definitions |
********************* |
p1: Unused |
p2: Unused |
p3: Unused |
returns: nothing |
*/ |
#if Debugging == 1 |
#if ShowMessage == 1 |
DebugStr( "\p FDEF/ftSendMsg received.;g" ); |
#endif |
#endif |
break; |
case ftReceiveMsg: |
/* ********************* |
Parameter Definitions |
********************* |
p1: Unused |
p2: Unused |
p3: Unused |
returns: nothing |
*/ |
#if Debugging == 1 |
#if ShowMessage == 1 |
DebugStr( "\p FDEF/ftReceiveMsg received.;g" ); |
#endif |
#endif |
break; |
default: |
#if Debugging == 1 |
#if DefaultDebug == 1 |
DebugStr( "\p FDEF - Did not understand message -- ;g" ); |
NumToString( (long) message, tempString ); |
DebugStr( tempString ); |
#endif |
#endif |
break; |
} /* message switch */ |
return ( retValue ); |
} /*FDEF*/ |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-14