appinfo.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2015 Autodesk, Inc. All rights reserved.
  4. //
  5. // Use of this software is subject to the terms of the Autodesk license
  6. // agreement provided at the time of installation or download, or which
  7. // otherwise accompanies this software in either electronic or hard copy form.
  8. //
  9. //////////////////////////////////////////////////////////////////////////////
  10. //
  11. // appinfo.h
  12. //
  13. // DESCRIPTION: Definition of class AcadAppInfo. Used as part of the
  14. // unknown command demand load notification mechanism.
  15. #ifndef _appinfo_h
  16. #define _appinfo_h 1
  17. //#if defined(__cplusplus)
  18. #include "acdb.h"
  19. #include "rxdlinkr.h"
  20. #include "AdAChar.h"
  21. #pragma pack (push, 8)
  22. class AcadAppInfoImp;
  23. class AcadAppInfo: public AcRxObject
  24. {
  25. public:
  26. ACRX_DECLARE_MEMBERS(AcadAppInfo);
  27. enum CmdStatus {
  28. kNoAction = 0,
  29. kRetry = 1,
  30. kShowMsg = 2,
  31. kNoModule = 3
  32. };
  33. #pragma warning(push)
  34. #pragma warning(disable:4480)
  35. enum MgdType {
  36. kUnManaged = 0,
  37. kManaged = 1,
  38. kJavaScript = 2
  39. };
  40. #pragma warning(pop)
  41. typedef AcadAppInfo::CmdStatus (*LoaderFunPtr)(void *);
  42. AcadAppInfo();
  43. virtual ~AcadAppInfo();
  44. const ACHAR *appName() const;
  45. void setAppName(const ACHAR *);
  46. const ACHAR *moduleName() const;
  47. void setModuleName(const ACHAR *);
  48. const ACHAR *appDesc() const;
  49. void setAppDesc(const ACHAR *);
  50. bool appImplements(const ACHAR *) const;
  51. AcadAppInfo::MgdType managed() const;
  52. void setManaged(AcadAppInfo::MgdType mgdType);
  53. AcadApp::ErrorStatus writeToRegistry(bool bObjDbx = false, bool skipHKLM = false);
  54. AcadApp::ErrorStatus readFromRegistry();
  55. AcadApp::ErrorStatus delFromRegistry(bool bObjDbx = false);
  56. AcadAppInfo::CmdStatus runAppLoader();
  57. void setAppLoader(LoaderFunPtr);
  58. AcadApp::LoadReasons loadReason();
  59. void setLoadReason(AcadApp::LoadReasons);
  60. AcadApp::ErrorStatus status() const;
  61. AcadApp::ErrorStatus writeGroupNameToRegistry(const ACHAR* group);
  62. AcadApp::ErrorStatus writeCommandNameToRegistry(const ACHAR* globalCmdName,
  63. const ACHAR* localCmdName);
  64. private:
  65. AcadAppInfoImp * mpImp;
  66. };
  67. #pragma pack (pop)
  68. //#endif /* defined (__cplusplus) */
  69. #endif /* _appinfo_h */