@@ -46,10 +46,7 @@ namespace uprotocol::core::usubscription::v3 {
4646using v3::SubscriptionRequest;
4747using v3::UnsubscribeRequest;
4848
49- // / @brief Interface for uEntities to create subscriptions.
50- // /
51- // / Like all L3 client APIs, the RpcClientUSubscription is a wrapper on top of
52- // / the L2 Communication APIs and USubscription service.
49+ // / @brief Client which implements the USubscription interface
5350struct RpcClientUSubscription : USubscription {
5451 using RpcClientUSubscriptionOrStatus =
5552 utils::Expected<std::unique_ptr<RpcClientUSubscription>, v1::UStatus>;
@@ -59,54 +56,69 @@ struct RpcClientUSubscription : USubscription {
5956 template <typename Response>
6057 Response invokeResponse (communication::RpcClient rpc_client);
6158
62- // / @brief Subscribe to the topic
59+ // / @brief Subscribes from a given topic
6360 // /
61+ // / @param subscription_request The request object containing the topic to
62+ // / subscribe to
63+ // / @return Returns a SubscriptionResponse on success and a UStatus else
6464 utils::Expected<SubscriptionResponse, v1::UStatus> subscribe (
6565 const SubscriptionRequest& subscription_request) override ;
6666
67- // / @brief Unsubscribe from the topic
67+ // / @brief Unsubscribes from a given topic
6868 // /
69+ // / @param unsubscribe_request The request object containing the topic to
70+ // / unsubscribe from
71+ // / @return Returns an UnsubscribeResponse on success and a UStatus else
6972 utils::Expected<UnsubscribeResponse, v1::UStatus> unsubscribe (
7073 const UnsubscribeRequest& unsubscribe_request) override ;
7174
72- // / @brief Fetch all subscriptions either by topic or subscriber
75+ // / @brief Fetches the list of topics the client is subscribed to
7376 // /
77+ // / @param fetch_subscriptions_request The request object
78+ // / @return Returns a FetchSubscriptionsResponse on success and a UStatus
79+ // / else
7480 utils::Expected<FetchSubscriptionsResponse, v1::UStatus>
7581 fetch_subscriptions (
7682 const FetchSubscriptionsRequest& fetch_subscriptions_request) override ;
7783
78- // / @brief Fetch all subscribers
84+ // / @brief Fetches the list of subscribers for a given topic
7985 // /
86+ // / @param fetch_subscribers_request The request object containing the topic
87+ // / for which the subscribers are to be fetched
88+ // / @return Returns a FetchSubscribersResponse on success and a UStatus else
8089 utils::Expected<FetchSubscribersResponse, v1::UStatus> fetch_subscribers (
8190 const FetchSubscribersRequest& fetch_subscribers_request) override ;
8291
83- // / @brief Register for notifications
92+ // / @brief Registers to receive notifications
8493 // /
94+ // / @param register_notifications_request The request object containing
95+ // / the details to register for notifications
96+ // / @return Returns a NotificationResponse on success and a UStatus else
8597 utils::Expected<NotificationsResponse, v1::UStatus>
8698 register_for_notifications (
8799 const NotificationsRequest& register_notifications_request) override ;
88100
89- // / @brief Unregister for notifications
101+ // / @brief Unregisters from receiving notifications.
90102 // /
103+ // / @param unregister_notifications_request The request object containing
104+ // / the details needed to stop receiving notifications.
105+ // / @return Returns a NotificationResponse on success and a UStatus else
91106 utils::Expected<NotificationsResponse, v1::UStatus>
92107 unregister_for_notifications (
93108 const NotificationsRequest& unregister_notifications_request) override ;
94109
95110 // / @brief Constructor
96111 // /
97- // / @param transport Transport to register with.
112+ // / @param transport Transport used to send messages
98113 explicit RpcClientUSubscription (
99114 std::shared_ptr<transport::UTransport> transport)
100115 : transport_(std::move(transport)) {}
101116
102- // / @brief Destructor
103117 ~RpcClientUSubscription () override = default ;
104118
105119private:
106- // Transport
107120 std::shared_ptr<transport::UTransport> transport_;
108121
109- // URI info about the uSubscription service
110122 USubscriptionUUriBuilder uuri_builder_;
111123};
112124
0 commit comments