No Description

FIRComponentContainerInternal.h 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright 2018 Google
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import <Foundation/Foundation.h>
  17. #import "FIRComponent.h"
  18. #import "FIRComponentContainer.h"
  19. @class FIRApp;
  20. NS_ASSUME_NONNULL_BEGIN
  21. @interface FIRComponentContainer (Private)
  22. /// Initializes a container for a given app. This should only be called by the app itself.
  23. - (instancetype)initWithApp:(FIRApp *)app;
  24. /// Retrieves an instance that conforms to the specified protocol. This will return `nil` if the
  25. /// protocol wasn't registered, or if the instance couldn't be instantiated for the provided app.
  26. - (nullable id)instanceForProtocol:(Protocol *)protocol NS_SWIFT_NAME(instance(for:));
  27. /// Instantiates all the components that have registered as "eager" after initialization.
  28. - (void)instantiateEagerComponents;
  29. /// Remove all of the cached instances stored and allow them to clean up after themselves.
  30. - (void)removeAllCachedInstances;
  31. /// Register a class to provide components for the interoperability system. The class should conform
  32. /// to `FIRComponentRegistrant` and provide an array of `FIRComponent` objects.
  33. + (void)registerAsComponentRegistrant:(Class<FIRLibrary>)klass;
  34. @end
  35. NS_ASSUME_NONNULL_END