1 /* 2 * Copyright (C) 2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef COMMUNICATIONNETMANAGEREXT_MDNS_CONSTANT_H 17 #define COMMUNICATIONNETMANAGEREXT_MDNS_CONSTANT_H 18 19 #include <cstdint> 20 21 static constexpr int32_t SYSC_TIMEOUT = 5; 22 23 static constexpr int32_t PARAM_NONE = 0; 24 static constexpr int32_t PARAM_JUST_OPTIONS = 2; 25 static constexpr int32_t PARAM_OPTIONS_AND_CALLBACK = 3; 26 27 static constexpr const char *EVENT_SERVICESTART = "discoveryStart"; 28 static constexpr const char *EVENT_SERVICESTOP = "discoveryStop"; 29 static constexpr const char *EVENT_SERVICEFOUND = "serviceFound"; 30 static constexpr const char *EVENT_SERVICELOST = "serviceLost"; 31 32 static constexpr const char *ERRCODE = "errorCode"; 33 static constexpr const char *RETMSG = "retMsg"; 34 static constexpr const char *SERVICEINFO = "serviceInfo"; 35 static constexpr const char *SERVICEINFO_ATTR = "serviceAttribute"; 36 static constexpr const char *SERVICEINFO_ADDRESS = "address"; 37 static constexpr const char *SERVICEINFO_TYPE = "serviceType"; 38 static constexpr const char *SERVICEINFO_NAME = "serviceName"; 39 static constexpr const char *SERVICEINFO_PORT = "port"; 40 static constexpr const char *SERVICEINFO_HOST = "host"; 41 static constexpr const char *SERVICEINFO_FAMILY = "family"; 42 43 static constexpr const char *SERVICEINFO_ATTR_KEY = "key"; 44 static constexpr const char *SERVICEINFO_ATTR_VALUE = "value"; 45 static constexpr const char *CONTEXT_ATTR_APPINFO = "applicationInfo"; 46 static constexpr const char *APPINFO_ATTR_NAME = "name"; 47 48 static constexpr const char *MDNS_ERR = "MDNS_ERR"; 49 static constexpr const char *INTERNAL_ERROR_NAME = "INTERNAL_ERROR"; 50 static constexpr const char *ALREADY_ACTIVE_NAME = "ALREADY_ACTIVE"; 51 static constexpr const char *MAX_LIMIT_NAME = "MAX_LIMIT"; 52 53 enum { 54 ARG_NUM_0, 55 ARG_NUM_1, 56 ARG_NUM_2, 57 }; 58 59 enum MDnsErr { 60 INTERNAL_ERROR, 61 ALREADY_ACTIVE, 62 MAX_LIMIT, 63 }; 64 #endif /* COMMUNICATIONNETMANAGEREXT_MDNS_CONSTANT_H */ 65