mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-02 03:15:37 +00:00
Moved and refactored several classes
This commit is contained in:
1 parent
673474a51f
commit
94751519ac
22 files changed
+65
-63
No files matched your search
@@ -17,9 +17,7 @@
|
||||
*/
|
||||
package com.rtbishop.look4sat.data
|
||||
|
||||
import com.rtbishop.look4sat.domain.SatEntry
|
||||
import com.rtbishop.look4sat.domain.SatItem
|
||||
import com.rtbishop.look4sat.domain.SatTrans
|
||||
import com.rtbishop.look4sat.domain.Transmitter
|
||||
import com.rtbishop.look4sat.domain.Satellite
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
@@ -27,7 +25,7 @@ interface LocalDataSource {
|
||||
|
||||
fun getSatItems(): Flow<List<SatItem>>
|
||||
|
||||
fun getSatTransmitters(catNum: Int): Flow<List<SatTrans>>
|
||||
fun getSatTransmitters(catNum: Int): Flow<List<Transmitter>>
|
||||
|
||||
suspend fun getSelectedSatellites(): List<Satellite>
|
||||
|
||||
@@ -35,5 +33,5 @@ interface LocalDataSource {
|
||||
|
||||
suspend fun updateEntriesSelection(catNums: List<Int>, isSelected: Boolean)
|
||||
|
||||
suspend fun updateTransmitters(satelliteTrans: List<SatTrans>)
|
||||
suspend fun updateTransmitters(satelliteTrans: List<Transmitter>)
|
||||
}
|
||||
@@ -17,12 +17,12 @@
|
||||
*/
|
||||
package com.rtbishop.look4sat.data
|
||||
|
||||
import com.rtbishop.look4sat.domain.SatTrans
|
||||
import com.rtbishop.look4sat.domain.Transmitter
|
||||
import java.io.InputStream
|
||||
|
||||
interface RemoteDataSource {
|
||||
|
||||
suspend fun fetchDataStream(url: String): InputStream?
|
||||
|
||||
suspend fun fetchTransmitters(): List<SatTrans>
|
||||
suspend fun fetchTransmitters(): List<Transmitter>
|
||||
}
|
||||
+4
-1
@@ -15,7 +15,10 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.rtbishop.look4sat.domain
|
||||
package com.rtbishop.look4sat.data
|
||||
|
||||
import com.rtbishop.look4sat.domain.GeoPos
|
||||
import com.rtbishop.look4sat.domain.Satellite
|
||||
|
||||
data class SatData(
|
||||
val pass: Satellite,
|
||||
+3
-1
@@ -15,7 +15,9 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.rtbishop.look4sat.domain
|
||||
package com.rtbishop.look4sat.data
|
||||
|
||||
import com.rtbishop.look4sat.domain.TLE
|
||||
|
||||
data class SatEntry(
|
||||
val tle: TLE,
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.rtbishop.look4sat.domain
|
||||
package com.rtbishop.look4sat.data
|
||||
|
||||
data class SatItem(
|
||||
val catNum: Int,
|
||||
@@ -17,9 +17,7 @@
|
||||
*/
|
||||
package com.rtbishop.look4sat.data
|
||||
|
||||
import com.rtbishop.look4sat.domain.SatEntry
|
||||
import com.rtbishop.look4sat.domain.SatItem
|
||||
import com.rtbishop.look4sat.domain.SatTrans
|
||||
import com.rtbishop.look4sat.domain.Transmitter
|
||||
import com.rtbishop.look4sat.domain.Satellite
|
||||
import com.rtbishop.look4sat.domain.TLE
|
||||
import kotlinx.coroutines.CoroutineDispatcher
|
||||
@@ -49,7 +47,7 @@ class SatelliteRepo(
|
||||
return localDataSource.getSatItems()
|
||||
}
|
||||
|
||||
fun getSatTransmitters(catNum: Int): Flow<List<SatTrans>> {
|
||||
fun getSatTransmitters(catNum: Int): Flow<List<Transmitter>> {
|
||||
return localDataSource.getSatTransmitters(catNum)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
package com.rtbishop.look4sat.domain
|
||||
|
||||
data class SatTrans(
|
||||
data class Transmitter(
|
||||
val uuid: String,
|
||||
val info: String,
|
||||
val isAlive: Boolean,
|
||||
Reference in new issue
Block a user