PageRenderTime 36ms CodeModel.GetById 27ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/thirdparty/liblastfm2/src/types/Mbid.h

http://github.com/tomahawk-player/tomahawk
C++ Header | 45 lines | 18 code | 6 blank | 21 comment | 1 complexity | 0b18f411497e4ee4046b36bd3cbf2eba MD5 | raw file
 1/*
 2   Copyright 2009 Last.fm Ltd. 
 3      - Primarily authored by Max Howell, Jono Cole and Doug Mansell
 4
 5   This file is part of liblastfm.
 6
 7   liblastfm is free software: you can redistribute it and/or modify
 8   it under the terms of the GNU General Public License as published by
 9   the Free Software Foundation, either version 3 of the License, or
10   (at your option) any later version.
11
12   liblastfm is distributed in the hope that it will be useful,
13   but WITHOUT ANY WARRANTY; without even the implied warranty of
14   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   GNU General Public License for more details.
16
17   You should have received a copy of the GNU General Public License
18   along with liblastfm.  If not, see <http://www.gnu.org/licenses/>.
19*/
20#ifndef LASTFM_MBID_H
21#define LASTFM_MBID_H
22
23#include <lastfm/global.h>
24#include <QString>
25
26namespace lastfm
27{
28    class LASTFM_DLLEXPORT Mbid
29    {
30        QString id;
31    
32    public:
33        explicit Mbid( const QString& p = "" ) : id( p )
34        {}
35    
36        bool isNull() const { return id.isNull() || id.isEmpty(); }
37        operator QString() const { return id; }
38
39        /** if this is not an mp3 file you will be wasting time, as it won't work
40          * but we will do what you say anyway because you are the boss */ 
41        static Mbid fromLocalFile( const QString& path );
42    };
43}
44
45#endif