InterfaceAppCentre.pas 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. unit InterfaceAppCentre;
  2. interface
  3. {$I ..\Includes\DelphiVersion.inc}
  4. uses
  5. Graphics, {$IFDEF DELPHI14_UP} System.Classes {$ELSE} Classes {$ENDIF}, Forms;
  6. type
  7. IApp = interface
  8. ['{5CD9B954-6597-4596-A60F-4F036D1AC6DF}']
  9. function GetID: Integer;stdcall;
  10. function GetImageUrl:AnsiString;stdcall;
  11. function GetIsHot :Boolean;stdcall;
  12. function GetAppID :Integer; stdcall;
  13. function GetIcon: AnsiString; stdcall;
  14. function GetTitle: AnsiString; stdcall;
  15. function GetCode: AnsiString; stdcall;
  16. function GetUrl: AnsiString; stdcall;
  17. function GetCallBackUri: AnsiString; stdcall;
  18. function GetTopmost: Boolean; stdcall;
  19. function GetLocked: Boolean; stdcall;
  20. function GetAppKey: AnsiString; stdcall;
  21. function GetAppSecret: AnsiString; stdcall;
  22. function GetStyle: Byte; stdcall;
  23. function GetAppStatus: Byte; stdcall;
  24. function GetUserID: LongWord; stdcall;
  25. function GetAccessToken: AnsiString; stdcall;
  26. function GetAccessTokenExpired: AnsiString; stdcall;
  27. function GetRefreshToken:AnsiString; stdcall;
  28. function GetOpenID: AnsiString; stdcall;
  29. function GetOpenKey: AnsiString; stdcall;
  30. function GetScope:AnsiString; stdcall;
  31. function GetUserStatus: Integer; stdcall;
  32. function GetIsAccessTokenValid: Boolean; stdcall;
  33. function IsCSApp: Boolean; stdcall;
  34. function IsBSApp: Boolean; stdcall;
  35. function IsPhoneApp: Boolean; stdcall;
  36. function GetEmbedded: Boolean; stdcall;
  37. end;
  38. IHotApp = interface
  39. ['{057BD180-E26C-4E87-843D-C3A2B26F0C78}']
  40. function GetID: Integer; stdcall;
  41. function GetUserAppID: Integer; stdcall;
  42. function GetOpenID: AnsiString; stdcall;
  43. function GetPosition: Integer; stdcall;
  44. function GetStatus: Integer; stdcall;
  45. function GetCreateDate: AnsiString; stdcall;
  46. function GetUserApp: IApp; stdcall;
  47. procedure SetCreateDate(const Value: AnsiString);
  48. procedure SetID(const Value: Integer);
  49. procedure SetOpenID(const Value: AnsiString);
  50. procedure SetPosition(const Value: Integer);
  51. procedure SetStatus(const Value: Integer);
  52. procedure SetUserApp(const Value: IApp);
  53. procedure SetUserAppID(const Value: Integer);
  54. end;
  55. IHotAppView = interface
  56. ['{59509CB7-A398-4FC2-B38C-4AD398316EFA}']
  57. function AddHotApp(AApp: IHotApp): Boolean; stdcall;
  58. function RemoveHotApp(AApp: IHotApp): Boolean; stdcall;
  59. procedure OnASyncAppIconDownloaded(AAppKey: AnsiString; const ABuffer; const ACount: Integer); stdcall;
  60. end;
  61. IAppCentre = interface
  62. ['{DE13A6E5-C39E-4088-ACB8-00A0A50143B0}']
  63. function Login(ALoginName: WideString; AHotAppView: IHotAppView):WideString; stdcall;
  64. procedure Logout; stdcall;
  65. function GetHotApps: IInterfaceList; stdcall;
  66. function GetAllApps: IInterfaceList; stdcall;
  67. function RemoveHotApp(AAppKey: AnsiString): Boolean; stdcall;
  68. function AddHotApp(AAppKey: AnsiString; AHotApp: IHotApp): Boolean; stdcall;
  69. function GetEnable(): Boolean; stdcall;
  70. function GetAppCentreURL: AnsiString; stdcall;
  71. procedure OpenAppCentreFrom; stdcall;
  72. procedure CloseAppCentreForm; stdcall;
  73. procedure ChangeUIColor(AColor: TColor); stdcall;
  74. procedure Hello; stdcall;
  75. procedure SSO(AAppKey: AnsiString; AUrl: AnsiString = ''); stdcall;
  76. procedure SetMainApplication(AMainApplication: TApplication); stdcall;
  77. procedure OpenWebDebuggerTool; stdcall;
  78. procedure CloseWebDebuggerTool; stdcall;
  79. /// <summary>
  80. /// ²ÐÁª¶¨ÖÆ
  81. /// </summary>
  82. function AuthFromCanlian(ALoginName, APassword: WideString): Boolean; stdcall;
  83. procedure OpenMessageCentre(ALoginName, APassword: WideString); stdcall;
  84. end;
  85. TAppCentreShowType = (stForm, stOnMainform);
  86. /// <remarks>
  87. /// ptCanlian ²ÐÁª
  88. /// ptOH 걺£
  89. /// </remarks>
  90. TAppCentreProjectType = (ptNormal, ptCanlian, ptOH);
  91. IAppCentreConfig = interface
  92. ['{FF2E98EE-5F9E-4B11-B32E-48909331321F}']
  93. function GetClientIP: WideString; stdcall;
  94. function GetClientPort: Integer; stdcall;
  95. function GetEnable: Boolean; stdcall;
  96. function GetIP: WideString; stdcall;
  97. function GetLxtAppID: WideString; stdcall;
  98. function GetLxtAppKey: WideString; stdcall;
  99. function GetLxtAppSecret: WideString; stdcall;
  100. function GetPort: Integer; stdcall;
  101. function GetShowType: TAppCentreShowType; stdcall;
  102. function GetProjectType: TAppCentreProjectType; stdcall;
  103. procedure Load; stdcall;
  104. function GetMessageCentreIP: WideString; stdcall;
  105. function GetMessageCentrePort: Integer; stdcall;
  106. function GetMessageCentreEnable: Boolean; stdcall;
  107. function GetDanDianDengLu: Boolean; stdcall;
  108. end;
  109. implementation
  110. end.