luna-sysmgr-common
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ApplicationDescriptionBase.h
Go to the documentation of this file.
1 /* @@@LICENSE
2 *
3 * Copyright (c) 2008-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 #ifndef APPLICATIONDESCRIPTIONBASE_H
20 #define APPLICATIONDESCRIPTIONBASE_H
21 
22 #include <string>
23 #include "Common.h"
24 
25 struct json_object;
26 
28 {
29 public:
30  enum Type {
31  Type_Web = 0,
36  };
37 
40  const std::string& id() const { return m_id; }
41  const std::string& title() const { return m_title; }
42  const std::string& icon() const { return m_icon; }
43  const std::string& entryPoint() const { return m_entryPoint; }
44  bool isHeadLess() const { return m_isHeadLess; }
45 
47 
48  virtual void getAppDescriptionString(std::string &descString) const;
49 protected:
50  // Gives an json_object filled by information within this class
51  virtual json_object* getAppDescription() const;
52  // populates the base class with data from the json object
53  bool fromJsonObject(const struct json_object* json);
54 
55  std::string m_id;
56  std::string m_title; //copy of default launchpoint's title
57  std::string m_icon;
58  std::string m_entryPoint;
61 };
62 
63 #endif // APPLICATIONDESCRIPTIONBASE_H