Home
last modified time | relevance | path

Searched refs:topic (Results 1 - 25 of 65) sorted by relevance

123

/foundation/distributedhardware/distributed_hardware_fwk/interfaces/inner_kits/src/
H A Ddistributed_hardware_fwk_kit.cpp43 int32_t DistributedHardwareFwkKit::RegisterPublisherListener(const DHTopic topic, sptr<IPublisherListener> listener) in RegisterPublisherListener() argument
45 DHLOGI("Register publisher listener, topic: %{public}" PRIu32 ", is DHFWK online: %{public}s", in RegisterPublisherListener()
46 (uint32_t)topic, isDHFWKOnLine_ ? "true" : "false"); in RegisterPublisherListener()
47 if (!IsDHTopicValid(topic)) { in RegisterPublisherListener()
48 DHLOGE("Topic invalid, topic: %{public}" PRIu32, (uint32_t)topic); in RegisterPublisherListener()
54 ret = DHFWKSAManager::GetInstance().GetDHFWKProxy()->RegisterPublisherListener(topic, listener); in RegisterPublisherListener()
57 return DHFWKSAManager::GetInstance().AddPublisherListenerToCache(topic, listener); in RegisterPublisherListener()
61 return DHFWKSAManager::GetInstance().AddPublisherListenerToCache(topic, listener); in RegisterPublisherListener()
67 int32_t DistributedHardwareFwkKit::UnregisterPublisherListener(const DHTopic topic, spt argument
86 PublishMessage(const DHTopic topic, const std::string &message) PublishMessage() argument
108 IsDHTopicValid(DHTopic topic) IsDHTopicValid() argument
[all...]
/foundation/systemabilitymgr/samgr_lite/communication/broadcast/source/
H A Dpub_sub_implement.c22 static int AddTopic(IUnknown *iUnknown, const Topic *topic);
23 static int Subscribe(IUnknown *iUnknown, const Topic *topic, Consumer *consumer);
24 static Consumer *ModifyConsumer(IUnknown *iUnknown, const Topic *topic, Consumer *oldConsumer, Consumer *newConsumer);
25 static Consumer *Unsubscribe(IUnknown *iUnknown, const Topic *topic, const Consumer *consumer);
26 static BOOL Publish(IUnknown *iUnknown, const Topic *topic, uint8 *data, int16 len);
28 static BOOL ImmediatelyPublish(PubSubFeature *feature, const Topic *topic, const Request *request);
47 static int AddTopic(IUnknown *iUnknown, const Topic *topic) in AddTopic() argument
49 if (iUnknown == NULL || topic == NULL) { in AddTopic()
58 if (broadcast->feature->GetRelation(broadcast->feature, topic) != NULL) { in AddTopic()
67 newRelation->topic in AddTopic()
77 Subscribe(IUnknown *iUnknown, const Topic *topic, Consumer *consumer) Subscribe() argument
116 ModifyConsumer(IUnknown *iUnknown, const Topic *topic, Consumer *oldConsumer, Consumer *newConsumer) ModifyConsumer() argument
146 Unsubscribe(IUnknown *iUnknown, const Topic *topic, const Consumer *consumer) Unsubscribe() argument
178 Publish(IUnknown *iUnknown, const Topic *topic, uint8 *data, int16 len) Publish() argument
206 ImmediatelyPublish(PubSubFeature *feature, const Topic *topic, const Request *request) ImmediatelyPublish() argument
255 Topic topic = request->msgValue; DefaultHandle() local
[all...]
H A Dpub_sub_feature.c26 static Relation *GetRelation(PubSubFeature *feature, const Topic *topic);
39 feature->relations.topic = -1; in Init()
74 Topic topic = request->msgValue; in OnMessage() local
75 Relation *relation = broadcast->GetRelation(broadcast, &topic); in OnMessage()
83 item->consumer->Notify(item->consumer, &topic, request); in OnMessage()
95 static Relation *GetRelation(PubSubFeature *feature, const Topic *topic) in GetRelation() argument
97 if (feature == NULL || topic == NULL) { in GetRelation()
105 if (IsTopicEqual(&item->topic, topic)) { in GetRelation()
H A Dpub_sub_feature.h39 Topic topic; member
45 Relation *(*GetRelation)(PubSubFeature *feature, const Topic *topic);
/foundation/distributedhardware/distributed_hardware_fwk/interfaces/inner_kits/test/unittest/common/ipc/distributed_hardware_proxy/src/
H A Ddistributed_hardware_proxy_test.cpp52 DHTopic topic = DHTopic::TOPIC_STOP_DSCREEN; in HWTEST_F() local
54 int32_t ret = hardwareProxy_->RegisterPublisherListener(topic, listener); in HWTEST_F()
70 DHTopic topic = static_cast<DHTopic>(invalid); in HWTEST_F() local
72 int32_t ret = hardwareProxy_->RegisterPublisherListener(topic, listener); in HWTEST_F()
87 DHTopic topic = DHTopic::TOPIC_STOP_DSCREEN; in HWTEST_F() local
89 int32_t ret = hardwareProxy_->RegisterPublisherListener(topic, listener); in HWTEST_F()
104 DHTopic topic = DHTopic::TOPIC_STOP_DSCREEN; in HWTEST_F() local
106 int32_t ret = hardwareProxy_->UnregisterPublisherListener(topic, listener); in HWTEST_F()
122 DHTopic topic = static_cast<DHTopic>(invalid); in HWTEST_F() local
124 int32_t ret = hardwareProxy_->UnregisterPublisherListener(topic, listene in HWTEST_F()
139 DHTopic topic = DHTopic::TOPIC_STOP_DSCREEN; HWTEST_F() local
158 DHTopic topic = static_cast<DHTopic>(invalid); HWTEST_F() local
174 DHTopic topic = DHTopic::TOPIC_STOP_DSCREEN; HWTEST_F() local
191 DHTopic topic = DHTopic::TOPIC_STOP_DSCREEN; HWTEST_F() local
[all...]
/foundation/distributedhardware/distributed_hardware_fwk/services/distributedhardwarefwkservice/test/unittest/common/lowlatency/lowlatencylistener/src/
H A Dlow_latency_listener_test.cpp52 DHTopic topic = DHTopic::TOPIC_MIN; in HWTEST_F() local
54 listener_->OnMessage(topic, message); in HWTEST_F()
69 DHTopic topic = DHTopic::TOPIC_START_DSCREEN; in HWTEST_F() local
71 listener_->OnMessage(topic, message); in HWTEST_F()
86 DHTopic topic = DHTopic::TOPIC_START_DSCREEN; in HWTEST_F() local
88 listener_->OnMessage(topic, message); in HWTEST_F()
103 DHTopic topic = DHTopic::TOPIC_START_DSCREEN; in HWTEST_F() local
119 listener_->OnMessage(topic, message); in HWTEST_F()
136 DHTopic topic = DHTopic::TOPIC_START_DSCREEN; in HWTEST_F() local
140 listener_->OnMessage(topic, messag in HWTEST_F()
155 DHTopic topic = DHTopic::TOPIC_START_DSCREEN; HWTEST_F() local
187 DHTopic topic = DHTopic::TOPIC_START_DSCREEN; HWTEST_F() local
[all...]
/foundation/distributedhardware/distributed_hardware_fwk/interfaces/inner_kits/test/unittest/common/distributedhardwarefwkkit/src/
H A Ddistributed_hardware_fwk_kit_test.cpp64 void DistributedHardwareFwkKitTest::TestPublisherListener::OnMessage(const DHTopic topic, const std::string& message) in OnMessage() argument
67 msgCnts_[topic]++; in OnMessage()
70 uint32_t DistributedHardwareFwkKitTest::TestPublisherListener::GetTopicMsgCnt(const DHTopic topic) in GetTopicMsgCnt() argument
73 return msgCnts_[topic]; in GetTopicMsgCnt()
128 DHTopic topic = static_cast<DHTopic>(invalid); in HWTEST_F() local
130 EXPECT_EQ(ERR_DH_FWK_PARA_INVALID, dhfwkPtr_->PublishMessage(topic, message)); in HWTEST_F()
144 DHTopic topic = DHTopic::TOPIC_STOP_DSCREEN; in HWTEST_F() local
146 EXPECT_EQ(ERR_DH_FWK_PARA_INVALID, dhfwkPtr_->PublishMessage(topic, message)); in HWTEST_F()
160 DHTopic topic = DHTopic::TOPIC_STOP_DSCREEN; in HWTEST_F() local
162 EXPECT_EQ(ERR_DH_FWK_PUBLISH_MSG_FAILED, dhfwkPtr_->PublishMessage(topic, messag in HWTEST_F()
176 DHTopic topic = DHTopic::TOPIC_STOP_DSCREEN; HWTEST_F() local
210 DHTopic topic = DHTopic::TOPIC_MIN; HWTEST_F() local
227 DHTopic topic = DHTopic::TOPIC_START_DSCREEN; HWTEST_F() local
244 DHTopic topic = DHTopic::TOPIC_MIN; HWTEST_F() local
261 DHTopic topic = DHTopic::TOPIC_START_DSCREEN; HWTEST_F() local
[all...]
/foundation/systemabilitymgr/samgr_lite/interfaces/kits/communication/broadcast/
H A Dbroadcast_interface.h70 * @brief Indicates the topic of an event or data, which is used to distinguish different types of
82 /** Error code showing that a topic has been subscribed to */
89 * @brief Defines the topic consumer used to receive events and push data. You need to implement
97 * @brief Defines how the consumer will process the events or data of a released topic.
100 * Note that the passed topic must have been subscribed by the consumer. Otherwise, the
104 * @param topic Indicates the pointer to the topic to be processed.
109 void (*Notify)(Consumer *consumer, const Topic *topic, const Request *origin);
114 * You need to implement this function to prevent repeated topic subscription. \n
128 * @brief Defines the provider of events and data of a topic
[all...]
/foundation/distributedhardware/distributed_hardware_fwk/services/distributedhardwarefwkservice/test/unittest/common/ipc/src/
H A Dpublisher_listener_proxy_test.cpp53 DHTopic topic = static_cast<DHTopic>(invalid); in HWTEST_F() local
55 proxy_->OnMessage(topic, message); in HWTEST_F()
70 DHTopic topic = DHTopic::TOPIC_START_DSCREEN; in HWTEST_F() local
72 proxy_->OnMessage(topic, message); in HWTEST_F()
87 DHTopic topic = DHTopic::TOPIC_START_DSCREEN; in HWTEST_F() local
89 proxy_->OnMessage(topic, message); in HWTEST_F()
/foundation/distributedhardware/distributed_hardware_fwk/services/distributedhardwarefwkservice/src/publisher/
H A Dpublisher.cpp39 void Publisher::RegisterListener(const DHTopic topic, const sptr<IPublisherListener> listener) in RegisterListener() argument
41 publisherItems_[topic]->AddListener(listener); in RegisterListener()
44 void Publisher::UnregisterListener(const DHTopic topic, const sptr<IPublisherListener> listener) in UnregisterListener() argument
46 publisherItems_[topic]->RemoveListener(listener); in UnregisterListener()
49 void Publisher::PublishMessage(const DHTopic topic, const std::string &message) in PublishMessage() argument
51 publisherItems_[topic]->PublishMessage(message); in PublishMessage()
H A Dpublisher_item.cpp28 PublisherItem::PublisherItem(DHTopic topic) : topic_(topic) in PublisherItem() argument
30 DHLOGE("Ctor PublisherItem, topic: %{public}d", topic); in PublisherItem()
35 DHLOGE("Dtor PublisherItem, topic: %{public}d", topic_); in ~PublisherItem()
/foundation/distributedhardware/distributed_hardware_fwk/services/distributedhardwarefwkservice/test/fuzztest/publisher_fuzzer/
H A Dpublisher_fuzzer.cpp38 void MockPublisherListener::OnMessage(const DHTopic topic, const std::string &message) in OnMessage() argument
40 (void)topic; in OnMessage()
60 DHTopic topic = topicFuzz[data[0] % TOPIC_SIZE]; in PublisherListenerFuzzTest() local
64 Publisher::GetInstance().RegisterListener(topic, listener); in PublisherListenerFuzzTest()
65 Publisher::GetInstance().PublishMessage(topic, message); in PublisherListenerFuzzTest()
66 Publisher::GetInstance().UnregisterListener(topic, listener); in PublisherListenerFuzzTest()
/foundation/distributedhardware/distributed_hardware_fwk/interfaces/inner_kits/test/unittest/common/ipc/distributed_hardware_proxy/include/
H A Ddistributed_hardware_proxy_test.h47 int32_t RegisterPublisherListener(const DHTopic topic, const sptr<IPublisherListener> listener) in RegisterPublisherListener() argument
49 (void)topic; in RegisterPublisherListener()
54 int32_t UnregisterPublisherListener(const DHTopic topic, const sptr<IPublisherListener> listener) in UnregisterPublisherListener() argument
56 (void)topic; in UnregisterPublisherListener()
61 int32_t PublishMessage(const DHTopic topic, const std::string &msg) in PublishMessage() argument
63 (void)topic; in PublishMessage()
137 void OnMessage(const DHTopic topic, const std::string& message) in OnMessage() argument
139 (void)topic; in OnMessage()
/foundation/distributedhardware/distributed_hardware_fwk/interfaces/inner_kits/test/unittest/common/ipc/dhfwk_sa_manager/include/
H A Ddhfwk_sa_manager_test.h46 int32_t RegisterPublisherListener(const DHTopic topic, const sptr<IPublisherListener> listener) in RegisterPublisherListener() argument
48 (void)topic; in RegisterPublisherListener()
53 int32_t UnregisterPublisherListener(const DHTopic topic, const sptr<IPublisherListener> listener) in UnregisterPublisherListener() argument
55 (void)topic; in UnregisterPublisherListener()
60 int32_t PublishMessage(const DHTopic topic, const std::string &msg) in PublishMessage() argument
62 (void)topic; in PublishMessage()
/foundation/distributedhardware/distributed_hardware_fwk/services/distributedhardwarefwkservice/test/unittest/common/distributedhardwarestub/include/
H A Ddistributed_hardware_stub_test.h38 int32_t RegisterPublisherListener(const DHTopic topic, const sptr<IPublisherListener> listener) in RegisterPublisherListener() argument
40 (void)topic; in RegisterPublisherListener()
45 int32_t UnregisterPublisherListener(const DHTopic topic, const sptr<IPublisherListener> listener) in UnregisterPublisherListener() argument
47 (void)topic; in UnregisterPublisherListener()
52 int32_t PublishMessage(const DHTopic topic, const std::string &msg) in PublishMessage() argument
54 (void)topic; in PublishMessage()
/foundation/distributedhardware/distributed_hardware_fwk/services/distributedhardwarefwkservice/src/lowlatency/
H A Dlow_latency_listener.cpp39 void LowLatencyListener::OnMessage(const DHTopic topic, const std::string& message) in OnMessage() argument
41 (void) topic; in OnMessage()
44 if (topic <= DHTopic::TOPIC_MIN || topic >= DHTopic::TOPIC_MAX) { in OnMessage()
45 DHLOGE("Topic is invalid, topic: %{public}" PRIu32, (uint32_t)topic); in OnMessage()
/foundation/distributedhardware/distributed_hardware_fwk/services/distributedhardwarefwkservice/src/ipc/
H A Dpublisher_listener_proxy.cpp32 void PublisherListenerProxy::OnMessage(const DHTopic topic, const std::string& message) in OnMessage() argument
39 if (topic < DHTopic::TOPIC_MIN || topic > DHTopic::TOPIC_MAX) { in OnMessage()
55 if (!data.WriteUint32((uint32_t)topic)) { in OnMessage()
56 DHLOGE("Parcel write topic failed"); in OnMessage()
/foundation/distributedhardware/distributed_hardware_fwk/interfaces/inner_kits/src/ipc/
H A Dpublisher_listener_stub.cpp42 DHTopic topic = static_cast<DHTopic>(data.ReadUint32()); in OnRemoteRequest() local
43 if (topic < DHTopic::TOPIC_MIN || topic > DHTopic::TOPIC_MAX) { in OnRemoteRequest()
52 OnMessage(topic, message); in OnRemoteRequest()
/foundation/distributedhardware/distributed_hardware_fwk/services/distributedhardwarefwkservice/test/fuzztest/publisheritem_fuzzer/
H A Dpublisheritem_fuzzer.cpp38 void MockPublisherItemListener::OnMessage(const DHTopic topic, const std::string &message) in OnMessage() argument
40 (void)topic; in OnMessage()
60 DHTopic topic = topicFuzz[data[0] % TOPIC_SIZE]; in PublisherItemFuzzTest() local
64 PublisherItem publisherItem(topic); in PublisherItemFuzzTest()
/foundation/distributedhardware/distributed_hardware_fwk/services/distributedhardwarefwkservice/include/publisher/
H A Dpublisher.h31 void RegisterListener(const DHTopic topic, const sptr<IPublisherListener> listener);
32 void UnregisterListener(const DHTopic topic, const sptr<IPublisherListener> listener);
33 void PublishMessage(const DHTopic topic, const std::string &message);
/foundation/distributedhardware/distributed_hardware_fwk/interfaces/inner_kits/test/fuzztest/distributedhardwarefwkkit_fuzzer/
H A Ddistributedhardwarefwkkit_fuzzer.cpp37 void TestPublisherListener::OnMessage(const DHTopic topic, const std::string &message) in OnMessage() argument
39 (void)topic; in OnMessage()
51 DHTopic topic = static_cast<DHTopic>(*(reinterpret_cast<const uint32_t*>(data))); in RegisterPublisherListenerFuzzTest() local
52 dhfwkKit.RegisterPublisherListener(topic, listener); in RegisterPublisherListenerFuzzTest()
64 DHTopic topic = static_cast<DHTopic>(*(reinterpret_cast<const uint32_t*>(data))); in PublishMessageFuzzTest() local
66 dhfwkKit.PublishMessage(topic, message); in PublishMessageFuzzTest()
78 DHTopic topic = static_cast<DHTopic>(*(reinterpret_cast<const uint32_t*>(data))); in UnregisterPublisherListenerFuzzTest() local
79 dhfwkKit.UnregisterPublisherListener(topic, listener); in UnregisterPublisherListenerFuzzTest()
/foundation/distributedhardware/distributed_hardware_fwk/interfaces/inner_kits/include/
H A Ddistributed_hardware_fwk_kit.h52 * @param topic Distributed hardware topic.
56 API_EXPORT int32_t RegisterPublisherListener(const DHTopic topic, sptr<IPublisherListener> listener);
60 * @param topic Distributed hardware topic.
64 API_EXPORT int32_t UnregisterPublisherListener(const DHTopic topic, sptr<IPublisherListener> listener);
68 * @param topic Distributed hardware topic.
72 API_EXPORT int32_t PublishMessage(const DHTopic topic, const std::string &message);
162 * @brief Determine whether the topic i
[all...]
/foundation/distributedhardware/distributed_hardware_fwk/services/distributedhardwarefwkservice/test/unittest/common/distributedhardwareservice/include/
H A Dmock_publisher_listener.h27 void OnMessage(const DHTopic topic, const std::string& message) in OnMessage() argument
29 (void) topic; in OnMessage()
/foundation/distributedhardware/distributed_hardware_fwk/services/distributedhardwarefwkservice/test/unittest/common/publisher/include/
H A Dpublisher_item_test.h41 void OnMessage(const DHTopic topic, const std::string& message) in OnMessage() argument
43 (void)topic; in OnMessage()
/foundation/distributedhardware/distributed_hardware_fwk/services/distributedhardwarefwkservice/src/
H A Ddistributed_hardware_stub.cpp104 DHTopic topic = (DHTopic)topicInt; in RegisterPublisherListenerInner() local
111 DHLOGI("Register listener, topic: %{public}" PRIu32, (uint32_t)topic); in RegisterPublisherListenerInner()
112 RegisterPublisherListener(topic, listener); in RegisterPublisherListenerInner()
131 DHTopic topic = (DHTopic)topicInt; in UnregisterPublisherListenerInner() local
138 DHLOGI("Unregister listener, topic: %{public}" PRIu32, (uint32_t)topic); in UnregisterPublisherListenerInner()
139 UnregisterPublisherListener(topic, listener); in UnregisterPublisherListenerInner()
158 DHTopic topic = (DHTopic)topicInt; in PublishMessageInner() local
160 DHLOGI("Publish message, topic in PublishMessageInner()
316 ValidTopic(uint32_t topic) ValidTopic() argument
[all...]

Completed in 8 milliseconds

123