SubmitSMCom.h
上传用户:hkcoast
上传日期:2007-01-12
资源大小:979k
文件大小:2k
源码类别:

手机短信编程

开发平台:

Visual C++

  1. // SubmitSMCom.h : Declaration of the CSubmitSMCom
  2. #pragma once
  3. #include "resource.h"       // main symbols
  4. #include "SMPPCOM.h"
  5. #include "..smpppacket.h"
  6. // CSubmitSMCom
  7. // It wrape a CSubmitSM to provide COM accessibility to use in scripting client
  8. class ATL_NO_VTABLE CSubmitSMCom : public CSubmitSM,
  9. public CComObjectRootEx<CComSingleThreadModel>,
  10. public CComCoClass<CSubmitSMCom, &CLSID_SubmitSMCom>,
  11. public IDispatchImpl<ISubmitSMCom, &IID_ISubmitSMCom, &LIBID_SMPPCOMLib, /*wMajor =*/ 1, /*wMinor =*/ 0>
  12. {
  13. public:
  14. CSubmitSMCom()
  15. {
  16. m_msg_double_byte = false;
  17. }
  18. DECLARE_REGISTRY_RESOURCEID(IDR_SUBMITSMCOM)
  19. DECLARE_NOT_AGGREGATABLE(CSubmitSMCom)
  20. BEGIN_COM_MAP(CSubmitSMCom)
  21. COM_INTERFACE_ENTRY(ISubmitSMCom)
  22. COM_INTERFACE_ENTRY(IDispatch)
  23. END_COM_MAP()
  24. DECLARE_PROTECT_FINAL_CONSTRUCT()
  25. HRESULT FinalConstruct()
  26. {
  27. return S_OK;
  28. }
  29. void FinalRelease() 
  30. {
  31. }
  32. public:
  33. protected:
  34. bool m_msg_double_byte;
  35. public:
  36. STDMETHOD(get_ServiceType)(BSTR* pVal);
  37. STDMETHOD(put_ServiceType)(BSTR newVal);
  38. STDMETHOD(get_Source)(ISmppAddressCom** pVal);
  39. STDMETHOD(put_Source)(ISmppAddressCom* newVal);
  40. STDMETHOD(get_Destination)(ISmppAddressCom** pVal);
  41. STDMETHOD(put_Destination)(ISmppAddressCom* newVal);
  42. STDMETHOD(get_esmClass)(SHORT* pVal);
  43. STDMETHOD(put_esmClass)(SHORT newVal);
  44. STDMETHOD(get_dataCoding)(SHORT* pVal);
  45. STDMETHOD(put_dataCoding)(SHORT newVal);
  46. STDMETHOD(get_protocolID)(SHORT* pVal);
  47. STDMETHOD(put_protocolID)(SHORT newVal);
  48. STDMETHOD(get_priorityFlag)(SHORT* pVal);
  49. STDMETHOD(put_priorityFlag)(SHORT newVal);
  50. STDMETHOD(get_scheduledDelivery)(ISmppDateCom** pVal);
  51. STDMETHOD(put_scheduledDelivery)(ISmppDateCom* newVal);
  52. STDMETHOD(get_validityPeriod)(ISmppDateCom** pVal);
  53. STDMETHOD(put_validityPeriod)(ISmppDateCom* newVal);
  54. STDMETHOD(get_registeredDelivery)(SHORT* pVal);
  55. STDMETHOD(put_registeredDelivery)(SHORT newVal);
  56. STDMETHOD(get_replaceIfPresent)(SHORT* pVal);
  57. STDMETHOD(put_replaceIfPresent)(SHORT newVal);
  58. STDMETHOD(get_smDefaultMsgId)(SHORT* pVal);
  59. STDMETHOD(put_smDefaultMsgId)(SHORT newVal);
  60. STDMETHOD(get_Message)(BSTR* pVal);
  61. STDMETHOD(put_Message)(BSTR newVal);
  62. STDMETHOD(compactMessage)(void);
  63. STDMETHOD(flipByteOrder)(void);
  64. STDMETHOD(setMessage)(VARIANT msgdata);
  65. STDMETHOD(getMessage)(VARIANT* pmsgdata);
  66. };
  67. OBJECT_ENTRY_AUTO(__uuidof(SubmitSMCom), CSubmitSMCom)