~ubuntu-branches/ubuntu/trusty/kdepimlibs/trusty

« back to all changes in this revision

Viewing changes to kioslave/mbox/urlinfo.h

  • Committer: Package Import Robot
  • Author(s): Rohan Garg, Rohan Garg, Philip Muškovac
  • Date: 2013-11-23 17:36:44 UTC
  • mfrom: (1.1.102)
  • Revision ID: package-import@ubuntu.com-20131123173644-p5ow94192ezsny8g
Tags: 4:4.11.80-0ubuntu1
[ Rohan Garg ]
* New upstream beta release
  - Bump akonadi requirement to 1.10.45
  - Update install files
  - Update symbols

[ Philip Muškovac ]
* kdepimlibs-dev/-dbg breaks/replaces kdepim-runtime/-dbg (<< 4:4.11.80)

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
class UrlInfo
26
26
{
27
27
public:
28
 
        /**
29
 
         * This enum is used to determe the url type.
30
 
         */
31
 
        enum UrlType { invalid = 0, message = 1, directory = 2 };
32
 
 
33
 
        /**
34
 
         * Constructor
35
 
         *
36
 
         * @param url The url: this url is used to split the location data off.
37
 
         * @param type The possible types of the url
38
 
         */
39
 
        explicit UrlInfo( const KUrl &url, const UrlType type = (UrlType)( message | directory ) );
40
 
 
41
 
        /**
42
 
         * Destructor
43
 
         */
44
 
        ~UrlInfo();
45
 
 
46
 
        /**
47
 
         * Returns the type of the url
48
 
         * @return the type of the url
49
 
         */
50
 
        UrlType type() const { return m_type; }
51
 
 
52
 
        /**
53
 
         * @return the mimetype of the url
54
 
         */
55
 
        QString mimetype() const;
56
 
 
57
 
        /**
58
 
         * @return The location of the mbox-file
59
 
         */
60
 
        QString filename() const;
61
 
        /**
62
 
         * @return The id given in the url.
63
 
         */
64
 
        QString id() const;
65
 
 
66
 
        /**
67
 
         * @return the while url as QString
68
 
         */
69
 
        QString url() const;
70
 
private:
71
 
        void calculateInfo( const KUrl& url, const UrlType type );
72
 
 
73
 
        bool isDirectory( const KUrl& url );
74
 
        bool isMessage( const KUrl& url );
75
 
 
76
 
private:
77
 
        UrlType m_type;
78
 
        QString *m_filename;
79
 
        QString *m_id;
 
28
    /**
 
29
     * This enum is used to determe the url type.
 
30
     */
 
31
    enum UrlType { invalid = 0, message = 1, directory = 2 };
 
32
 
 
33
    /**
 
34
     * Constructor
 
35
     *
 
36
     * @param url The url: this url is used to split the location data off.
 
37
     * @param type The possible types of the url
 
38
     */
 
39
    explicit UrlInfo( const KUrl &url, const UrlType type = (UrlType)( message | directory ) );
 
40
 
 
41
    /**
 
42
     * Destructor
 
43
     */
 
44
    ~UrlInfo();
 
45
 
 
46
    /**
 
47
     * Returns the type of the url
 
48
     * @return the type of the url
 
49
     */
 
50
    UrlType type() const { return m_type; }
 
51
 
 
52
    /**
 
53
     * @return the mimetype of the url
 
54
     */
 
55
    QString mimetype() const;
 
56
 
 
57
    /**
 
58
     * @return The location of the mbox-file
 
59
     */
 
60
    QString filename() const;
 
61
    /**
 
62
     * @return The id given in the url.
 
63
     */
 
64
    QString id() const;
 
65
 
 
66
    /**
 
67
     * @return the while url as QString
 
68
     */
 
69
    QString url() const;
 
70
 
 
71
private:
 
72
    void calculateInfo( const KUrl& url, const UrlType type );
 
73
 
 
74
    bool isDirectory( const KUrl& url );
 
75
    bool isMessage( const KUrl& url );
 
76
 
 
77
private:
 
78
    UrlType m_type;
 
79
    QString *m_filename;
 
80
    QString *m_id;
80
81
};
81
82
 
82
83
#endif