~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to fpcsrc/packages/extra/palmunits/exglib.pp

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{$MACRO ON}
 
2
 
 
3
(******************************************************************************
 
4
 *
 
5
 * Copyright (c) 1997-2000 Palm, Inc. or its subsidiaries.
 
6
 * All rights reserved.
 
7
 *
 
8
 * File: ExgLib.h
 
9
 *
 
10
 * Release: Palm OS SDK 4.0 (63220)
 
11
 *
 
12
 * Description:
 
13
 *    Include file the Exchange Library interface. The Exchange Library is a
 
14
 *    generic interface to any number of librarys. Any Exchange Library
 
15
 *    MUST have entrypoint traps in exactly the order listed here.
 
16
 *    The System Exchange manager functions call these functions when
 
17
 *    applications make calls to the Exchange manager. Applications will
 
18
 *    usually not make direct calls to this API.
 
19
 *
 
20
 * History:
 
21
 *    5/23/97 Created by Gavin Peacock
 
22
 *
 
23
 *****************************************************************************)
 
24
 
 
25
unit exglib;
 
26
 
 
27
interface
 
28
 
 
29
uses  palmos, libtraps, exgmgr;
 
30
 
 
31
// special exchange mgr event key
 
32
const
 
33
  exgIntDataChr = $01ff;
 
34
 
 
35
//-----------------------------------------------------------------------------
 
36
//  Obx library call ID's. Each library call gets the trap number:
 
37
//   exgTrapXXXX which serves as an index into the library's dispatch table.
 
38
//   The constant sysLibTrapCustom is the first available trap number after
 
39
//   the system predefined library traps Open,Close,Sleep & Wake.
 
40
//
 
41
// WARNING!!! This order of these traps MUST match the order of the dispatch
 
42
//  table in and Exchange library!!!
 
43
//-----------------------------------------------------------------------------
 
44
 
 
45
type
 
46
  ExgLibTrapNumberEnum = Enum;
 
47
 
 
48
const
 
49
  exgLibTrapHandleEvent = sysLibTrapCustom;
 
50
  exgLibTrapConnect = Succ(exgLibTrapHandleEvent);
 
51
  exgLibTrapAccept = Succ(exgLibTrapConnect);
 
52
  exgLibTrapDisconnect = Succ(exgLibTrapAccept);
 
53
  exgLibTrapPut = Succ(exgLibTrapDisconnect);
 
54
  exgLibTrapGet = Succ(exgLibTrapPut);
 
55
  exgLibTrapSend = Succ(exgLibTrapGet);
 
56
  exgLibTrapReceive = Succ(exgLibTrapSend);
 
57
  exgLibTrapControl = Succ(exgLibTrapReceive);
 
58
  exgLibTrapRequest = Succ(exgLibTrapControl);
 
59
  exgLibTrapReserved1 = Succ(exgLibTrapRequest);
 
60
  exgLibTrapReserved2 = Succ(exgLibTrapReserved1);
 
61
  exgLibTrapReserved3 = Succ(exgLibTrapReserved2);
 
62
  exgLibTrapReserved4 = Succ(exgLibTrapReserved3);
 
63
  exgLibTrapReserved5 = Succ(exgLibTrapReserved4);
 
64
  exgLibTrapReserved6 = Succ(exgLibTrapReserved5);
 
65
  exgLibTrapReserved7 = Succ(exgLibTrapReserved6);
 
66
  exgLibTrapReserved8 = Succ(exgLibTrapReserved7);
 
67
  exgLibTrapReserved9 = Succ(exgLibTrapReserved8);
 
68
  exgLibTrapReserved10 = Succ(exgLibTrapReserved9);
 
69
  exgLibTrapLast = Succ(exgLibTrapReserved10);
 
70
 
 
71
(************************************************************
 
72
 * Net Library procedures.
 
73
 *************************************************************)
 
74
 
 
75
//--------------------------------------------------
 
76
// Library initialization, shutdown, sleep and wake
 
77
//--------------------------------------------------
 
78
// Open the library - enable server for receiving data.
 
79
function ExgLibOpen(libRefnum: UInt16): Err; syscall sysLibTrapOpen;
 
80
 
 
81
function ExgLibClose(libRefnum: UInt16): Err; syscall sysLibTrapClose;
 
82
 
 
83
function ExgLibSleep(libRefnum: UInt16): Err; syscall sysLibTrapSleep;
 
84
 
 
85
function ExgLibWake(libRefnum: UInt16): Err; syscall sysLibTrapWake;
 
86
 
 
87
//  MemHandle events that this library needs. This will be called by
 
88
//  sysHandle event when certain low level events are triggered.
 
89
function ExgLibHandleEvent(libRefnum: UInt16; eventP: Pointer): Boolean; syscall exgLibTrapHandleEvent;
 
90
 
 
91
//  Establish a new connection
 
92
function ExgLibConnect(libRefNum: UInt16; exgSocketP: ExgSocketPtr): Err; syscall exgLibTrapConnect;
 
93
 
 
94
// Accept a connection request from remote end
 
95
function ExgLibAccept(libRefnum: UInt16; exgSocketP: ExgSocketPtr): Err; syscall exgLibTrapAccept;
 
96
 
 
97
// Disconnect
 
98
function ExgLibDisconnect(libRefnum: UInt16; exgSocketP: ExgSocketPtr; error: Err): Err; syscall exgLibTrapDisconnect;
 
99
 
 
100
// Initiate a Put command. This passes the name and other information about
 
101
// an object to be sent
 
102
function ExgLibPut(libRefnum: UInt16; exgSocketP: ExgSocketPtr): Err; syscall exgLibTrapPut;
 
103
 
 
104
// Initiate a Get command. This requests an object from the remote end.
 
105
function ExgLibGet(libRefNum: UInt16; exgSocketP: ExgSocketPtr): Err; syscall exgLibTrapGet;
 
106
 
 
107
// Send data to remote end - called after a Put command
 
108
function ExgLibSend(libRefNum: UInt16; exgSocketP: ExgSocketPtr; const bufP: Pointer; const bufLen: UInt32; var errP: Err): UInt32; syscall exgLibTrapSend;
 
109
 
 
110
// Receive data from remote end -- called after Accept
 
111
function ExgLibReceive(libRefNum: UInt16; exgSocketP: ExgSocketPtr; bufP: Pointer; const bufSize: UInt32; var errP: Err): UInt32; syscall exgLibTrapReceive;
 
112
 
 
113
// Send various option commands to the Exg library
 
114
function ExgLibControl(libRefNum: UInt16; op: UInt16; valueP: Pointer; var valueLenP: UInt16): Err; syscall exgLibTrapControl;
 
115
 
 
116
// Tell the Exg library to check for incoming data
 
117
function ExgLibRequest(libRefNum: UInt16; socketP: ExgSocketPtr): Err; syscall exgLibTrapRequest;
 
118
 
 
119
implementation
 
120
 
 
121
end.