Permalink
Browse files

Update license information

Add GPL 3 notice in all relevant code.
  • Loading branch information...
1 parent a0ce6aa commit 0d07f31df4f8730956b97dc74a86a0a4478fd430 @dodyg committed Dec 12, 2012
Showing with 1,127 additions and 378 deletions.
  1. +1 −1 License.txt
  2. +18 −0 src/com/silverkeytech/android_rivers/CacheItem.kt
  3. +18 −0 src/com/silverkeytech/android_rivers/DownloadAllRiversService.kt
  4. +18 −0 src/com/silverkeytech/android_rivers/DownloadImage.kt
  5. +112 −94 src/com/silverkeytech/android_rivers/DownloadOpml.kt
  6. +18 −0 src/com/silverkeytech/android_rivers/DownloadRiverContent.kt
  7. +18 −0 src/com/silverkeytech/android_rivers/DownloadService.kt
  8. +19 −0 src/com/silverkeytech/android_rivers/DownloadSubscription.kt
  9. +18 −0 src/com/silverkeytech/android_rivers/MainActivity.kt
  10. +19 −0 src/com/silverkeytech/android_rivers/MainApplication.kt
  11. +19 −0 src/com/silverkeytech/android_rivers/MediaScannerWrapper.kt
  12. +19 −0 src/com/silverkeytech/android_rivers/OutlinerActivity.kt
  13. +27 −8 src/com/silverkeytech/android_rivers/Params.kt
  14. +19 −0 src/com/silverkeytech/android_rivers/PlayPodcastActivity.kt
  15. +19 −0 src/com/silverkeytech/android_rivers/Preferences.kt
  16. +19 −0 src/com/silverkeytech/android_rivers/Result.kt
  17. +18 −0 src/com/silverkeytech/android_rivers/RiverActivity.kt
  18. +18 −0 src/com/silverkeytech/android_rivers/RiverContentRenderer.kt
  19. +58 −40 src/com/silverkeytech/android_rivers/RiversParcel.kt
  20. +18 −0 src/com/silverkeytech/android_rivers/Texts.kt
  21. +18 −0 src/com/silverkeytech/android_rivers/TryOutActivity.kt
  22. +18 −0 src/com/silverkeytech/android_rivers/Utils.kt
  23. +18 −0 src/com/silverkeytech/android_rivers/db/Bookmark.kt
  24. +21 −3 src/com/silverkeytech/android_rivers/db/Database.kt
  25. +61 −43 src/com/silverkeytech/android_rivers/outliner/OutlineContent.kt
  26. +18 −0 src/com/silverkeytech/android_rivers/outliner/SimpleStandardAdapter.kt
  27. +18 −0 src/com/silverkeytech/android_rivers/outliner/Utils.kt
  28. +29 −11 src/com/silverkeytech/android_rivers/outlines/Body.java
  29. +18 −0 src/com/silverkeytech/android_rivers/outlines/Head.java
  30. +33 −15 src/com/silverkeytech/android_rivers/outlines/Opml.java
  31. +51 −34 src/com/silverkeytech/android_rivers/outlines/Outline.java
  32. +25 −14 src/com/silverkeytech/android_rivers/riverjs/FeedEnclosure.java
  33. +25 −7 src/com/silverkeytech/android_rivers/riverjs/FeedImage.java
  34. +18 −0 src/com/silverkeytech/android_rivers/riverjs/FeedItem.java
  35. +18 −0 src/com/silverkeytech/android_rivers/riverjs/FeedItemMeta.kt
  36. +25 −7 src/com/silverkeytech/android_rivers/riverjs/FeedOpml.java
  37. +26 −8 src/com/silverkeytech/android_rivers/riverjs/FeedOpmlBody.java
  38. +55 −37 src/com/silverkeytech/android_rivers/riverjs/FeedOpmlHead.java
  39. +45 −27 src/com/silverkeytech/android_rivers/riverjs/FeedOpmlOutline.java
  40. +30 −12 src/com/silverkeytech/android_rivers/riverjs/FeedSite.java
  41. +23 −12 src/com/silverkeytech/android_rivers/riverjs/FeedSource.java
  42. +18 −0 src/com/silverkeytech/android_rivers/riverjs/FeedsCollection.java
  43. +23 −5 src/com/silverkeytech/android_rivers/riverjs/FeedsRiver.java
View
@@ -1,4 +1,4 @@
-Android Rivers is an app to view various news rivers based on http://riverjs.org/ format
+Android Rivers is an app to read and discover news using RiverJs, RSS and OPML format.
Copyright (C) 2012 Dody Gunawinata (dodyg@silverkeytech.com)
This program is free software: you can redistribute it and/or modify
@@ -1,3 +1,21 @@
+/*
+Android Rivers is an app to read and discover news using RiverJs, RSS and OPML format.
+Copyright (C) 2012 Dody Gunawinata (dodyg@silverkeytech.com)
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>
+*/
+
package com.silverkeytech.android_rivers
fun futureTimeFromNowInMilies(seconds: Int): Long {
@@ -1,3 +1,21 @@
+/*
+Android Rivers is an app to read and discover news using RiverJs, RSS and OPML format.
+Copyright (C) 2012 Dody Gunawinata (dodyg@silverkeytech.com)
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>
+*/
+
package com.silverkeytech.android_rivers
import android.app.IntentService
@@ -1,3 +1,21 @@
+/*
+Android Rivers is an app to read and discover news using RiverJs, RSS and OPML format.
+Copyright (C) 2012 Dody Gunawinata (dodyg@silverkeytech.com)
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>
+*/
+
package com.silverkeytech.android_rivers
import android.app.Activity
@@ -1,95 +1,113 @@
-package com.silverkeytech.android_rivers
-
-import android.os.AsyncTask
-import android.content.Context
-import com.silverkeytech.android_rivers.outlines.Opml
-import android.app.ProgressDialog
-import android.app.Activity
-import com.silverkeytech.android_rivers.outliner.transformXmlToOpml
-import com.github.kevinsawicki.http.HttpRequest.HttpRequestException
-import com.github.kevinsawicki.http.HttpRequest
-import android.content.DialogInterface
-import com.silverkeytech.android_rivers.outliner.OutlineContent
-import com.silverkeytech.android_rivers.outliner.traverse
-import java.util.ArrayList
-import android.util.Log
-import com.silverkeytech.android_rivers.outlines.Outline
-
-
-public class DownloadOpml(it : Context?) : AsyncTask<String, Int, Result<Opml>>(){
- class object {
- public val TAG : String = javaClass<DownloadOpml>().getSimpleName()
- }
-
- var dialog: ProgressDialog = ProgressDialog(it)
- var context: Activity = it!! as Activity
-
- protected override fun onPreExecute() {
- dialog.setMessage("Please wait while downloading opml list")
- dialog.setIndeterminate(true)
- dialog.setCancelable(false)
- dialog.setButton(DialogInterface.BUTTON_NEGATIVE, "Cancel", object : DialogInterface.OnClickListener{
-
- public override fun onClick(p0: DialogInterface?, p1: Int) {
- p0!!.dismiss()
- this@DownloadOpml.cancel(true)
- }
- })
- dialog.show()
- }
-
- protected override fun doInBackground(vararg url: String?): Result<Opml>? {
- var req: String?
- try{
- req = HttpRequest.get(url[0])?.body()
-
- val opml = transformXmlToOpml(req?.replace("<?xml version=\"1.0\" encoding=\"utf-8\" ?>",""))
- return opml
- }
- catch(e: HttpRequestException){
- var ex = e.getCause()
- return Result.wrong(ex)
- }
- }
-
- var rawCallback : ((Result<Opml>) -> Unit)? = null
- var processedCallBack : ((Result<ArrayList<OutlineContent>>) -> Unit)? = null
- var processingFilter : ((Outline) -> Boolean)? = null
-
- protected override fun onPostExecute(result: Result<Opml>?) {
- dialog.dismiss()
-
- if (result != null){
- if (rawCallback != null)
- rawCallback!!(result)
-
- if (processedCallBack != null){
- if (result.isTrue()){
- try{
- val opml = result.value!!
- val processed = opml.traverse(processingFilter)
- Log.d(TAG, "Length of opml outlines ${opml.body?.outline?.get(0)?.outline?.size} compared to processed outlines ${processed.size}")
- val res = Result.right(processed)
- processedCallBack!!(res)
- }catch (e : Exception){
- val res = Result.wrong<ArrayList<OutlineContent>>(e)
- processedCallBack!!(res)
- }
- }else
- processedCallBack!!(Result.wrong<ArrayList<OutlineContent>>(result.exception))
- }
- }
- }
-
- //Set up function to call when download is done
- public fun setCompletionCallback(action : ((Result<Opml>) -> Unit)? ){
- rawCallback = action
- }
-
- //set up function to call when download is done, include optional processing filter
- public fun setProcessedCompletedCallback(action : ((Result<ArrayList<OutlineContent>>) -> Unit)?,
- filter : ((Outline) -> Boolean)? = null){
- processedCallBack = action
- processingFilter = filter
- }
+/*
+Android Rivers is an app to read and discover news using RiverJs, RSS and OPML format.
+Copyright (C) 2012 Dody Gunawinata (dodyg@silverkeytech.com)
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>
+*/
+
+package com.silverkeytech.android_rivers
+
+import android.os.AsyncTask
+import android.content.Context
+import com.silverkeytech.android_rivers.outlines.Opml
+import android.app.ProgressDialog
+import android.app.Activity
+import com.silverkeytech.android_rivers.outliner.transformXmlToOpml
+import com.github.kevinsawicki.http.HttpRequest.HttpRequestException
+import com.github.kevinsawicki.http.HttpRequest
+import android.content.DialogInterface
+import com.silverkeytech.android_rivers.outliner.OutlineContent
+import com.silverkeytech.android_rivers.outliner.traverse
+import java.util.ArrayList
+import android.util.Log
+import com.silverkeytech.android_rivers.outlines.Outline
+
+
+public class DownloadOpml(it : Context?) : AsyncTask<String, Int, Result<Opml>>(){
+ class object {
+ public val TAG : String = javaClass<DownloadOpml>().getSimpleName()
+ }
+
+ var dialog: ProgressDialog = ProgressDialog(it)
+ var context: Activity = it!! as Activity
+
+ protected override fun onPreExecute() {
+ dialog.setMessage("Please wait while downloading opml list")
+ dialog.setIndeterminate(true)
+ dialog.setCancelable(false)
+ dialog.setButton(DialogInterface.BUTTON_NEGATIVE, "Cancel", object : DialogInterface.OnClickListener{
+
+ public override fun onClick(p0: DialogInterface?, p1: Int) {
+ p0!!.dismiss()
+ this@DownloadOpml.cancel(true)
+ }
+ })
+ dialog.show()
+ }
+
+ protected override fun doInBackground(vararg url: String?): Result<Opml>? {
+ var req: String?
+ try{
+ req = HttpRequest.get(url[0])?.body()
+
+ val opml = transformXmlToOpml(req?.replace("<?xml version=\"1.0\" encoding=\"utf-8\" ?>",""))
+ return opml
+ }
+ catch(e: HttpRequestException){
+ var ex = e.getCause()
+ return Result.wrong(ex)
+ }
+ }
+
+ var rawCallback : ((Result<Opml>) -> Unit)? = null
+ var processedCallBack : ((Result<ArrayList<OutlineContent>>) -> Unit)? = null
+ var processingFilter : ((Outline) -> Boolean)? = null
+
+ protected override fun onPostExecute(result: Result<Opml>?) {
+ dialog.dismiss()
+
+ if (result != null){
+ if (rawCallback != null)
+ rawCallback!!(result)
+
+ if (processedCallBack != null){
+ if (result.isTrue()){
+ try{
+ val opml = result.value!!
+ val processed = opml.traverse(processingFilter)
+ Log.d(TAG, "Length of opml outlines ${opml.body?.outline?.get(0)?.outline?.size} compared to processed outlines ${processed.size}")
+ val res = Result.right(processed)
+ processedCallBack!!(res)
+ }catch (e : Exception){
+ val res = Result.wrong<ArrayList<OutlineContent>>(e)
+ processedCallBack!!(res)
+ }
+ }else
+ processedCallBack!!(Result.wrong<ArrayList<OutlineContent>>(result.exception))
+ }
+ }
+ }
+
+ //Set up function to call when download is done
+ public fun setCompletionCallback(action : ((Result<Opml>) -> Unit)? ){
+ rawCallback = action
+ }
+
+ //set up function to call when download is done, include optional processing filter
+ public fun setProcessedCompletedCallback(action : ((Result<ArrayList<OutlineContent>>) -> Unit)?,
+ filter : ((Outline) -> Boolean)? = null){
+ processedCallBack = action
+ processingFilter = filter
+ }
}
@@ -1,3 +1,21 @@
+/*
+Android Rivers is an app to read and discover news using RiverJs, RSS and OPML format.
+Copyright (C) 2012 Dody Gunawinata (dodyg@silverkeytech.com)
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>
+*/
+
package com.silverkeytech.android_rivers
import android.app.Activity
@@ -1,3 +1,21 @@
+/*
+Android Rivers is an app to read and discover news using RiverJs, RSS and OPML format.
+Copyright (C) 2012 Dody Gunawinata (dodyg@silverkeytech.com)
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>
+*/
+
package com.silverkeytech.android_rivers
import android.app.Activity
@@ -1,3 +1,22 @@
+/*
+Android Rivers is an app to read and discover news using RiverJs, RSS and OPML format.
+Copyright (C) 2012 Dody Gunawinata (dodyg@silverkeytech.com)
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>
+*/
+
+
package com.silverkeytech.android_rivers
import android.app.Activity
@@ -1,3 +1,21 @@
+/*
+Android Rivers is an app to read and discover news using RiverJs, RSS and OPML format.
+Copyright (C) 2012 Dody Gunawinata (dodyg@silverkeytech.com)
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>
+*/
+
package com.silverkeytech.android_rivers
import android.content.Intent
@@ -1,3 +1,22 @@
+/*
+Android Rivers is an app to read and discover news using RiverJs, RSS and OPML format.
+Copyright (C) 2012 Dody Gunawinata (dodyg@silverkeytech.com)
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>
+*/
+
+
package com.silverkeytech.android_rivers
import android.app.Application
Oops, something went wrong.

0 comments on commit 0d07f31

Please sign in to comment.