LunaSysMgr
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
externalapp.h
Go to the documentation of this file.
1 /* @@@LICENSE
2 *
3 * Copyright (c) 2011-2012 Hewlett-Packard Development Company, L.P.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 * LICENSE@@@ */
18 
19 
20 
21 
22 #ifndef EXTERNALAPP_H_
23 #define EXTERNALAPP_H_
24 
25 #include <QObject>
26 #include <QUuid>
27 
28 namespace DimensionsSystemInterface
29 {
30 
31 namespace ExternalAppType
32 {
33  enum Enum
34  {
37  };
38 }
39 
40 class ExternalApp : public QObject
41 {
42  Q_OBJECT
43 
44 public:
45 
46  friend class AppEffector;
47  friend class AppMonitor;
48 
50  virtual ~ExternalApp();
51 
52  virtual bool isValid() const = 0;
53  virtual QUuid uid() const;
54  virtual ExternalAppType::Enum type() const;
55 
56  virtual bool isUpdating() const;
57  virtual bool isInRemoval() const;
58  virtual bool isReady() const; //meaning, ok to launch, etc
59  virtual bool isFailed() const;
60 
61  virtual void setReady();
62 
63 protected:
64 
66  QUuid m_uid;
67  bool m_stateBeingRemoved; //set to true if the app is currently undergoing removal
68  bool m_stateBeingUpdated; //set to true if the app is currently being (re)installed/updated
69  bool m_stateFailed; //set to true if the app for whatever reason couldn't be scanned correctly
70  // (usually an installation fail)
71 };
72 
73 } //end namespace
74 
75 #endif /* EXTERNALAPP_H_ */