|
a/src/utils/appformime.h |
|
b/src/utils/appformime.h |
|
... |
|
... |
16 |
*/
|
16 |
*/
|
17 |
#ifndef _APPFORMIME_H_INCLUDED_
|
17 |
#ifndef _APPFORMIME_H_INCLUDED_
|
18 |
#define _APPFORMIME_H_INCLUDED_
|
18 |
#define _APPFORMIME_H_INCLUDED_
|
19 |
|
19 |
|
20 |
#include <string>
|
20 |
#include <string>
|
|
|
21 |
#include <map>
|
|
|
22 |
#include <vector>
|
21 |
|
23 |
|
22 |
/**
|
24 |
/**
|
23 |
* Rather strangely, I could not find a reasonably simple piece of
|
25 |
* Rather strangely, I could not find a reasonably simple piece of
|
24 |
* code which would parse /usr/share/applications to return a list of
|
26 |
* code which would parse /usr/share/applications to return a list of
|
25 |
* apps for a given mime type. So here goes. Note that the implementation
|
27 |
* apps for a given mime type. So here goes. Note that the implementation
|
|
... |
|
... |
69 |
/**
|
71 |
/**
|
70 |
* Get app with given name
|
72 |
* Get app with given name
|
71 |
*/
|
73 |
*/
|
72 |
bool appByName(const string& nm, AppDef& app);
|
74 |
bool appByName(const string& nm, AppDef& app);
|
73 |
|
75 |
|
74 |
typedef map<string, vector<DesktopDb::AppDef> > AppMap;
|
76 |
typedef std::map<std::string, std::vector<DesktopDb::AppDef> > AppMap;
|
75 |
|
77 |
|
76 |
private:
|
78 |
private:
|
77 |
/** This is used by getDb() and builds a db for the standard location */
|
79 |
/** This is used by getDb() and builds a db for the standard location */
|
78 |
DesktopDb();
|
80 |
DesktopDb();
|
79 |
void build(const string& dir);
|
81 |
void build(const std::string& dir);
|
80 |
DesktopDb(const DesktopDb &);
|
82 |
DesktopDb(const DesktopDb &);
|
81 |
DesktopDb& operator=(const DesktopDb &);
|
83 |
DesktopDb& operator=(const DesktopDb &);
|
82 |
|
84 |
|
83 |
AppMap m_appMap;
|
85 |
AppMap m_appMap;
|
84 |
std::string m_reason;
|
86 |
std::string m_reason;
|