#ifndef CORE_CORE_H_ #define CORE_CORE_H_ #include "core/internal/client_proxy.h" #include "core/internal/service_controller_router.h" #include "core/params.h" #include "platform/ptr.h" namespace location { namespace nearby { namespace connections { /* * This class defines the API of the Nearby Connections Core library. * * Each passed-in Platform must provide a set of primitives with platform- * specific implementations. The Platform class must provide factory functions * for the following primitives: * * SingleThreadExecutor * MultiThreadExecutor * ScheduledExecutor * Lock * CountDownLatch * AtomicBoolean * AtomicReference * SettableFuture * BluetoothAdapter * BluetoothClassicMedium * HashUtils * ThreadUtils * SystemClock * ConditionVariable * * The Platform class must also provide typedefs for the following subset of * primitives to identify the concrete classes: * * SingleThreadExecutorType * MultiThreadExecutorType * ScheduledExecutorType * * A sample Platform class can be found at * //platform/impl/sample/sample_platform.h */ template class Core { public: Core(); ~Core(); void startAdvertising( ConstPtr start_advertising_params); void stopAdvertising(ConstPtr stop_advertising_params); void startDiscovery(ConstPtr start_discovery_params); void stopDiscovery(ConstPtr stop_discovery_params); void requestConnection( ConstPtr request_connection_params); void acceptConnection( ConstPtr accept_connection_params); void rejectConnection( ConstPtr reject_connection_params); void initiateBandwidthUpgrade(ConstPtr initiate_bandwidth_upgrade_params); void sendPayload(ConstPtr send_payload_params); void cancelPayload(ConstPtr cancel_payload_params); void disconnectFromEndpoint( ConstPtr disconnect_from_endpoint_params); void stopAllEndpoints( ConstPtr stop_all_endpoints_params); private: ScopedPtr > > client_proxy_; ScopedPtr > > service_controller_router_; }; } // namespace connections } // namespace nearby } // namespace location #include "core/core.cc" #endif // CORE_CORE_H_