Lines Matching refs:oid
250 static void oid_release(sw_discovery self, sw_discovery_oid oid) { in oid_release() argument
252 assert(oid < OID_MAX); in oid_release()
254 assert(self->oid_table[oid].type != OID_UNUSED); in oid_release()
256 self->oid_table[oid].type = OID_UNUSED; in oid_release()
257 self->oid_table[oid].discovery = NULL; in oid_release()
258 self->oid_table[oid].reply = NULL; in oid_release()
259 self->oid_table[oid].object = NULL; in oid_release()
260 self->oid_table[oid].extra = NULL; in oid_release()
261 self->oid_table[oid].service_data = NULL; in oid_release()
264 static oid_data* oid_get(sw_discovery self, sw_discovery_oid oid) { in oid_get() argument
267 if (oid >= OID_MAX) in oid_get()
270 if (self->oid_table[oid].type == OID_UNUSED) in oid_get()
273 return &self->oid_table[oid]; in oid_get()
308 sw_discovery_oid oid; in client_callback() local
315 for (oid = 0; oid < OID_MAX; oid++) { in client_callback()
317 switch (self->oid_table[oid].type) { in client_callback()
320 reg_client_callback(&self->oid_table[oid], state); in client_callback()
325 …browse_reply) self->oid_table[oid].reply)(self, oid, SW_DISCOVERY_BROWSE_INVALID, 0, NULL, NULL, N… in client_callback()
766 sw_discovery_oid * oid) { in sw_discovery_publish() argument
777 assert(oid); in sw_discovery_publish()
785 if ((*oid = oid_alloc(self, OID_ENTRY_GROUP)) == (sw_discovery_oid) -1) { in sw_discovery_publish()
792 oid_release(self, *oid); in sw_discovery_publish()
796 data = oid_get(self, *oid); in sw_discovery_publish()
835 if (*oid != (sw_discovery_oid) -1) in sw_discovery_publish()
836 sw_discovery_cancel(self, *oid); in sw_discovery_publish()
885 sw_discovery_oid * oid) { in sw_discovery_browse_domains() argument
893 assert(oid); in sw_discovery_browse_domains()
897 if ((*oid = oid_alloc(self, OID_DOMAIN_BROWSER)) == (sw_discovery_oid) -1) in sw_discovery_browse_domains()
900 data = oid_get(self, *oid); in sw_discovery_browse_domains()
921 if (*oid != (sw_discovery_oid) -1) in sw_discovery_browse_domains()
922 sw_discovery_cancel(self, *oid); in sw_discovery_browse_domains()
992 sw_discovery_oid * oid) { in sw_discovery_resolve() argument
1002 assert(oid); in sw_discovery_resolve()
1006 if ((*oid = oid_alloc(self, OID_SERVICE_RESOLVER)) == (sw_discovery_oid) -1) in sw_discovery_resolve()
1009 data = oid_get(self, *oid); in sw_discovery_resolve()
1030 if (*oid != (sw_discovery_oid) -1) in sw_discovery_resolve()
1031 sw_discovery_cancel(self, *oid); in sw_discovery_resolve()
1085 sw_discovery_oid * oid) { in sw_discovery_browse() argument
1094 assert(oid); in sw_discovery_browse()
1098 if ((*oid = oid_alloc(self, OID_SERVICE_BROWSER)) == (sw_discovery_oid) -1) in sw_discovery_browse()
1101 data = oid_get(self, *oid); in sw_discovery_browse()
1122 if (*oid != (sw_discovery_oid) -1) in sw_discovery_browse()
1123 sw_discovery_cancel(self, *oid); in sw_discovery_browse()
1128 sw_result sw_discovery_cancel(sw_discovery self, sw_discovery_oid oid) { in sw_discovery_cancel() argument
1134 if (!(data = oid_get(self, oid))) in sw_discovery_cancel()
1165 oid_release(self, oid); in sw_discovery_cancel()