1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: agsdkdll.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
35 #if defined(WIN) || defined(WNT) || ( defined(OS2) && !defined( ICC ))
36 #define _SV_CALL _cdecl
37 #elif defined( ICC ) && defined( OS2 )
38 #define _SV_CALL __cdecl
44 #define AGSDKDLL_VERSION 2
46 typedef void* AgentInst
;
48 ////////////////////////////////////////////////////////////////////////////////
49 // Channel API Functions
52 enum AgentStreamType
{
57 typedef void (_SV_CALL
*FncChShutDownAgent
)(AgentInst pAg
);
59 typedef void (_SV_CALL
*FncChSetLastSuccUpd
)(AgentInst pAg
);
61 typedef void (_SV_CALL
*FncChGetChannelObj
)(AgentInst pAg
, const char* pURL
,
62 AgentStreamType eStreamType
, const char* pFileName
);
64 typedef void (_SV_CALL
*FncChAddChannelItem
)(AgentInst pAg
, const char* pName
,
65 const char* pTransmitter
, const char* pChannel
, unsigned short nUpdPeriode
,
66 const char* pAgentName
);
68 typedef void (_SV_CALL
*FncChDelChannelItem
)(AgentInst pAg
, const char* pChName
);
70 typedef void (_SV_CALL
*FncChSetTransmitter
)(AgentInst pAg
, const char* pChName
,
73 typedef void (_SV_CALL
*FncChSetChannel
)(AgentInst pAg
, const char* pChName
,
76 typedef void (_SV_CALL
*FncChSetChannelName
)(AgentInst pAg
, const char* pChName
,
77 const char* pNewChName
);
79 typedef void (_SV_CALL
*FncChSetUpdPeriode
)(AgentInst pAg
, const char* pChName
,
80 unsigned short nUpdPeriode
);
82 typedef void (_SV_CALL
*FncChSetChannelAgentName
)(AgentInst pAg
, const char* pChName
,
85 typedef void (_SV_CALL
*FncChSetUpdateTransmitter
)(AgentInst pAg
,
86 const char* pTransmitter
);
88 typedef const char* (_SV_CALL
*FncChGetAgentSourceURL
)(AgentInst pAg
);
92 unsigned short nVersion
;
93 FncChShutDownAgent fncShutDownAgent
;
94 FncChSetLastSuccUpd fncSetLastSuccUpd
;
95 FncChGetChannelObj fncGetChannelObj
;
96 FncChAddChannelItem fncAddChannelItem
;
97 FncChDelChannelItem fncDelChannelItem
;
98 FncChSetTransmitter fncSetTransmitter
;
99 FncChSetChannel fncSetChannel
;
100 FncChSetChannelName fncSetChannelName
;
101 FncChSetUpdPeriode fncSetUpdPeriode
;
102 FncChSetChannelAgentName fncSetChannelAgentName
;
103 FncChSetUpdateTransmitter fncSetUpdateTransmitter
;
104 FncChGetAgentSourceURL fncGetAgentSourceURL
;
107 ////////////////////////////////////////////////////////////////////////////////
108 // Agent API Functions
111 #if defined(WIN) || defined(WNT) || defined(OS2) || defined(UNX)
115 typedef void (_SV_CALL
*FncInitAgent
)(AgentInst
, ChannelApiFncs
*);
116 void _SV_CALL
InitAgent(AgentInst
, ChannelApiFncs
*);
118 typedef void (_SV_CALL
*FncShutDownAgent
)();
119 void _SV_CALL
ShutDownAgent();
123 typedef unsigned char (_SV_CALL
*FncNewDataPermission
)(const char*);
124 unsigned char _SV_CALL
NewDataPermission(const char*);
128 typedef void (_SV_CALL
*FncNewData
)(const char*, const char*);
129 void _SV_CALL
NewData(const char*, const char*);
131 // NotifyChannelObjFile
132 // URL, abs. Filename
133 typedef void (_SV_CALL
*FncNotifyChannelObjFile
)(const char*, const char*);
134 void _SV_CALL
NotifyChannelObjFile(const char*, const char*);
136 // NotifyChannelObjData
137 // URL, Buffer, Offset, Len, TotalLen
138 typedef void (_SV_CALL
*FncNotifyChannelObjData
)(const char*, void*, long, long, long);
139 void _SV_CALL
NotifyChannelObjData(const char*, void*, long, long, long);
141 typedef void (_SV_CALL
*FncRegisterChannels
)(AgentInst
, ChannelApiFncs
*);
142 void _SV_CALL
RegisterChannels(AgentInst
, ChannelApiFncs
*);
144 typedef void (_SV_CALL
*FncRegisterUpdateTransmitter
)(AgentInst
, ChannelApiFncs
*);
145 void _SV_CALL
RegisterUpdateTransmitter(AgentInst
, ChannelApiFncs
*);
147 #if defined(WIN) || defined(WNT) || defined(OS2) || defined(UNX)
151 #endif //_AGSDKDLL_HXX