If you think the Android project retrowatch listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
/*
* Copyright (C) 2014 The Retro Watch - Open source smart watch project
*//www.java2s.com
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/package com.hardcopy.retrowatch.contents.objects;
import com.hardcopy.retrowatch.utils.Logs;
publicclass FeedObject {
privatestaticfinal String TAG = "FeedObject";
//---------- Parsing type (Regular request)
publicstaticfinalint REQUEST_TYPE_NONE = -1;
publicstaticfinalint REQUEST_TYPE_DAUM_REALTIME_KEYWORDS = 5;
publicstaticfinalint REQUEST_TYPE_DAUM_SOCIAL_PICK = 6;
publicstaticfinalint REQUEST_TYPE_NAVER_REALTIME_KEYWORDS = 11;
publicstaticfinalint REQUEST_TYPE_NAVER_RELATED_KEYWORDS = 12;
publicstaticfinalint REQUEST_TYPE_TWITTER_HOTTEST = 22;
publicstaticfinalint REQUEST_TYPE_TWITTER_REALTIME = 23;
publicstaticfinalint REQUEST_TYPE_TWITTER_TODAY = 24;
publicstaticfinalint REQUEST_TYPE_TWITTER_IMAGE = 25;
publicstaticfinalint REQUEST_TYPE_9GAG_HOT = 71;
publicstaticfinalint REQUEST_TYPE_9GAG_TREND = 72;
publicstaticfinalint REQUEST_TYPE_IMAGE = 101; // File download
publicstaticfinalint REQUEST_TYPE_LOGO_IMAGE = 102;
publicstaticfinalint REQUEST_TYPE_9GAG_FULL_IMAGE_FOR_DIALOG = 111;
publicstaticfinalint REQUEST_TYPE_NOTICE = 301; // Notice
publicstaticfinalint REQUEST_TYPE_RSS_DEFAULT = 1001; // RSS
publicstaticfinalint REQUEST_TYPE_RSS_FEED43 = 1101; // RSS - feed43
//---------- Rank parameter
publicstaticfinalint RANK_TYPE_NONE = 0;
publicstaticfinalint RANK_TYPE_NEW = 1;
//---------- Content downloading status
publicstaticfinalint CONTENT_DOWNLOAD_STATUS_ERROR = -1;
publicstaticfinalint CONTENT_DOWNLOAD_STATUS_INIT = 0;
publicstaticfinalint CONTENT_DOWNLOAD_STATUS_DOWNLOADING = 1;
publicstaticfinalint CONTENT_DOWNLOAD_STATUS_DONE = 100;
public String mId; //
publicint mType = REQUEST_TYPE_NONE; // What kind of feed?
public String mName = null;
public String mLink;
public String mKeyword;
public String mContent;
public String mThumbnailUrl;
public String mDate;
publicint mDownloadStatus;
publicint mRankType = RANK_TYPE_NONE; // for real-time keyword ranking
publicint mRankUpAndDown = 0; // -10~0~10
publicint mCommentCount = 0; // 0~10 (1 means 1,000 comments)
publicint mVersion = 0;
public String mFullSizeImageURL = null;
// Constructor
public FeedObject(int type, String id, String link, String keyword, String content, String thumbnail) {
mType = type;
mId = id;
mLink = link;
mKeyword = keyword;
mContent = content;
mThumbnailUrl = thumbnail;
mDownloadStatus = CONTENT_DOWNLOAD_STATUS_INIT;
}
publicvoid setName(String name) {
mName = name;
}
publicvoid setDate(String date) {
mDate = date;
}
publicvoid setDownloadStatus(int status) {
mDownloadStatus = status;
}
publicvoid setRankInfo(int rankType, int rankUpDown, int commentCount) {
mRankType = rankType;
mRankUpAndDown = rankUpDown;
mCommentCount = commentCount;
}
publicvoid setFullSizeImageURL(String url) {
mFullSizeImageURL = url;
}
publicvoid setVersion(int ver) {
mVersion = ver;
}
publicvoid printLog() {
Logs.d(TAG, "[+] mType = " + mType);
Logs.d(TAG, "[+] mId = " + mId);
}
}