radioapp/radiouiengine/src/radiohistoryitem.cpp
changeset 19 afea38384506
parent 16 f54ebcfc1b80
child 37 451b2e1545b2
--- a/radioapp/radiouiengine/src/radiohistoryitem.cpp	Mon May 03 12:31:41 2010 +0300
+++ b/radioapp/radiouiengine/src/radiohistoryitem.cpp	Fri May 14 15:52:32 2010 +0300
@@ -74,6 +74,32 @@
 /*!
  *
  */
+bool RadioHistoryItem::isValid() const
+{
+    return id() != 0 && !title().isEmpty();
+}
+
+/*!
+ *
+ */
+void RadioHistoryItem::reset()
+{
+    decrementReferenceCount();
+    mData = shared_null();
+    mData->ref.ref();
+}
+
+/*!
+ *
+ */
+int RadioHistoryItem::id() const
+{
+    return mData->mId;
+}
+
+/*!
+ *
+ */
 QString RadioHistoryItem::artist() const
 {
     return mData->mArtist;
@@ -168,37 +194,17 @@
 /*!
  *
  */
-bool RadioHistoryItem::isFavorite() const
+bool RadioHistoryItem::isTagged() const
 {
-    return mData->mFavorite;
+    return mData->mTagged;
 }
 
 /*!
  *
  */
-void RadioHistoryItem::setFavorite()
+bool RadioHistoryItem::isRecognizedByRds() const
 {
-    if ( !mData->mFavorite ) {
-        detach();
-        mData->mFavorite = true;
-    }
-}
-
-/*!
- *
- */
-void RadioHistoryItem::increasePlayCount()
-{
-    detach();
-    ++mData->mPlayCount;
-}
-
-/*!
- *
- */
-int RadioHistoryItem::playCount() const
-{
-    return mData->mPlayCount;
+    return mData->mFromRds;
 }
 
 /**