package com.google.android.libraries.remixer.storage;

/**
 * Created by miguely on 2017-01-09.
 */

public class FirebaseRemoteControllerSyncer extends LocalStorage {

}

@@ -1,105 +1,1218 @@
-package com.google.android.libraries.remixer.storage;%0A%0A/**%0A * Created by miguely on 2017-01-09
+/*%0A * Copyright 2017 Google Inc.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage com.google.android.libraries.remixer.storage;%0A%0Aimport android.content.Context;%0Aimport com.google.android.libraries.remixer.Remixer;%0Aimport com.google.android.libraries.remixer.Variable;%0Aimport com.google.android.libraries.remixer.sync.LocalValueSyncing;%0Aimport com.google.android.libraries.remixer.sync.SynchronizationMechanism;%0Aimport java.lang.ref.WeakReference;%0A%0A/**%0A * A %7B@link SynchronizationMechanism%7D that syncs up to a firebase Remote Controller.%0A *%0A * %3Cp%3EThis synchronization mechanism assumes that the local host is the source of truth, so it does%0A * very little in terms of conflict resolution
 .%0A */%0A
-%0A
 publ
@@ -1268,17 +1268,1493 @@
 ocal
-Storage %7B%0A
+ValueSyncing %7B%0A%0A  WeakReference%3CObject%3E context;%0A%0A  public FirebaseRemoteControllerSyncer(Context context) %7B%0A    super(context);%0A  %7D%0A%0A  /**%0A   * Syncs a variable up to the remote controller.%0A   */%0A  private void syncVariableToRemoteController (Variable variable) %7B%0A    // TODO(miguely): write controller sync logic%0A  %7D%0A%0A  /**%0A   * Clears all the data in a remote%0A   */%0A  private void clearVariablesInRemoteController() %7B%0A    // TODO(miguely): write controller sync logic%0A  %7D%0A%0A  @Override%0A  public void onAddingVariable(Variable variable) %7B%0A    super.onAddingVariable(variable);%0A    syncVariableToRemoteController(variable);%0A  %7D%0A%0A  @Override%0A  public void onValueChanged(Variable variable) %7B%0A    super.onValueChanged(variable);%0A    syncVariableToRemoteController(variable);%0A  %7D%0A%0A  @Override%0A  public void onContextChanged(Object currentContext) %7B%0A    super.onContextChanged(currentContext);%0A    if ((context == null && currentContext != null) %7C%7C%0A        (context != null && currentContext != context.get())) %7B%0A      context = new WeakReference%3CObject%3E(context);%0A      clearVariablesInRemoteController();%0A      for (Variable%3C?%3E var : Remixer.getInstance().getVariablesWithContext(currentContext)) %7B%0A        syncVariableToRemoteController(var);%0A      %7D%0A    %7D%0A  %7D%0A%0A  @Override%0A  public void onContextRemoved(Object currentContext) %7B%0A    super.onContextRemoved(currentContext);%0A    if (context != null && context.get() == currentContext) %7B%0A      clearVariablesInRemoteController();%0A    %7D%0A  %7D
 %0A%7D%0A

Add a barebones FirebaseRemoteControllerSyncer.