PigsIDL.idl 52 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342
  1. import "ScrRun.idl";
  2. import "AGCIDL.idl";
  3. /////////////////////////////////////////////////////////////////////////////
  4. // Forward Declarations
  5. enum dispid_PigsIDL;
  6. enum PigState;
  7. enum PigMapType;
  8. enum PigLobbyMode;
  9. enum PigThrust;
  10. interface IPigBehaviorType;
  11. interface IPigBehaviorTypes;
  12. interface IPigBehaviorScriptType;
  13. interface IPigBehaviorHost;
  14. interface IPigBehavior;
  15. interface IPigBehaviors;
  16. interface IPigBehaviorStack;
  17. interface IPig;
  18. interface IPigs;
  19. interface IPigTeam;
  20. interface IPigTeams;
  21. interface IPigMissionParams;
  22. interface IPigMissionParamsPrivate;
  23. interface IPigMission;
  24. interface IPigMissions;
  25. interface IPigLobby;
  26. interface IPigLobbies;
  27. interface IPigSession;
  28. interface IPigSessionEvents;
  29. dispinterface _IPigSessionEvents;
  30. interface IPigEvent;
  31. interface IPigTimer;
  32. interface IPigShip;
  33. interface IPigShipEvent;
  34. interface IPigVector;
  35. interface IPigAccount;
  36. interface IPigAccountDispenser;
  37. interface IPigHullTypes;
  38. /////////////////////////////////////////////////////////////////////////////
  39. // {secret}
  40. // DISPID Enumeration
  41. //
  42. // Notes:
  43. // Never remove one of these enumeration values without replacing it
  44. // with a dispid_Reservedx value to take its place, where x is the next
  45. // reserved index not in use.
  46. //
  47. // Always add new values to the end of the enumeration so that these values
  48. // will never change.
  49. //
  50. enum dispid_PigsIDL
  51. {
  52. dispid_PigsIDL_Begin = dispid_AGCIDL_End,
  53. dispid_SessionInfo,
  54. dispid_Sessions,
  55. dispid_ScriptDir,
  56. dispid_BehaviorTypes,
  57. dispid_Lobbies,
  58. dispid_Pigs,
  59. dispid_Name,
  60. dispid_Behaviors,
  61. dispid_IsScript,
  62. dispid_InvokeCommands,
  63. dispid_FilePathName,
  64. dispid_FileName,
  65. dispid_FileAttributes,
  66. dispid_FileModifiedTime,
  67. dispid_FileText,
  68. dispid_ScriptText,
  69. dispid_BehaviorType,
  70. dispid_Pig,
  71. dispid_IsActive,
  72. dispid_ProgID,
  73. dispid_CLSID,
  74. dispid_BaseBehaviorType,
  75. dispid_BaseBehavior,
  76. dispid_AppearsValid,
  77. dispid_EventHandler,
  78. dispid_RepetitionCount,
  79. dispid_Interval,
  80. dispid_PigState,
  81. dispid_PigStateName,
  82. dispid_Stack,
  83. dispid_Host,
  84. dispid_TeamCount,
  85. dispid_MaxTeamPlayers,
  86. dispid_MinTeamPlayers,
  87. dispid_MapType,
  88. dispid_ID,
  89. dispid_LobbyServer,
  90. dispid_AllStop,
  91. dispid_Face,
  92. dispid_IsThrusting,
  93. dispid_Throttle,
  94. dispid_Pitch,
  95. dispid_Yaw,
  96. dispid_Roll,
  97. dispid_Names,
  98. dispid_NamesAvailable,
  99. dispid_NamesInUse,
  100. dispid_NextAvailable,
  101. dispid_MissionServer,
  102. dispid_MaxPigs,
  103. dispid_AccountDispenser,
  104. dispid_Password,
  105. dispid_X,
  106. dispid_Y,
  107. dispid_Z,
  108. dispid_SetXYZ,
  109. dispid_ExpirationExpression,
  110. dispid_UpdatesPerSecond,
  111. dispid_Timer,
  112. dispid_IsExpired,
  113. dispid_Action,
  114. dispid_AutoAction,
  115. dispid_HullTypes,
  116. dispid_FireWeapon,
  117. dispid_FireMissile,
  118. dispid_DropMine,
  119. dispid_ActiveWeapon,
  120. dispid_IsFiringWeapon,
  121. dispid_IsFiringMissile,
  122. dispid_IsDroppingMine,
  123. dispid_SellAllParts,
  124. dispid_BuyHull,
  125. dispid_BuyDefaultLoadout,
  126. dispid_RipCord,
  127. dispid_PitchUp,
  128. dispid_PitchDown,
  129. dispid_YawLeft,
  130. dispid_YawRight,
  131. dispid_RollLeft,
  132. dispid_RollRight,
  133. dispid_Cloak,
  134. dispid_AcceptCommand,
  135. dispid_ClearCommand,
  136. dispid_Defend,
  137. dispid_IsRipCording,
  138. dispid_IsCloaked,
  139. dispid_LockVector,
  140. dispid_IsVectorLocked,
  141. dispid_QueuedCommand,
  142. dispid_AcceptedCommand,
  143. dispid_AutoAcceptCommands,
  144. dispid_AutoPilot,
  145. dispid_Money,
  146. dispid_ArtPath,
  147. dispid_CommitSuicide,
  148. dispid_CommandLine,
  149. dispid_Version,
  150. dispid_ProcessID,
  151. dispid_OnEvent,
  152. dispid_ActivateAllEvents,
  153. dispid_DeactivateAllEvents,
  154. dispid_InterruptionExpression,
  155. dispid_EventLog,
  156. dispid_AccountServer,
  157. dispid_ShipAngleThreshold1,
  158. dispid_ShipAngleThreshold2,
  159. dispid_ShipAngleThreshold3,
  160. dispid_ShipDistanceThreshold1,
  161. dispid_ShipDistanceThreshold2,
  162. dispid_ShipDistanceThreshold3,
  163. dispid_ShipsUpdateLatencyThreshold1,
  164. dispid_ShipsUpdateLatencyThreshold2,
  165. dispid_ShipsUpdateLatencyThreshold3,
  166. dispid_ZoneAuthServer,
  167. dispid_ZoneAuthTimeout,
  168. dispid_LobbyMode,
  169. dispid_PigsIDL_End = dispid_PigsIDL_Begin + 0x1000
  170. };
  171. /////////////////////////////////////////////////////////////////////////////
  172. // PigState
  173. [
  174. uuid(15219781-D562-11d2-9646-00C04F68DEB0),
  175. helpstring("Constants for pig player states.")
  176. ]
  177. typedef [v1_enum] enum PigState
  178. {
  179. PigState_NonExistant,
  180. PigState_LoggingOn,
  181. PigState_LoggingOff,
  182. PigState_MissionList,
  183. PigState_CreatingMission,
  184. PigState_JoiningMission,
  185. PigState_QuittingMission,
  186. PigState_TeamList,
  187. PigState_JoiningTeam,
  188. PigState_WaitingForMission,
  189. PigState_Docked,
  190. PigState_Launching,
  191. PigState_Flying,
  192. PigState_Terminated,
  193. } PigState;
  194. /////////////////////////////////////////////////////////////////////////////
  195. [
  196. object, dual, pointer_default(unique), nonextensible,
  197. uuid(2942EC81-D0DC-11d2-9646-00C04F68DEB0),
  198. helpstring("Interface to a pig behavior type object.")
  199. ]
  200. interface IPigBehaviorType : IDispatch
  201. {
  202. [propget, id(dispid_InvokeCommands), helpstring("Gets the collection of command strings that will invoke this behavior.")]
  203. HRESULT InvokeCommands([out, retval] ITCStrings** ppStrings);
  204. [propget, id(DISPID_VALUE), helpstring("Gets the name of this behavior type.")]
  205. HRESULT Name([out, retval] BSTR* pbstrName);
  206. [propget, id(dispid_Description), helpstring("Gets the description of this behavior type.")]
  207. HRESULT Description([out, retval] BSTR* pbstrDescription);
  208. [propget, id(dispid_Behaviors), helpstring("Gets the collection of pig behavior objects currently referencing this behavior type.")]
  209. HRESULT Behaviors([out, retval] IPigBehaviors** ppBehaviors);
  210. [propget, id(dispid_IsScript), helpstring("Gets the indicator of whether or not this object is based on a script or not.")]
  211. HRESULT IsScript([out, retval] VARIANT_BOOL* pbIsScript);
  212. [propget, id(dispid_BaseBehaviorType), helpstring("Gets the behavior type that serves as this one's base class.")]
  213. HRESULT BaseBehaviorType([out, retval] IPigBehaviorType** ppBaseType);
  214. [propput, helpstring("Gets/sets the flag indicating whether or not the script has encountered an error yet.")]
  215. HRESULT AppearsValid([in] VARIANT_BOOL bAppearsValid);
  216. [propget, id(dispid_AppearsValid)]
  217. HRESULT AppearsValid([out, retval] VARIANT_BOOL* pbAppearsValid);
  218. }; // End: interface IPigBehaviorType : IDispatch
  219. /////////////////////////////////////////////////////////////////////////////
  220. [
  221. object, dual, pointer_default(unique), nonextensible,
  222. uuid(29E0A261-CC16-11d2-9646-00C04F68DEB0),
  223. helpstring("Interface to a collection of pig behavior script objects.")
  224. ]
  225. interface IPigBehaviorTypes : ITCCollection
  226. {
  227. [propget, id(DISPID_VALUE), helpstring("Gets an item from the collection. Takes an argument, index, that is either the 0-relative index into the collection, the name of the behavior, or one of the invoke commands of the behavior.")]
  228. HRESULT Item([in] VARIANT* pvIndex, [out, retval] IPigBehaviorType** ppBehaviorType);
  229. }; // End: interface IPigBehaviorTypes : ITCCollection
  230. /////////////////////////////////////////////////////////////////////////////
  231. [
  232. object, dual, pointer_default(unique), nonextensible,
  233. uuid(29E0A260-CC16-11d2-9646-00C04F68DEB0),
  234. helpstring("Interface to a pig behavior script object.")
  235. ]
  236. interface IPigBehaviorScriptType : IPigBehaviorType
  237. {
  238. [propget, id(dispid_FilePathName), helpstring("Gets the path and name of the script file that defines this behavior.")]
  239. HRESULT FilePathName([out, retval] BSTR* pbstrFilePathName);
  240. [propget, id(dispid_FileName), helpstring("Gets the name of the script file that defines this behavior.")]
  241. HRESULT FileName([out, retval] BSTR* pbstrFileName);
  242. [propget, id(dispid_FileModifiedTime), helpstring("Gets the time (UTC) that the script file was last modified.")]
  243. HRESULT FileModifiedTime([out, retval] DATE* pdate);
  244. [propget, id(dispid_FileAttributes), helpstring("Gets the attributes of the script file.")]
  245. HRESULT FileAttributes([out, retval] FileAttributes* peFileAttributes);
  246. [propget, id(dispid_FileText), helpstring("Gets the text of the entire script file.")]
  247. HRESULT FileText([out, retval] BSTR* pbstrFileText);
  248. [propget, id(dispid_ScriptText), helpstring("Gets the text of the script sections within the file.")]
  249. HRESULT ScriptText([out, retval] ITCStrings** ppScriptStrings);
  250. [propget, id(dispid_ProgID), helpstring("Gets the Prog ID of the Active Scripting engine used to parse/execute this script.")]
  251. HRESULT ScriptEngineProgID([out, retval] BSTR* pbstrProgID);
  252. [propget, id(dispid_CLSID), helpstring("Gets the CLSID of the Active Scripting engine used to parse/execute this script.")]
  253. HRESULT ScriptEngineCLSID([out, retval] BSTR* pbstrCLSID);
  254. }; // End: interface IPigBehaviorScriptType : IDispatch
  255. /////////////////////////////////////////////////////////////////////////////
  256. [
  257. object, dual, pointer_default(unique), nonextensible,
  258. uuid(15219786-D562-11d2-9646-00C04F68DEB0),
  259. helpstring("Interface to a pig behavior host object.")
  260. ]
  261. interface IPigBehaviorHost : IDispatch
  262. {
  263. [helpstring("Useful test method that beeps as specified.")]
  264. HRESULT Beep([in] long nFrequency, [in] long nDuration);
  265. [helpstring("Creates a new pig object with the specified behavior type.")]
  266. HRESULT CreatePig([in, defaultvalue("Default")] BSTR bstrType,
  267. [in, defaultvalue("")] BSTR bstrCommandLine, [out, retval] IPig** ppPig);
  268. [helpstring("Useful test method that echoes the specified text to the debugger output.")]
  269. HRESULT Trace([in] BSTR bstrText);
  270. [propget, helpstring("Gets the textual name of the specified pig state.")]
  271. HRESULT StateName([in] PigState ePigState, [out, retval] BSTR* pbstrPigState);
  272. [helpstring("Generates a random integer between 0 and 32,767.")]
  273. HRESULT Random([out, retval] short* pnRandom);
  274. }; // End: interface IPigBehaviorHost : IDispatch
  275. /////////////////////////////////////////////////////////////////////////////
  276. [
  277. object, dual, pointer_default(unique), nonextensible,
  278. uuid(10AB179C-C6FA-11d2-85C9-00C04F68DEB0),
  279. helpstring("Interface to a pig behavior object.")
  280. ]
  281. interface IPigBehavior : IDispatch
  282. {
  283. ///////////////////////////////////////////////////////////////////////////
  284. // Infrastructure Properties
  285. [propget, id(dispid_BehaviorType), helpstring("Gets the object that describes this class of behavior.")]
  286. HRESULT BehaviorType([out, retval] IPigBehaviorType** ppType);
  287. [propget, id(dispid_BaseBehavior), helpstring("Get the behavior, if any, that serve's as the this one's base class.")]
  288. HRESULT BaseBehavior([out, retval] IDispatch** ppBaseBehavior);
  289. [propget, id(dispid_Pig), helpstring("Gets the pig player object using this behavior instance.")]
  290. HRESULT Pig([out, retval] IPig** ppPig);
  291. [propget, id(dispid_Host), helpstring("Gets the object used to access the rest of the Pigs object model.")]
  292. HRESULT Host([out, retval] IPigBehaviorHost** ppHost);
  293. [propget, id(dispid_IsActive), helpstring("Gets the indicator of whether or not this behaior is the one currently active for the pig player object.")]
  294. HRESULT IsActive([out, retval] VARIANT_BOOL* pbIsActive);
  295. [propget, id(DISPID_VALUE), helpstring("Gets the dictionary containing the behavior-defined properties.")]
  296. HRESULT Properties([out, retval] IDictionary** ppProperties);
  297. [propget, id(dispid_Timer), helpstring("Gets the timer for which the event expression is currently executing, if any")]
  298. HRESULT Timer([out, retval] IPigTimer** ppTimer);
  299. [propget, id(dispid_CommandLine), helpstring("Gets the command line text used to activate the behvaior, if any.")]
  300. HRESULT CommandLine([out, retval] BSTR* pbstrCommandLine);
  301. ///////////////////////////////////////////////////////////////////////////
  302. // Infrastructure Methods
  303. [helpstring("Creates a new timer object.")]
  304. HRESULT CreateTimer([in] float fInterval, [in] BSTR bstrEventExpression,
  305. [in, defaultvalue(-1)] long nRepetitions,
  306. [in, defaultvalue("")] BSTR bstrName,
  307. [out, retval] IPigTimer** ppTimer);
  308. ///////////////////////////////////////////////////////////////////////////
  309. // Activation / Deactivation Response Methods
  310. [helpstring("Called when this behavior becomes a pig's active behavior.")]
  311. HRESULT OnActivate([in] IPigBehavior* pPigDeactived);
  312. [helpstring("Called when this behavior is deactivated as a pig's active behavior.")]
  313. HRESULT OnDeactivate([in] IPigBehavior* pPigActivated);
  314. ///////////////////////////////////////////////////////////////////////////
  315. // State Transition Response Methods
  316. [helpstring("Called when the state of the pig has changed to PigState_NonExistant.")]
  317. HRESULT OnStateNonExistant([in] PigState eStatePrevious);
  318. [helpstring("Called when the state of the pig has changed to PigState_LoggingOn.")]
  319. HRESULT OnStateLoggingOn([in] PigState eStatePrevious);
  320. [helpstring("Called when the state of the pig has changed to PigState_LoggingOff.")]
  321. HRESULT OnStateLoggingOff([in] PigState eStatePrevious);
  322. [helpstring("Called when the state of the pig has changed to PigState_MissionList.")]
  323. HRESULT OnStateMissionList([in] PigState eStatePrevious);
  324. [helpstring("Called when the state of the pig has changed to PigState_CreatingMission.")]
  325. HRESULT OnStateCreatingMission([in] PigState eStatePrevious);
  326. [helpstring("Called when the state of the pig has changed to PigState_JoiningMission.")]
  327. HRESULT OnStateJoiningMission([in] PigState eStatePrevious);
  328. [helpstring("Called when the state of the pig has changed to PigState_QuittingMission.")]
  329. HRESULT OnStateQuittingMission([in] PigState eStatePrevious);
  330. [helpstring("Called when the state of the pig has changed to PigState_TeamList.")]
  331. HRESULT OnStateTeamList([in] PigState eStatePrevious);
  332. [helpstring("Called when the state of the pig has changed to PigState_JoiningTeam.")]
  333. HRESULT OnStateJoiningTeam([in] PigState eStatePrevious);
  334. [helpstring("Called when the state of the pig has changed to PigState_WaitingForMission.")]
  335. HRESULT OnStateWaitingForMission([in] PigState eStatePrevious);
  336. [helpstring("Called when the state of the pig has changed to PigState_Docked.")]
  337. HRESULT OnStateDocked([in] PigState eStatePrevious);
  338. [helpstring("Called when the state of the pig has changed to PigState_Launching.")]
  339. HRESULT OnStateLaunching([in] PigState eStatePrevious);
  340. [helpstring("Called when the state of the pig has changed to PigState_Flying.")]
  341. HRESULT OnStateFlying([in] PigState eStatePrevious);
  342. [helpstring("Called when the state of the pig has changed to PigState_Terminated.")]
  343. HRESULT OnStateTerminated([in] PigState eStatePrevious);
  344. ///////////////////////////////////////////////////////////////////////////
  345. // TODO: Game Response Methods
  346. [helpstring("Called when the Pig's current mission begins.")]
  347. HRESULT OnMissionStarted();
  348. [helpstring("Called when the Pig receives chat text.")]
  349. HRESULT OnReceiveChat([in] BSTR bstrText, [in] IAGCShip* pShipSender,
  350. [out, retval] VARIANT_BOOL* pbHandled);
  351. [helpstring("Called when any ship takes damage.")]
  352. HRESULT OnShipDamaged([in] IAGCShip* pShip, [in] IAGCModel* pModelLauncher,
  353. [in] float fAmount, [in] float fLeakage,
  354. [in] IAGCVector* pVector1, [in] IAGCVector* pVector2);
  355. [helpstring("Called when the Pig ship is killed.")]
  356. HRESULT OnShipKilled([in] IAGCModel* pModelLauncher, [in] float fAmount,
  357. [in] IAGCVector* pVector1, [in] IAGCVector* pVector2);
  358. [helpstring("Called when the Pig ship is transported to a new Sector.")]
  359. HRESULT OnSectorChange([in] IAGCSector* pSectorOld,
  360. [in] IAGCSector* pSectorNew);
  361. [helpstring("Called when the Pig ship hits an Aleph.")]
  362. HRESULT OnAlephHit([in] IAGCAleph* pAleph);
  363. }; // End: interface IPigBehavior : IDispatch
  364. /////////////////////////////////////////////////////////////////////////////
  365. [
  366. object, dual, pointer_default(unique), nonextensible,
  367. uuid(16AA8204-C6FA-11d2-85C9-00C04F68DEB0),
  368. helpstring("Interface to a collection of pig behavior objects.")
  369. ]
  370. interface IPigBehaviors : ITCCollection
  371. {
  372. }; // End: interface IPigBehaviors : ITCCollection
  373. /////////////////////////////////////////////////////////////////////////////
  374. [
  375. object, dual, pointer_default(unique), nonextensible,
  376. uuid(15219782-D562-11d2-9646-00C04F68DEB0),
  377. helpstring("Interface to a stack of pig behavior objects.")
  378. ]
  379. interface IPigBehaviorStack : ITCCollection
  380. {
  381. [helpstring("Creates a new behavior of the specified type and pushes it onto the top of the behavior stack.")]
  382. HRESULT Push([in] BSTR bstrType, [in, defaultvalue("")] BSTR bstrCommandLine,
  383. [out, retval] IPigBehavior** ppBehavior);
  384. [helpstring("Pops the top-most behavior off the stack, unless there is only one behavior remaining on the stack.")]
  385. HRESULT Pop();
  386. [propget, id(DISPID_VALUE), helpstring("Gets a reference to a behavior on the stack without removing it from the stack.")]
  387. HRESULT Top([in, defaultvalue(0)] long nFromTop,
  388. [out, retval] IPigBehavior** ppBehavior);
  389. [propget, helpstring("Gets the pig object which owns this behavior stack.")]
  390. HRESULT Pig([out, retval] IPig** ppPig);
  391. }; // End: interface IPigBehaviorStack : ITCCollection
  392. /////////////////////////////////////////////////////////////////////////////
  393. [
  394. object, dual, pointer_default(unique), nonextensible,
  395. uuid(01B61700-C6FA-11d2-85C9-00C04F68DEB0),
  396. helpstring("Interface to a pig player object.")
  397. ]
  398. interface IPig : IDispatch
  399. {
  400. [propget, id(dispid_PigState), helpstring("Gets the current state of the pig.")]
  401. HRESULT PigState([out, retval] PigState* pePigState);
  402. [propget, id(dispid_PigStateName), helpstring("Gets the textual name of the state of the pig.")]
  403. HRESULT PigStateName([out, retval] BSTR* pbstrPigState);
  404. [propget, id(dispid_Stack), helpstring("Gets the stack of behaviors associated with this pig.")]
  405. HRESULT Stack([out, retval] IPigBehaviorStack** ppStack);
  406. [propget, id(DISPID_VALUE), helpstring("Gets the character name of the pig.")]
  407. HRESULT Name([out, retval] BSTR* pbstrName);
  408. [propget, helpstring("Gets the ship object of the pig.")]
  409. HRESULT Ship([out, retval] IPigShip** ppShip);
  410. [propput, helpstring("Gets/sets the number of times per second that the IGC layer is updated.")]
  411. HRESULT UpdatesPerSecond([in] long nPerSecond);
  412. [propget, id(dispid_UpdatesPerSecond)]
  413. HRESULT UpdatesPerSecond([out, retval] long* pnPerSecond);
  414. // TODO: Move to IAGCStation interface, when developed
  415. [propget, id(dispid_HullTypes), helpstring("Gets the collection of hull types available to this pig.")]
  416. HRESULT HullTypes([out, retval] IPigHullTypes** ppHullTypes);
  417. [propget, id(dispid_Money), helpstring("Gets this pig's liquid worth.")]
  418. HRESULT Money([out, retval] AGCMoney* pnMoney);
  419. [helpstring("Logs on to the mission server.")]
  420. HRESULT Logon();
  421. [helpstring("Logs off from the lobby server.")]
  422. HRESULT Logoff();
  423. [helpstring("Creates (and joins) a new mission with the specified parameters.")]
  424. HRESULT CreateMission([in] IPigMissionParams* pMissionParams);
  425. [helpstring("Joins a mission, which may be specified by name, by a buddy player, or not at all.")]
  426. HRESULT JoinMission([in, defaultvalue("")] BSTR bstrMissionOrPlayer);
  427. [helpstring("Requests a position on a team, which may be specified by name, by a buddy player, or not at all.")]
  428. HRESULT JoinTeam([in, defaultvalue("")] BSTR bstrTeamOrPlayer);
  429. [helpstring("Quits the current game.")]
  430. HRESULT QuitGame();
  431. [helpstring("Undocks from the station and enters space.")]
  432. HRESULT Launch();
  433. [helpstring("Forces the pig to exit the game.")]
  434. HRESULT Shutdown();
  435. [propget, helpstring("Gets the AGCGame object that the Pig is a member of, if any.")]
  436. HRESULT Game([out, retval] IAGCGame** ppGame);
  437. [propget, helpstring("Gets the AGCShip object that sent the current chat. NULL if chat was from HQ or Pig is not currently processing chat text.")]
  438. HRESULT Me([out, retval] IAGCShip** ppShip);
  439. [propget, helpstring("Gets the target of the current chat. AGCChat_NoSelection if Pig is not currently processing chat text.")]
  440. HRESULT ChatTarget([out, retval] AGCChatTarget* peChatTarget);
  441. [propget, id(dispid_Host), helpstring("Gets the object used to access the rest of the Pigs object model.")]
  442. HRESULT Host([out, retval] IPigBehaviorHost** ppHost);
  443. [helpstring("Starts the game.")]
  444. HRESULT StartGame();
  445. [propput, helpstring("Contains a threshold value, representing an angle in radians, to which each ship's movement is compared.")]
  446. HRESULT ShipAngleThreshold1([in] float rRadians);
  447. [propget, id(dispid_ShipAngleThreshold1)]
  448. HRESULT ShipAngleThreshold1([out, retval] float* prRadians);
  449. [propput, helpstring("Contains a threshold value, representing an angle in radians, to which each ship's movement is compared.")]
  450. HRESULT ShipAngleThreshold2([in] float rRadians);
  451. [propget, id(dispid_ShipAngleThreshold2)]
  452. HRESULT ShipAngleThreshold2([out, retval] float* prRadians);
  453. [propput, helpstring("Contains a threshold value, representing an angle in radians, to which each ship's movement is compared.")]
  454. HRESULT ShipAngleThreshold3([in] float rRadians);
  455. [propget, id(dispid_ShipAngleThreshold3)]
  456. HRESULT ShipAngleThreshold3([out, retval] float* prRadians);
  457. [propput, helpstring("Contains a threshold value, representing a distance, to which each ship's movement is compared.")]
  458. HRESULT ShipDistanceThreshold1([in] float rDistance);
  459. [propget, id(dispid_ShipDistanceThreshold1)]
  460. HRESULT ShipDistanceThreshold1([out, retval] float* prDistance);
  461. [propput, helpstring("Contains a threshold value, representing a distance, to which each ship's movement is compared.")]
  462. HRESULT ShipDistanceThreshold2([in] float rDistance);
  463. [propget, id(dispid_ShipDistanceThreshold2)]
  464. HRESULT ShipDistanceThreshold2([out, retval] float* prDistance);
  465. [propput, helpstring("Contains a threshold value, representing a distance, to which each ship's movement is compared.")]
  466. HRESULT ShipDistanceThreshold3([in] float rDistance);
  467. [propget, id(dispid_ShipDistanceThreshold3)]
  468. HRESULT ShipDistanceThreshold3([out, retval] float* prDistance);
  469. [propput, helpstring("Contains a threshold value, representing ZTime, to which the (heavy_update_time - client_time) is compared.")]
  470. HRESULT ShipsUpdateLatencyThreshold1([in] long nMilliseconds);
  471. [propget, id(dispid_ShipsUpdateLatencyThreshold1)]
  472. HRESULT ShipsUpdateLatencyThreshold1([out, retval] long* pnMilliseconds);
  473. [propput, helpstring("Contains a threshold value, representing ZTime, to which the (heavy_update_time - client_time) is compared.")]
  474. HRESULT ShipsUpdateLatencyThreshold2([in] long nMilliseconds);
  475. [propget, id(dispid_ShipsUpdateLatencyThreshold2)]
  476. HRESULT ShipsUpdateLatencyThreshold2([out, retval] long* pnMilliseconds);
  477. [propput, helpstring("Contains a threshold value, representing ZTime, to which the (heavy_update_time - client_time) is compared.")]
  478. HRESULT ShipsUpdateLatencyThreshold3([in] long nMilliseconds);
  479. [propget, id(dispid_ShipsUpdateLatencyThreshold3)]
  480. HRESULT ShipsUpdateLatencyThreshold3([out, retval] long* pnMilliseconds);
  481. [helpstring("Sends the bytes specified to the connected lobby server, if any. pvBytes is either the name of a file, or a SAFEARRAY of bytes.")]
  482. HRESULT SendBytesToLobby([in] VARIANT* pvBytes, [in, defaultvalue(0)] VARIANT_BOOL bGuaranteed);
  483. [helpstring("Sends the bytes specified to the connected game server, if any. pvBytes is either the name of a file, or a SAFEARRAY of bytes.")]
  484. HRESULT SendBytesToGame([in] VARIANT* pvBytes, [in, defaultvalue(0)] VARIANT_BOOL bGuaranteed);
  485. }; // End: interface IPig : IDispatch
  486. /////////////////////////////////////////////////////////////////////////////
  487. [
  488. object, dual, pointer_default(unique), nonextensible,
  489. uuid(0A773978-C6FA-11d2-85C9-00C04F68DEB0),
  490. helpstring("Interface to a collection of pig player objects.")
  491. ]
  492. interface IPigs : ITCCollection
  493. {
  494. ///////////////////////////////////////////////////////////////////////////
  495. // Parameters:
  496. // index - A *VARIANT* of type *VT_BSTR* that specifies the name of an
  497. // item in the collection.
  498. // ppPig - Address of a variable to receive the specified item from the
  499. // collection.
  500. //
  501. // Return Value: One of the following results:
  502. //
  503. // S_OK - The method completed successfully.
  504. // E_POINTER - The specified pointer is invalid.
  505. // E_INVALIDARG - The specified index is out of range.
  506. [propget, id(DISPID_VALUE), helpstring("Returns an IPig* from the collection or NULL if the specified named pig does not exist in the collection. Takes an argument, index, which must be the name of a pig in the collection.")]
  507. HRESULT Item([in] VARIANT* pvIndex, [out, retval] IPig** ppPig);
  508. }; // End: interface IPigs : ITCCollection
  509. /////////////////////////////////////////////////////////////////////////////
  510. [
  511. object, dual, pointer_default(unique), nonextensible,
  512. uuid(B1935982-D27B-11d2-9646-00C04F68DEB0),
  513. helpstring("Interface to a Team object.")
  514. ]
  515. interface IPigTeam : IDispatch
  516. {
  517. [propget, id(DISPID_VALUE), helpstring("Gets the name of the team.")]
  518. HRESULT Name([out, retval] BSTR* bstrName);
  519. // [propget, helpstring("Gets/sets the civilization of the team.")]
  520. // [propget, helpstring("Gets the station the team starts at.")]
  521. // [propget, helpstring("Gets/sets the ship of the team's leader.")]
  522. [propget, helpstring("Gets the maximum allowed players on this team.")]
  523. HRESULT PlayersMaximum([out, retval] short* pnPlayersMaximum);
  524. [propget, helpstring("Gets the current number of players on this team.")]
  525. HRESULT PlayerCount([out, retval] short* pnPlayers);
  526. // [propget, helpstring("Gets the collection of players on this team.")]
  527. // HRESULT Players([out, retval] IPigPlayers** ppPlayers);
  528. [propput, helpstring("Gets/sets the 'auto-accept' flag of this team.")]
  529. HRESULT IsAutoAccept([in] VARIANT_BOOL bAutoAccept);
  530. [propget]
  531. HRESULT IsAutoAccept([out, retval] VARIANT_BOOL* pbAutoAccept);
  532. [propput, helpstring("Gets/sets the 'ready' flag of this team.")]
  533. HRESULT IsReady([in] VARIANT_BOOL bReady);
  534. [propget]
  535. HRESULT IsReady([out, retval] VARIANT_BOOL* pbReady);
  536. [propput, helpstring("Gets/sets the 'force-ready' flag of this team.")]
  537. HRESULT IsForceReady([in] VARIANT_BOOL bForceReady);
  538. [propget]
  539. HRESULT IsForceReady([out, retval] VARIANT_BOOL* pbForceReady);
  540. [propput, helpstring("Gets/sets the 'active' flag of this team.")]
  541. HRESULT IsActive([in] VARIANT_BOOL bActive);
  542. [propget]
  543. HRESULT IsActive([out, retval] VARIANT_BOOL* pbActive);
  544. }; // End: interface IPigTeam : IDispatch
  545. /////////////////////////////////////////////////////////////////////////////
  546. [
  547. object, dual, pointer_default(unique), nonextensible,
  548. uuid(B1935983-D27B-11d2-9646-00C04F68DEB0),
  549. helpstring("Interface to a collection of Team objects.")
  550. ]
  551. interface IPigTeams : ITCCollection
  552. {
  553. }; // End: interface IPigTeams : ITCCollection
  554. /////////////////////////////////////////////////////////////////////////////
  555. // PigMapType
  556. [
  557. uuid(15219784-D562-11d2-9646-00C04F68DEB0),
  558. helpstring("Constants for mission map types.")
  559. ]
  560. typedef [v1_enum] enum PigMapType
  561. {
  562. PigMapType_SingleRing,
  563. PigMapType_DoubleRing,
  564. PigMapType_PinWheel,
  565. PigMapType_DiamondRing,
  566. PigMapType_Snowflake,
  567. PigMapType_SplitBases,
  568. PigMapType_Count,
  569. PigMapType_Default = PigMapType_DoubleRing,
  570. } PigMapType;
  571. /////////////////////////////////////////////////////////////////////////////
  572. [
  573. object, dual, pointer_default(unique), nonextensible,
  574. uuid(15219783-D562-11d2-9646-00C04F68DEB0),
  575. helpstring("Interface to a MissionParams object.")
  576. ]
  577. interface IPigMissionParams : IDispatch
  578. {
  579. [helpstring("Validates the properties of the object.")]
  580. HRESULT Validate();
  581. [propput, helpstring("Gets/sets the number of teams for the mission.")]
  582. HRESULT TeamCount([in] short nTeamCount);
  583. [propget, id(dispid_TeamCount)]
  584. HRESULT TeamCount([out, retval] short* pnTeamCount);
  585. [propput, helpstring("Gets/sets the maximum number of players allowed on a team.")]
  586. HRESULT MaxTeamPlayers([in] short nMaxTeamPlayers);
  587. [propget, id(dispid_MaxTeamPlayers)]
  588. HRESULT MaxTeamPlayers([out, retval] short* pnMaxTeamPlayers);
  589. [propput, helpstring("Gets/sets the minimum number of players allowed on a team.")]
  590. HRESULT MinTeamPlayers([in] short nMinTeamPlayers);
  591. [propget, id(dispid_MinTeamPlayers)]
  592. HRESULT MinTeamPlayers([out, retval] short* pnMinTeamPlayers);
  593. [propput, helpstring("Gets/sets the map type for the mission.")]
  594. HRESULT MapType([in] PigMapType eMapType);
  595. [propget, id(dispid_MapType)]
  596. HRESULT MapType([out, retval] PigMapType* peMapType);
  597. }; // End: interface IPigMissionParams : IDispatch
  598. /////////////////////////////////////////////////////////////////////////////
  599. [
  600. object, pointer_default(unique), nonextensible,
  601. uuid(91C86108-DCF4-11d2-A507-00C04F68DEB0),
  602. helpstring("Private interface to a MissionParams object.")
  603. ]
  604. interface IPigMissionParamsPrivate : IUnknown
  605. {
  606. [helpstring("Gets a stream containing the length-prefixed data structure.")]
  607. HRESULT GetData([out, retval] IStream** ppstm);
  608. }; // End: interface IPigMissionParamsPrivate : IUnknown
  609. /////////////////////////////////////////////////////////////////////////////
  610. [
  611. object, dual, pointer_default(unique), nonextensible,
  612. uuid(29E0A262-CC16-11d2-9646-00C04F68DEB0),
  613. helpstring("Interface to a Mission object.")
  614. ]
  615. interface IPigMission : IDispatch
  616. {
  617. // TODO: Does this go into teams?
  618. [propget, id(dispid_Pigs), helpstring("Gets the collection of (pig) players.")]
  619. HRESULT Pigs([out, retval] IPigs** ppPigs);
  620. }; // End: interface IPigMission : IDispatch
  621. /////////////////////////////////////////////////////////////////////////////
  622. [
  623. object, dual, pointer_default(unique), nonextensible,
  624. uuid(29E0A263-CC16-11d2-9646-00C04F68DEB0),
  625. helpstring("Interface to a collection of Mission objects.")
  626. ]
  627. interface IPigMissions : ITCCollection
  628. {
  629. }; // End: interface IPigMissions : ITCCollection
  630. /////////////////////////////////////////////////////////////////////////////
  631. [
  632. object, dual, pointer_default(unique), nonextensible,
  633. uuid(34E485E0-C7B7-11d2-85C9-00C04F68DEB0),
  634. helpstring("Interface to a Lobby object.")
  635. ]
  636. interface IPigLobby : IDispatch
  637. {
  638. }; // End: interface IPigLobby : IDispatch
  639. /////////////////////////////////////////////////////////////////////////////
  640. [
  641. object, dual, pointer_default(unique), nonextensible,
  642. uuid(34E485E1-C7B7-11d2-85C9-00C04F68DEB0),
  643. helpstring("Interface to a collection of Lobby objects.")
  644. ]
  645. interface IPigLobbies : ITCCollection
  646. {
  647. }; // End: interface IPigLobbies : ITCCollection
  648. /////////////////////////////////////////////////////////////////////////////
  649. // PigLobbyMode
  650. [
  651. uuid(454A9C85-1353-422c-8557-E2FADE69A0EC),
  652. helpstring("Constants for pig lobby server mode.")
  653. ]
  654. typedef [v1_enum] enum PigLobbyMode
  655. {
  656. PigLobbyMode_Club,
  657. PigLobbyMode_Free,
  658. PigLobbyMode_LAN,
  659. } PigLobbyMode;
  660. /////////////////////////////////////////////////////////////////////////////
  661. [
  662. object, dual, pointer_default(unique), nonextensible,
  663. uuid(4D13B28C-C6F2-11D2-85C9-00C04F68DEB0),
  664. helpstring("IPigSession Interface")
  665. ]
  666. interface IPigSession : IDispatch
  667. {
  668. [propput, helpstring("Gets/sets the session information object.")]
  669. HRESULT SessionInfo([in] ITCSessionInfo* pSessionInfo);
  670. [propget, id(dispid_SessionInfo)]
  671. HRESULT SessionInfo([out, retval] ITCSessionInfo** ppSessionInfo);
  672. [propget, id(dispid_Sessions), helpstring("Gets the collection of connected sessions.")]
  673. HRESULT SessionInfos([out, retval] ITCSessionInfos** ppSessionInfos);
  674. [propput, helpstring("Gets/sets the directory for script files.")]
  675. HRESULT ScriptDir([in] BSTR bstrScriptDir);
  676. [propget, id(dispid_ScriptDir)]
  677. HRESULT ScriptDir([out, retval] BSTR* pbstrScriptDir);
  678. [propput, helpstring("Gets/sets the directory for artwork files.")]
  679. HRESULT ArtPath([in] BSTR bstrArtPath);
  680. [propget, id(dispid_ArtPath)]
  681. HRESULT ArtPath([out, retval] BSTR* pbstrArtPath);
  682. [propget, id(dispid_BehaviorTypes), helpstring("Gets the collection of behavior scripts.")]
  683. HRESULT BehaviorTypes([out, retval] IPigBehaviorTypes** ppBehaviorTypes);
  684. [propget, id(dispid_Lobbies), helpstring("Gets the collection of game lobby servers.")]
  685. HRESULT Lobbies([out, retval] IPigLobbies** ppLobbies);
  686. [propget, id(dispid_Pigs), helpstring("Gets the collection of all (pig) players.")]
  687. HRESULT Pigs([out, retval] IPigs** ppPigs);
  688. [helpstring("Creates a new pig object with the specified behavior type.")]
  689. HRESULT CreatePig([in, defaultvalue("Default")] BSTR bstrType,
  690. [in, defaultvalue("")] BSTR bstrCommandLine, [out, retval] IPig** ppPig);
  691. [propput, helpstring("Gets/sets the server on which all pigs will be created.")]
  692. HRESULT MissionServer([in] BSTR bstrServer);
  693. [propget, id(dispid_MissionServer)]
  694. HRESULT MissionServer([out, retval] BSTR* pbstrServer);
  695. [propput, helpstring("Gets/sets maximum number of pigs that can be created on this server.")]
  696. HRESULT MaxPigs([in] long nMaxPigs);
  697. [propget, id(dispid_MaxPigs)]
  698. HRESULT MaxPigs([out, retval] long* pnMaxPigs);
  699. [propget, id(dispid_AccountDispenser), helpstring("Gets the object that dispenses pig accounts.")]
  700. HRESULT AccountDispenser([out, retval] IPigAccountDispenser** ppDispenser);
  701. [propget, id(dispid_Version), helpstring("Gets the version information of the Pig server.")]
  702. HRESULT Version([out, retval] IAGCVersionInfo** ppVersion);
  703. [propget, id(dispid_ProcessID), helpstring("Gets the process ID of the server, meaningful only on the local machine.")]
  704. HRESULT ProcessID([out, retval] DWORD* pdwProcessID);
  705. [id(dispid_ActivateAllEvents), helpstring("Enables the firing of all available events from this session.")]
  706. HRESULT ActivateAllEvents();
  707. [id(dispid_DeactivateAllEvents), helpstring("Disables the firing of all available events from this session.")]
  708. HRESULT DeactivateAllEvents();
  709. [propget, id(dispid_EventLog), helpstring("Gets the event log object.")]
  710. HRESULT EventLog([out, retval] IAGCEventLogger** ppEventLogger);
  711. [propput, helpstring("Contains the server from which pig accounts will be dispensed. When empty, the MissionServer is used. When this property is a period character, the local machine is used.")]
  712. HRESULT AccountServer([in] BSTR bstrServer);
  713. [propget, id(dispid_AccountServer)]
  714. HRESULT AccountServer([out, retval] BSTR* pbstrServer);
  715. [propput, helpstring("Contains the server on which the pig accounts will be authenticated. When empty, no authentication is performed.")]
  716. HRESULT ZoneAuthServer([in] BSTR bstrServer);
  717. [propget, id(dispid_ZoneAuthServer)]
  718. HRESULT ZoneAuthServer([out, retval] BSTR* pbstrServer);
  719. [propput, helpstring("Contains the maximum amount of time allowed for authentication of pig accounts. Ignored when ZoneAuthServer is an empty string.")]
  720. HRESULT ZoneAuthTimeout([in] long nMilliseconds);
  721. [propget, id(dispid_ZoneAuthTimeout)]
  722. HRESULT ZoneAuthTimeout([out, retval] long* pnMilliseconds);
  723. [propput, helpstring("Specifies the mode of lobby connection that is used for server connections. Affects the usage of the MissionServer property.")]
  724. HRESULT LobbyMode([in] PigLobbyMode eMode);
  725. [propget, id(dispid_LobbyMode)]
  726. HRESULT LobbyMode([out, retval] PigLobbyMode* peMode);
  727. }; // End: interface IPigSession : IDispatch
  728. /////////////////////////////////////////////////////////////////////////////
  729. [
  730. object, oleautomation, pointer_default(unique), nonextensible,
  731. uuid(1B41CCF2-C6F5-11d2-85C9-00C04F68DEB0),
  732. helpstring("IPigSessionEvents Interface")
  733. ]
  734. interface IPigSessionEvents : IUnknown
  735. {
  736. [id(dispid_OnEvent), helpstring("Called when an event is fired for this session.")]
  737. HRESULT OnEvent([in] IAGCEvent* pEvent);
  738. }; // End: interface IPigSessionEvents : IUnknown
  739. /////////////////////////////////////////////////////////////////////////////
  740. [
  741. uuid(9BCD384F-C6F2-11D2-85C9-00C04F68DEB0),
  742. helpstring("_IPigSessionEvents Interface")
  743. ]
  744. dispinterface _IPigSessionEvents
  745. {
  746. interface IPigSessionEvents;
  747. }; // End: dispinterface _IPigSessionEvents
  748. /////////////////////////////////////////////////////////////////////////////
  749. [
  750. object, dual, pointer_default(unique), nonextensible,
  751. uuid(3FF9E450-EE33-11d2-A50B-00C04F68DEB0),
  752. helpstring("Interface to a Pig Event object.")
  753. ]
  754. interface IPigEvent : IDispatch
  755. {
  756. [propput, helpstring("Gets/sets the name of the object.")]
  757. HRESULT Name([in] BSTR bstrName);
  758. [propget, id(DISPID_VALUE)]
  759. HRESULT Name([out, retval] BSTR* pbstrName);
  760. [propput, helpstring("Gets/sets the expression to be evaluated on the normal expiration of this action.")]
  761. HRESULT ExpirationExpression([in] BSTR bstrExpr);
  762. [propget, id(dispid_ExpirationExpression)]
  763. HRESULT ExpirationExpression([out, retval] BSTR* pbstrExpr);
  764. [propget, id(dispid_IsExpired), helpstring("Gets whether or not the event has expired.")]
  765. HRESULT IsExpired([out, retval] VARIANT_BOOL* pbExpired);
  766. [helpstring("Kills the event.")]
  767. HRESULT Kill();
  768. [propput, helpstring("Gets/sets the expression to be evaluated on the interrupted expiration of this action.")]
  769. HRESULT InterruptionExpression([in] BSTR bstrExpr);
  770. [propget, id(dispid_InterruptionExpression)]
  771. HRESULT InterruptionExpression([out, retval] BSTR* pbstrExpr);
  772. }; // End: interface IPigEvent : IDispatch
  773. /////////////////////////////////////////////////////////////////////////////
  774. [
  775. object, dual, pointer_default(unique), nonextensible,
  776. uuid(B1935984-D27B-11d2-9646-00C04F68DEB0),
  777. helpstring("Interface to a Timer object.")
  778. ]
  779. interface IPigTimer : IPigEvent
  780. {
  781. [propput, helpstring("Gets/sets the number of interval occurences remaining for this timer.")]
  782. HRESULT RepetitionCount([in] long nRepetitionCount);
  783. [propget, id(dispid_RepetitionCount)]
  784. HRESULT RepetitionCount([out, retval] long* pnRepetitionCount);
  785. [propput, helpstring("Gets/sets the time, in seconds, of each timer interval.")]
  786. HRESULT Interval([in] float fInterval);
  787. [propget, id(dispid_Interval)]
  788. HRESULT Interval([out, retval] float* pfInterval);
  789. }; // End: interface IPigTimer : IPigEvent
  790. /////////////////////////////////////////////////////////////////////////////
  791. // PigThrust
  792. [
  793. uuid(B1B86020-E3B2-11d2-A507-00C04F68DEB0),
  794. helpstring("Constants for pig thrust actions.")
  795. ]
  796. typedef [v1_enum] enum PigThrust
  797. {
  798. ThrustNone,
  799. ThrustLeft,
  800. ThrustRight,
  801. ThrustUp,
  802. ThrustDown,
  803. ThrustForward,
  804. ThrustBackward,
  805. ThrustBooster,
  806. } PigThrust;
  807. /////////////////////////////////////////////////////////////////////////////
  808. [
  809. object, dual, pointer_default(unique), nonextensible,
  810. uuid(D3A182FA-DB30-11d2-A505-00C04F68DEB0),
  811. helpstring("Interface to a Pig Ship object.")
  812. ]
  813. interface IPigShip : IAGCShip
  814. {
  815. [id(dispid_SellAllParts), helpstring("Sells all parts loaded onto the ship.")]
  816. HRESULT SellAllParts();
  817. [id(dispid_BuyHull), helpstring("Buys the specified hull type.")]
  818. HRESULT BuyHull([in] IAGCHullType* pHullType);
  819. [id(dispid_BuyDefaultLoadout), helpstring("Buys the default loadout for the current hull type.")]
  820. HRESULT BuyDefaultLoadout();
  821. [id(dispid_CommitSuicide), helpstring("Kills the ship.")]
  822. HRESULT CommitSuicide([out, retval] BSTR* pbstrResponse);
  823. [id(dispid_AllStop), helpstring("Stops all thrusting, throttling, axis turning, and action events.")]
  824. HRESULT AllStop([out, retval] BSTR* pbstrResponse);
  825. [id(dispid_Thrust), helpstring("Thrusts the ship in the specified direction(s).")]
  826. HRESULT Thrust(
  827. [in, defaultvalue(ThrustNone)] PigThrust e1,
  828. [in, defaultvalue(ThrustNone)] PigThrust e2,
  829. [in, defaultvalue(ThrustNone)] PigThrust e3,
  830. [in, defaultvalue(ThrustNone)] PigThrust e4,
  831. [in, defaultvalue(ThrustNone)] PigThrust e5,
  832. [in, defaultvalue(ThrustNone)] PigThrust e6,
  833. [in, defaultvalue(ThrustNone)] PigThrust e7,
  834. [out, retval] BSTR* pbstrResponse);
  835. [id(dispid_FireWeapon), helpstring("Begins/ends the firing of the active weapon.")]
  836. HRESULT FireWeapon([in, defaultvalue(-1)] VARIANT_BOOL bBegin,
  837. [out, retval] BSTR* pbstrResponse);
  838. [id(dispid_FireMissile), helpstring("Begins/ends the firing of the missile launcher.")]
  839. HRESULT FireMissile([in, defaultvalue(-1)] VARIANT_BOOL bBegin,
  840. [out, retval] BSTR* pbstrResponse);
  841. [id(dispid_DropMine), helpstring("Begins/ends the dropping of mines (or probes).")]
  842. HRESULT DropMine([in, defaultvalue(-1)] VARIANT_BOOL bBegin,
  843. [out, retval] BSTR* pbstrResponse);
  844. [id(dispid_LockVector), helpstring("Activates/deactivates the vector lock.")]
  845. HRESULT LockVector([in, defaultvalue(-1)] VARIANT_BOOL bLockVector,
  846. [out, retval] BSTR* pbstrResponse);
  847. [id(dispid_RipCord), helpstring("Activates/deactivates the rip cording action.")]
  848. HRESULT RipCord([in] VARIANT* pvParam, [out, retval] BSTR* pbstrResponse);
  849. [id(dispid_Cloak), helpstring("Cloaks/decloaks the ship.")]
  850. HRESULT Cloak([in, defaultvalue(-1)] VARIANT_BOOL bCloak,
  851. [out, retval] BSTR* pbstrResponse);
  852. [id(dispid_AcceptCommand), helpstring("Accepts the queued command.")]
  853. HRESULT AcceptCommand([out, retval] BSTR* pbstrResponse);
  854. [id(dispid_ClearCommand), helpstring("Clears the accepted command.")]
  855. HRESULT ClearCommand([out, retval] BSTR* pbstrResponse);
  856. /* // When I have time to implement these
  857. [id(dispid_PitchUp), helpstring("Turns the ship the specified number of positive degrees upward.")]
  858. HRESULT PitchUp([in] float fDegrees, [out, retval] BSTR* pbstrResponse);
  859. [id(dispid_PitchDown), helpstring("Turns the ship the specified number of positive degrees downward.")]
  860. HRESULT PitchDown([in] float fDegrees, [out, retval] BSTR* pbstrResponse);
  861. [id(dispid_YawLeft), helpstring("Turns the ship the specified number of positive degrees to the left.")]
  862. HRESULT YawLeft([in] float fDegrees, [out, retval] BSTR* pbstrResponse);
  863. [id(dispid_YawRight), helpstring("Turns the ship the specified number of positive degrees to the right.")]
  864. HRESULT YawRight([in] float fDegrees, [out, retval] BSTR* pbstrResponse);
  865. [id(dispid_RollLeft), helpstring("Rolls the ship the specified number of positive degrees to the left")]
  866. HRESULT RollLeft([in] float fDegrees, [out, retval] BSTR* pbstrResponse);
  867. [id(dispid_RollRight), helpstring("Rolls the ship the specified number of positive degrees to the right.")]
  868. HRESULT RollRight([in] float fDegrees, [out, retval] BSTR* pbstrResponse);
  869. */
  870. [id(dispid_Face), helpstring("Turns the ship to face the vector, specified by either an object name (VT_BSTR) or an IAGCVector* or IAGCModel* (VT_DISPATCH).")]
  871. HRESULT Face([in] VARIANT* pvarObject,
  872. [in, defaultvalue("")] BSTR bstrCompletionExpr,
  873. [in, defaultvalue("")] BSTR bstrInterruptionExpr,
  874. [in, defaultvalue(-1)] VARIANT_BOOL bMatchUpVector,
  875. [out, retval] BSTR* pbstrResponse);
  876. [id(dispid_Defend), helpstring("Defends the specified target.")]
  877. HRESULT Defend([in] BSTR bstrObject,
  878. [out, retval] BSTR* pbstrResponse);
  879. [propput, helpstring("Gets/sets the AutoPilot state.")]
  880. HRESULT AutoPilot([in] VARIANT_BOOL bEngage);
  881. [propget, id(dispid_AutoPilot)]
  882. HRESULT AutoPilot([out, retval] VARIANT_BOOL* pbEngaged);
  883. [propget, id(dispid_AutoAction), helpstring("Gets the Pig Ship action event object for this ship.")]
  884. HRESULT AutoAction([out, retval] IPigShipEvent** ppAutoAction);
  885. [propget, id(dispid_IsThrusting), helpstring("Indicates whether the ship is thrusting in the specified direction.")]
  886. HRESULT IsThrusting([in] PigThrust eThrust, [out, retval] VARIANT_BOOL* pbThrusting);
  887. [propput, helpstring("Gets/sets the weapon that is active. This must be 0 thru 3, or -1 for the default of 'all weapons'.")]
  888. HRESULT ActiveWeapon([in] long iWeapon);
  889. [propget, id(dispid_ActiveWeapon)]
  890. HRESULT ActiveWeapon([out, retval] long* piWeapon);
  891. [propget, id(dispid_IsFiringWeapon), helpstring("Indicates whether the ship is firing the active weapon.")]
  892. HRESULT IsFiringWeapon([out, retval] VARIANT_BOOL* pbFiring);
  893. [propget, id(dispid_IsFiringMissile), helpstring("Indicates whether the ship is firing the missile launcher.")]
  894. HRESULT IsFiringMissile([out, retval] VARIANT_BOOL* pbFiring);
  895. [propget, id(dispid_IsDroppingMine), helpstring("Indicates whether the ship is dropping a mine (or probe).")]
  896. HRESULT IsDroppingMine([out, retval] VARIANT_BOOL* pbDropping);
  897. [propget, id(dispid_IsVectorLocked), helpstring("Indicates whether the ship's vector lock is active.")]
  898. HRESULT IsVectorLocked([out, retval] VARIANT_BOOL* pbVectorLocked);
  899. [propget, id(dispid_IsRipCording), helpstring("Indicates whether the ship is rip-cording.")]
  900. HRESULT IsRipCording([out, retval] VARIANT_BOOL* pbRipCording);
  901. [propget, id(dispid_IsCloaked), helpstring("Indicates whether the ship is cloaked.")]
  902. HRESULT IsCloaked([out, retval] VARIANT_BOOL* pbCloaked);
  903. [propput, helpstring("Gets/sets the ship's throttle. The valid range is 0 to 100.")]
  904. HRESULT Throttle([in] float fThrottle);
  905. [propget, id(dispid_Throttle)]
  906. HRESULT Throttle([out, retval] float* pfThrottle);
  907. [propput, helpstring("Gets/sets the ship's pitch speed. The valid range is -100 to 100.")]
  908. HRESULT Pitch([in] float fPitch);
  909. [propget, id(dispid_Pitch)]
  910. HRESULT Pitch([out, retval] float* pfPitch);
  911. [propput, helpstring("Gets/sets the ship's yaw speed. The valid range is -100 to 100.")]
  912. HRESULT Yaw([in] float fYaw);
  913. [propget, id(dispid_Yaw)]
  914. HRESULT Yaw([out, retval] float* pfYaw);
  915. [propput, helpstring("Gets/sets the ship's roll speed. The valid range is -100 to 100.")]
  916. HRESULT Roll([in] float fRoll);
  917. [propget, id(dispid_Roll)]
  918. HRESULT Roll([out, retval] float* pfRoll);
  919. [propget, id(dispid_QueuedCommand), helpstring("Gets the queued command.")]
  920. HRESULT QueuedCommand([out, retval] IAGCCommand** ppCommand);
  921. [propget, id(dispid_AcceptedCommand), helpstring("Gets the accepted command.")]
  922. HRESULT AcceptedCommand([out, retval] IAGCCommand** ppCommand);
  923. [propput, helpstring("Gets/sets whether the ship automatically accepts queued commands.")]
  924. HRESULT AutoAcceptCommands([in] VARIANT_BOOL bAutoAccept);
  925. [propget, id(dispid_AutoAcceptCommands)]
  926. HRESULT AutoAcceptCommands([out, retval] VARIANT_BOOL* pbAutoAccept);
  927. [propget, helpstring("Gets the amount of time left until the ripcordind action completes.")]
  928. HRESULT RipCordTimeLeft([out, retval] float* pfRipCordTimeLeft);
  929. }; // End: interface IPigShip : IAGCShip
  930. /////////////////////////////////////////////////////////////////////////////
  931. [
  932. object, dual, pointer_default(unique), nonextensible,
  933. uuid(768293B0-EF2E-11d2-A50D-00C04F68DEB0),
  934. helpstring("Interface to a Pig Ship Event object.")
  935. ]
  936. interface IPigShipEvent : IPigEvent
  937. {
  938. [propget, id(dispid_Action), helpstring("Gets name of the action in progress.")]
  939. HRESULT Action([out, retval] BSTR* pbstrAction);
  940. [propget, id(dispid_Target), helpstring("Gets the name of the target object for the action in progress.")]
  941. HRESULT Target([out, retval] BSTR* pbstrTarget);
  942. }; // End: interface IPigShipEvent : IPigEvent
  943. /////////////////////////////////////////////////////////////////////////////
  944. [
  945. object, dual, pointer_default(unique), nonextensible,
  946. uuid(892FA168-E797-11d2-A508-00C04F68DEB0),
  947. helpstring("Interface to a Pig Vector object.")
  948. ]
  949. interface IPigVector : IDispatch
  950. {
  951. [propput, helpstring("Gets/sets the x coordinate of the vector.")]
  952. HRESULT X([in] float xArg);
  953. [propget, id(dispid_X)]
  954. HRESULT X([out, retval] float* pxArg);
  955. [propput, helpstring("Gets/sets the y coordinate of the vector.")]
  956. HRESULT Y([in] float yArg);
  957. [propget, id(dispid_Y)]
  958. HRESULT Y([out, retval] float* pyArg);
  959. [propput, helpstring("Gets/sets the z coordinate of the vector.")]
  960. HRESULT Z([in] float zArg);
  961. [propget, id(dispid_Z)]
  962. HRESULT Z([out, retval] float* pzArg);
  963. [id(dispid_SetXYZ), helpstring("Sets the x, y, and z coordinates of the vector.")]
  964. HRESULT SetXYZ([in] float xArg, [in] float yArg, [in] float zArg);
  965. [propget, id(DISPID_VALUE), helpstring("Gets the displayable string representation of the vector.")]
  966. HRESULT DisplayString([out, retval] BSTR* pbstrDisplayString);
  967. }; // End: interface IPigVector : IDispatch
  968. /////////////////////////////////////////////////////////////////////////////
  969. [
  970. object, dual, pointer_default(unique), nonextensible,
  971. uuid(64323312-E7DB-11d2-A508-00C04F68DEB0),
  972. helpstring("Interface to a Pig Account object.")
  973. ]
  974. interface IPigAccount : IDispatch
  975. {
  976. [propget, id(DISPID_VALUE), helpstring("Gets the account name.")]
  977. HRESULT Name([out, retval] BSTR* pbstrName);
  978. [propget, id(dispid_Password), helpstring("Gets the account password.")]
  979. HRESULT Password([out, retval] BSTR* pbstrPassword);
  980. }; // End: interface IPigAccount : IDispatch
  981. /////////////////////////////////////////////////////////////////////////////
  982. [
  983. object, dual, pointer_default(unique), nonextensible,
  984. uuid(9FFC3A84-E7C7-11d2-A508-00C04F68DEB0),
  985. helpstring("Interface to a Pig Account Dispenser object.")
  986. ]
  987. interface IPigAccountDispenser : IDispatch
  988. {
  989. [propget, id(dispid_NextAvailable), helpstring("Gets an available account and marks it 'in-use'.")]
  990. HRESULT NextAvailable([out, retval] IPigAccount** ppAccount);
  991. [propget, id(dispid_Names), helpstring("Gets a collection of all the managed user names.")]
  992. HRESULT Names([out, retval] ITCStrings** ppNames);
  993. [propget, id(dispid_NamesAvailable), helpstring("Gets a collection of the available user names.")]
  994. HRESULT NamesAvailable([out, retval] ITCStrings** ppNames);
  995. [propget, id(dispid_NamesInUse), helpstring("Gets a collection of the user names in use.")]
  996. HRESULT NamesInUse([out, retval] ITCStrings** ppNames);
  997. }; // End: interface IPigAccountDispenser : IDispatch
  998. /////////////////////////////////////////////////////////////////////////////
  999. [
  1000. object, dual, pointer_default(unique), nonextensible,
  1001. uuid(5B9E660C-F8FD-11d2-A50F-00C04F68DEB0),
  1002. helpstring("Interface to a collection of hull type objects.")
  1003. ]
  1004. interface IPigHullTypes : ITCCollection
  1005. {
  1006. ///////////////////////////////////////////////////////////////////////////
  1007. // Parameters:
  1008. // index - A *VARIANT* of type *VT_BSTR* that specifies the name of an
  1009. // item in the collection.
  1010. // ppHullType - Address of a variable to receive the specified item from
  1011. // the collection.
  1012. //
  1013. // Return Value: One of the following results:
  1014. //
  1015. // S_OK - The method completed successfully.
  1016. // E_POINTER - The specified pointer is invalid.
  1017. // E_INVALIDARG - The specified index is out of range.
  1018. [propget, id(DISPID_VALUE), helpstring("Returns an IAGCHullType* from the collection or NULL if the specified named hull type does not exist in the collection. Takes an argument, index, which must be either the name of a hull type in the collection or a 0-based index into the collection.")]
  1019. HRESULT Item([in] VARIANT* pvIndex, [out, retval] IAGCHullType** ppHullType);
  1020. }; // End: interface IPigHullTypes : ITCCollection
  1021. /////////////////////////////////////////////////////////////////////////////
  1022. cpp_quote("#if defined(__cplusplus) && _MSC_VER >= 1100")
  1023. cpp_quote(" extern \"C++\"")
  1024. cpp_quote(" {")
  1025. cpp_quote(" /////////////////////////////////////////////////////////////////////////")
  1026. cpp_quote(" // Smart Pointer Declarations")
  1027. cpp_quote("")
  1028. cpp_quote(" #include <comdef.h>")
  1029. cpp_quote("")
  1030. cpp_quote(" #ifndef TC_COM_SMARTPTR_TYPEDEF")
  1031. cpp_quote(" #define TC_COM_SMARTPTR_TYPEDEF(Interface) \\")
  1032. cpp_quote(" _COM_SMARTPTR_TYPEDEF(Interface, __uuidof(Interface))")
  1033. cpp_quote(" #endif // TC_COM_SMARTPTR_TYPEDEF")
  1034. cpp_quote("")
  1035. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPigBehaviorType);")
  1036. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPigBehaviorTypes);")
  1037. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPigBehaviorScriptType);")
  1038. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPigBehaviorHost);")
  1039. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPigBehavior);")
  1040. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPigBehaviors);")
  1041. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPigBehaviorStack);")
  1042. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPig);")
  1043. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPigs);")
  1044. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPigTeam);")
  1045. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPigTeams);")
  1046. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPigMission);")
  1047. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPigMissionParams);")
  1048. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPigMissionParamsPrivate);")
  1049. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPigMissions);")
  1050. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPigLobby);")
  1051. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPigLobbies);")
  1052. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPigSession);")
  1053. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPigSessionEvents);")
  1054. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPigEvent);")
  1055. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPigTimer);")
  1056. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPigShip);")
  1057. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPigShipEvent);")
  1058. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPigVector);")
  1059. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPigAccount);")
  1060. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPigAccountDispenser);")
  1061. cpp_quote(" TC_COM_SMARTPTR_TYPEDEF(IPigHullTypes);")
  1062. cpp_quote("")
  1063. cpp_quote(" } // extern \"C++\"")
  1064. cpp_quote("#endif // defined(__cplusplus) && _MSC_VER >= 1100")
  1065. cpp_quote("")