refactor: modularizar como PocketSync con soporte de perfiles
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Callable
|
||||
|
||||
|
||||
class SyncEngine(ABC):
|
||||
"""Interfaz abstracta para motores de sincronización."""
|
||||
|
||||
@abstractmethod
|
||||
def sync_folder(
|
||||
self,
|
||||
src: str,
|
||||
dst: str,
|
||||
on_file: Callable[[str], None],
|
||||
on_summary: Callable[[str], None],
|
||||
) -> None:
|
||||
"""
|
||||
Sincroniza src → dst.
|
||||
|
||||
on_file(path) — llamado con cada archivo que se procesa
|
||||
on_summary(line) — llamado con cada línea de resumen al finalizar
|
||||
"""
|
||||
...
|
||||
|
||||
@abstractmethod
|
||||
def is_available(self) -> bool:
|
||||
"""Devuelve True si el motor está disponible en el sistema actual."""
|
||||
...
|
||||
Reference in New Issue
Block a user