summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfcolin2007-02-01 13:13:18 +0000
committerfcolin2007-02-01 13:13:18 +0000
commitd561f6f0278d0bf9be491efa47ea681d55ed3ee1 (patch)
treeafac844b5894c0ba25221d8df6cd1f069efea259
parent87713194748f6eb399f2ba2d6cb72db9ddb5e1a5 (diff)
downloadivy-cplusplus-d561f6f0278d0bf9be491efa47ea681d55ed3ee1.zip
ivy-cplusplus-d561f6f0278d0bf9be491efa47ea681d55ed3ee1.tar.gz
ivy-cplusplus-d561f6f0278d0bf9be491efa47ea681d55ed3ee1.tar.bz2
ivy-cplusplus-d561f6f0278d0bf9be491efa47ea681d55ed3ee1.tar.xz
Utilisateur : Fcolin Date : 3/10/02 Heure : 10:55 Créé Commentaire: (vss 1)
-rw-r--r--comIvy/Bus.h87
1 files changed, 87 insertions, 0 deletions
diff --git a/comIvy/Bus.h b/comIvy/Bus.h
new file mode 100644
index 0000000..cc5e096
--- /dev/null
+++ b/comIvy/Bus.h
@@ -0,0 +1,87 @@
+// Bus.h : déclaration de CBus
+
+#pragma once
+#include "resource.h" // symboles principaux
+
+#include "Ivy.h"
+#include "Expression.h"
+
+// IBus
+[
+ object,
+ uuid("D694594D-D119-443B-B3CB-58F6859CE990"),
+ dual, helpstring("Interface IBus"),
+ pointer_default(unique)
+]
+__interface IBus : IDispatch
+{
+ [id(1), helpstring("method Start")] HRESULT Start([in] BSTR domain);
+ [id(2), helpstring("method Stop")] HRESULT Stop(void);
+ [id(3), helpstring("method Create")] HRESULT Create([in] BSTR appName, [in] BSTR readyMsg);
+ [id(4), helpstring("method Delete")] HRESULT Delete(void);
+ [id(5), helpstring("method Send")] HRESULT Send([in] BSTR message, [out,retval] SHORT* count);
+ [id(6), helpstring("method Bind")] HRESULT Bind([in] BSTR regexp, [out,retval] IExpression** binding);
+};
+
+
+// _IBusEvents
+[
+ dispinterface,
+ uuid("59377CC5-59FD-480F-B761-644C40190920"),
+ helpstring("Interface _IBusEvents")
+]
+__interface _IBusEvents
+{
+ [id(1), helpstring("method ApplicationConnected")] void ApplicationConnected([in] BSTR applicationName);
+ [id(2), helpstring("method ApplicationDisconnected")] void ApplicationDisconnected([in] BSTR applicationName);
+};
+
+
+// CBus
+
+[
+ coclass,
+ threading("apartment"),
+ event_source("com"),
+ vi_progid("comIvy.Bus"),
+ progid("comIvy.Bus.1"),
+ version(1.0),
+ uuid("537805F0-1950-40B6-9833-DD5F8E8A19B7"),
+ helpstring("Bus Class")
+]
+class ATL_NO_VTABLE CBus :
+ public IBus,
+ public IvyApplicationCallback
+{
+public:
+ CBus();
+ ~CBus();
+ friend class CExpression;
+
+ __event __interface _IBusEvents;
+
+ DECLARE_PROTECT_FINAL_CONSTRUCT()
+
+ HRESULT FinalConstruct()
+ {
+ return S_OK;
+ }
+
+ void FinalRelease()
+ {
+ }
+
+public:
+
+ STDMETHOD(Start)(BSTR domain);
+ STDMETHOD(Stop)(void);
+ STDMETHOD(Create)(BSTR appname, BSTR readyMsg);
+ STDMETHOD(Delete)(void);
+ STDMETHOD(Send)(BSTR message, SHORT* count);
+ STDMETHOD(Bind)(BSTR regexp, IExpression** binding);
+protected:
+ Ivy* bus;
+ void OnApplicationConnected(IvyApplication * app);
+ void OnApplicationDisconnected(IvyApplication * app);
+};
+