-
-package eu.alefzero.owncloud.syncadapter;
-
-import android.app.Service;
-import android.content.Intent;
-import android.os.IBinder;
-
-public class FileSyncService extends Service {
- private static final Object syncAdapterLock = new Object();
- private static AbstractOwnCloudSyncAdapter concretSyncAdapter = null;
-
- /*
- * {@inheritDoc}
- */
- @Override
- public void onCreate() {
- synchronized (syncAdapterLock) {
- if (concretSyncAdapter == null) {
- concretSyncAdapter = new FileSyncAdapter(getApplicationContext(), true);
- }
- }
- }
-
- /*
- * {@inheritDoc}
- */
- @Override
- public IBinder onBind(Intent intent) {
- return concretSyncAdapter.getSyncAdapterBinder();
- }
-}
+/* ownCloud Android client application\r
+ * Copyright (C) 2011 Bartek Przybylski\r
+ *\r
+ * This program is free software: you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation, either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.\r
+ *\r
+ */\r
+package eu.alefzero.owncloud.syncadapter;\r
+\r
+import android.app.Service;\r
+import android.content.Intent;\r
+import android.os.IBinder;\r
+\r
+/**\r
+ * Background service for syncing files to our local Database\r
+ * \r
+ * @author Bartek Przybylski\r
+ * \r
+ */\r
+public class FileSyncService extends Service {\r
+ public static final String SYNC_MESSAGE = "eu.alefzero.owncloud.files.ACCOUNT_SYNC";\r
+ public static final String IN_PROGRESS = "sync_in_progress";\r
+ public static final String ACCOUNT_NAME = "account_name";\r
+\r
+ private static final Object syncAdapterLock = new Object();\r
+ private static AbstractOwnCloudSyncAdapter concretSyncAdapter = null;\r
+\r
+ /*\r
+ * {@inheritDoc}\r
+ */\r
+ @Override\r
+ public void onCreate() {\r
+ synchronized (syncAdapterLock) {\r
+ if (concretSyncAdapter == null)\r
+ concretSyncAdapter = new FileSyncAdapter(\r
+ getApplicationContext(), true);\r
+ }\r
+ }\r
+\r
+ /*\r
+ * {@inheritDoc}\r
+ */\r
+ @Override\r
+ public IBinder onBind(Intent intent) {\r
+ return concretSyncAdapter.getSyncAdapterBinder();\r
+ }\r
+}\r