• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 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 /**
17  * @addtogroup Softbus
18  * @{
19  *
20  * @brief Provides high-speed, secure communication between devices.
21  *
22  * This module implements unified distributed communication capability management between nearby devices, and provides
23  * link-independent device discovery and transmission interfaces to support service publishing and data transmission.
24  *
25  * @since 1.0
26  * @version 1.0
27  */
28 
29 /**
30  * @file softbus_bus_center.h
31  *
32  * @brief Declares functions and constants for the bus center of the Intelligent Soft Bus.
33  *
34  * The functions are used to perform
35  * the following operations: \n
36  * <ul>
37  * <li>Adding a device to and removing a device from a LNN</li>
38  * <li>Listening for device online, offline, and information change events</li>
39  *
40  * @since 1.0
41  * @version 1.0
42  */
43 
44 #ifndef SOFTBUS_BUS_CENTER_H
45 #define SOFTBUS_BUS_CENTER_H
46 
47 #include <stdbool.h>
48 #include <stdint.h>
49 
50 #include "softbus_common.h"
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
56 /**
57  * @brief Indicates the length of a device name buffer, including the terminating null character <b>\0</b>.
58  *
59  * @since 1.0
60  * @version 1.0
61  */
62 #define DEVICE_NAME_BUF_LEN 128
63 
64 /**
65  * @brief Indicates the mask bit for a device online event.
66  * If you want to receive such events, set the mask bit in {@link INodeStateCb.events}.
67  *
68  * @since 1.0
69  * @version 1.0
70  */
71 #define EVENT_NODE_STATE_ONLINE 0x1
72 
73 /**
74  * @brief Indicates the mask bit for a device offline event.
75  * If you want to receive such events, set the mask bit in {@link INodeStateCb.events}.
76  *
77  * @since 1.0
78  * @version 1.0
79  */
80 #define EVENT_NODE_STATE_OFFLINE 0x02
81 
82 /**
83  * @brief Indicates the mask bit for a peer device information change event.
84  * If you want to receive such events, set the mask bit in {@link INodeStateCb.events}.
85  *
86  * @since 1.0
87  * @version 1.0
88  */
89 #define EVENT_NODE_STATE_INFO_CHANGED 0x04
90 
91 /**
92  * @brief Indicates mask bits for {@link INodeStateCb.events}.
93  *
94  * @since 1.0
95  * @version 1.0
96  */
97 #define EVENT_NODE_STATE_MASK 0x07
98 
99 /**
100  * @brief The maximum length of meta node bypass info {@link MetaNodeConfigInfo.bypassInfo}.
101  *
102  * @since 1.0
103  * @version 1.0
104  */
105 #define META_NODE_BYPASS_INFO_LEN 64
106 
107 /**
108  * @brief The maximum of meta node {@link MetaNodeConfigInfo.bypassInfo}.
109  *
110  * @since 1.0
111  * @version 1.0
112  */
113 #define MAX_META_NODE_NUM 3
114 
115 /**
116  * @brief Enumerates keys for an online device.
117  * The key can be obtained via {@link GetNodeKeyInfo}.
118  *
119  * @since 1.0
120  * @version 1.0
121  */
122 typedef enum {
123     NODE_KEY_UDID = 0,  /**< UDID in string format*/
124     NODE_KEY_UUID,      /**< UUID in string format */
125     NODE_KEY_MASTER_UDID, /**< UDID of master node in string format */
126     NODE_KEY_BR_MAC,    /**< BR MAC in string format */
127     NODE_KEY_IP_ADDRESS, /**< IP address in string format */
128     NODE_KEY_DEV_NAME,   /**< Device name in string format */
129     NODE_KEY_NETWORK_CAPABILITY,   /**< Network capability in number format */
130     NODE_KEY_NETWORK_TYPE,        /**< Network type in number format */
131 } NodeDeviceInfoKey;
132 
133 /**
134  * @brief Enumerates accuracy for time synchronize among device.
135  *
136  * @since 1.0
137  * @version 1.0
138  */
139 typedef enum {
140     LOW_ACCURACY = 10,
141     NORMAL_ACCURACY,
142     HIGH_ACCURACY,
143     SUPER_HIGH_ACCURACY,
144     UNAVAIL_ACCURACY = 0xFFFF,
145 } TimeSyncAccuracy;
146 
147 /**
148  * @brief Enumerates time synchronize period among device.
149  *
150  * @since 1.0
151  * @version 1.0
152  */
153 typedef enum {
154     SHORT_PERIOD = 0,
155     NORMAL_PERIOD,
156     LONG_PERIOD,
157 } TimeSyncPeriod;
158 
159 /**
160  * @brief Enumerates time synchronize flag.
161  *
162  * @since 1.0
163  * @version 1.0
164  */
165 typedef enum {
166     NODE_SPECIFIC = 0,
167     ALL_LNN,
168     WRITE_RTC,
169 } TimeSyncFlag;
170 
171 /**
172  * @brief Defines the basic information about a device.
173  *
174  * @since 1.0
175  * @version 1.0
176  */
177 typedef struct {
178     char networkId[NETWORK_ID_BUF_LEN];    /**< Device ID */
179     char deviceName[DEVICE_NAME_BUF_LEN];  /**< Device name */
180     uint16_t deviceTypeId;
181 } NodeBasicInfo;
182 
183 /**
184  * @brief Enumerates device information change types. For details, see {@link INodeStateCb.onNodeBasicInfoChanged}.
185  *
186  * @since 1.0
187  * @version 1.0
188  */
189 typedef enum {
190     TYPE_NETWORK_ID = 0,  /**< Network ID change */
191     TYPE_DEVICE_NAME,     /**< Device name change */
192 } NodeBasicInfoType;
193 
194 /**
195  * @brief time synchronize result.
196  *
197  * @since 1.0
198  * @version 1.0
199  */
200 typedef struct {
201     int32_t millisecond;
202     int32_t microsecond;
203     TimeSyncAccuracy accuracy;
204 } TimeSyncResult;
205 
206 /**
207  * @brief time synchronize result info.
208  *
209  * @since 1.0
210  * @version 1.0
211  */
212 typedef struct {
213     TimeSyncResult result;
214     TimeSyncFlag flag;
215     union {
216         char targetNetworkId[NETWORK_ID_BUF_LEN];
217         char masterNetworkId[NETWORK_ID_BUF_LEN];
218     } target;
219 } TimeSyncResultInfo;
220 
221 /**
222  * @brief Enumerates error codes for service publishing failures.
223  *
224  * The error codes are returned to the caller through <b>IPublishCallback</b>.
225  *
226  */
227 typedef enum {
228     /* publish success */
229     PUBLISH_LNN_SUCCESS = 0,
230     /* Unsupported medium */
231     PUBLISH_LNN_NOT_SUPPORT_MEDIUM = 1,
232     /* internal error */
233     PUBLISH_LNN_INTERNAL = 2,
234     /* Unknown reason */
235     PUBLISH_LNN_UNKNOWN = 0xFF
236 } PublishResult;
237 
238 /**
239  * @brief Enumerates error codes for service subscription failures.
240  *
241  * The error codes are returned to the caller through <b>IDiscoveryCallback</b>.
242  *
243  */
244 typedef enum {
245     /* refresh success */
246     REFRESH_LNN_SUCCESS = 0,
247     /* Unsupported medium */
248     REFRESH_LNN_NOT_SUPPORT_MEDIUM = 1,
249     /* internal error */
250     REFRESH_LNN_INTERNAL = 2,
251     /* Unknown error */
252     REFRESH_LNN_UNKNOWN = 0xFF
253 } RefreshResult;
254 
255 /**
256  * @brief Defines the callbacks for successful and failed service publishing.
257  *
258  */
259 typedef struct {
260     /** Callback for publish result */
261     void (*OnPublishResult)(int publishId, PublishResult reason);
262 } IPublishCb;
263 
264 /**
265  * @brief Defines a callback for service subscription.
266  *
267  * Three types of callbacks are available.
268  *
269  */
270 typedef struct {
271     /** Callback that is invoked when a device is found */
272     void (*OnDeviceFound)(const DeviceInfo *device);
273     /** Callback for a subscription result */
274     void (*OnDiscoverResult)(int32_t refreshId, RefreshResult reason);
275 } IRefreshCallback;
276 
277 /**
278  * @brief Defines a callback that is invoked when the device state or information changes.
279  * For details, see {@link RegNodeDeviceStateCb}.
280  *
281  * @since 1.0
282  * @version 1.0
283  */
284 typedef struct {
285     /**
286      * Mask of an event that is listened for.
287      * The event can be received only if the corresponding mask bit is set and the callback is specified.
288      */
289     uint32_t events;
290     /**
291      * @brief Called when a specified device gets online.
292      *
293      * @param info Indicates the pointer to the basic information about the device.
294      * For details, see {@link NodeBasicInfo}.
295      *
296      * @since 1.0
297      * @version 1.0
298      */
299     void (*onNodeOnline)(NodeBasicInfo *info);
300     /**
301      * @brief Called when a specified device gets offline.
302      *
303      * @param info Indicates the pointer to the basic information about the device.
304      * For details, see {@link NodeBasicInfo}.
305      *
306      * @since 1.0
307      * @version 1.0
308      */
309     void (*onNodeOffline)(NodeBasicInfo *info);
310     /**
311      * @brief Called when the basic information of a device changes.
312      *
313      * @param type Indicates the device type. For details, see {@link NodeBasicInfoType}.
314      * @param info Indicates the pointer to the new basic information of the device.
315      * For details, see {@link NodeBasicInfo}.
316      *
317      * @since 1.0
318      * @version 1.0
319      */
320     void (*onNodeBasicInfoChanged)(NodeBasicInfoType type, NodeBasicInfo *info);
321 } INodeStateCb;
322 
323 /**
324  * @brief Defines a callback that is invoked when the time synchronize has result.
325  *
326  * @since 1.0
327  * @version 1.0
328  */
329 typedef struct {
330     /**
331      * @brief Called when the time synchronize has result.
332      *
333      * @param info Contains the time synchronize result info, see {@link TimeSyncResultInfo}.
334      * @param retCode Indicates the result code. Value <b>0</b> indicates that the time synchronize is successful and
335      * result is valid, and any other value indicates the opposite.
336      *
337      * @since 1.0
338      * @version 1.0
339      */
340     void (*onTimeSyncResult)(const TimeSyncResultInfo *info, int32_t retCode);
341 } ITimeSyncCb;
342 
343 /**
344  * @brief Defines a meta node configuration, see {@link ActiveMetaNode}.
345  *
346  * @since 1.0
347  * @version 1.0
348  */
349 typedef struct {
350     char udid[UDID_BUF_LEN];
351     char deviceName[DEVICE_NAME_BUF_LEN];
352     uint16_t deviceTypeId;
353     uint8_t addrNum;
354     ConnectionAddr addr[CONNECTION_ADDR_MAX];
355     char bypassInfo[META_NODE_BYPASS_INFO_LEN];
356 } MetaNodeConfigInfo;
357 
358 /**
359  * @brief Defines a meta node infomation, see {@link GetAllMetaNodeInfo}.
360  *
361  * @since 1.0
362  * @version 1.0
363  */
364 typedef struct {
365     char metaNodeId[NETWORK_ID_BUF_LEN];
366     bool isOnline;
367     MetaNodeConfigInfo configInfo;
368 } MetaNodeInfo;
369 
370 /**
371  * @brief Called when a device is added to a LNN via {@link JoinLNN}.
372  *
373  * @param addr Indicates the pointer to the address of the peer device.
374  * @param networkId Indicates the pointer to the network ID of the device if it is successfully added to the LNN.
375  * This parameter makes no sense if the device fails to be added to the LNN.
376  * @param retCode Indicates the result code. Value <b>0</b> indicates that the device is successfully added to the LNN,
377  * and any other value indicates the opposite.
378  *
379  * @since 1.0
380  * @version 1.0
381  */
382 typedef void (*OnJoinLNNResult)(ConnectionAddr *addr, const char *networkId, int32_t retCode);
383 
384 /**
385  * @brief Called when a device is removed from a LNN via {@link LeaveLNN}.
386  *
387  * @param networkId Indicates the pointer to the network ID of the device.
388  * @param retCode Indicates the result code. Value <b>0</b> indicates that the device is successfully
389  * removed from the LNN, and any other value indicates the opposite.
390  *
391  * @since 1.0
392  * @version 1.0
393  */
394 typedef void (*OnLeaveLNNResult)(const char *networkId, int32_t retCode);
395 
396 /**
397  * @brief Adds the current device to the LNN where a specified device resides.
398  *
399  * @param pkgName Indicates the pointer to the caller ID, for example, the package name.
400  * For the same caller, the value of this parameter must be the same for all functions.
401  * @param target Indicates the pointer to the address of the specified device. For details, see {@link ConnectionAddr}.
402  * @param cb Indicates the callback for the result. If you set this parameter to NULL, you will not receive the result.
403  *
404  * @return Returns <b>0</b> if the request to add the device is accepted, and the result can be obtained from the
405  * callback; returns any other value if the device fails to be added to the network, in which case you will not receive
406  * the result.
407  *
408  * @since 1.0
409  * @version 1.0
410  */
411 int32_t JoinLNN(const char *pkgName, ConnectionAddr *target, OnJoinLNNResult cb);
412 
413 /**
414  * @brief Removes the current device from the LNN.
415  *
416  * @param networkId Indicates the pointer to the network ID that is returned
417  * after the device is added to the LNN via {@link JoinLNN}.
418  * @param cb Indicates the callback for the result. If you set this parameter to <b>NULL</b>,
419  * you will not receive the result.
420  *
421  * @return Returns <b>0</b> if the request to remove the device is accepted, and the result can be obtained from the
422  * callback; returns any other value if the device fails to be removed from the network, in which case you will not
423  * receive the result.
424  *
425  * @since 1.0
426  * @version 1.0
427  */
428 int32_t LeaveLNN(const char *pkgName, const char *networkId, OnLeaveLNNResult cb);
429 
430 /**
431  * @brief Registers a callback for device state changes.
432  *
433  * @param pkgName Indicates the pointer to the caller ID, for example, the package name.
434  * For the same caller, the value of this parameter must be the same for all functions.
435  * @param callback Indicates the pointer to the callback to register. For details, see {@link INodeStateCb}.
436  *
437  * @return Returns <b>0</b> if the registration is successful; returns any other value otherwise.
438  *
439  * @since 1.0
440  * @version 1.0
441  */
442 int32_t RegNodeDeviceStateCb(const char *pkgName, INodeStateCb *callback);
443 
444 /**
445  * @brief Unregisters a callback for device state changes.
446  *
447  * @param callback Indicates the pointer to the callback to unregister. For details, see {@link INodeStateCb}.
448  *
449  * @return Returns <b>0</b> if the unregistration is successful; returns any other value otherwise.
450  *
451  * @since 1.0
452  * @version 1.0
453  */
454 int32_t UnregNodeDeviceStateCb(INodeStateCb *callback);
455 
456 /**
457  * @brief Obtains basic information about all the online devices.
458  *
459  * @param pkgName Indicates the pointer to the caller ID, for example, the package name.
460  * For the same caller, the value of this parameter must be the same for all functions.
461  * @param info Indicates the double pointer to the memory that stores the obtained basic information.
462  * @param infoNum Indicates the pointer to the number of devices.
463  *
464  * @return Returns <b>0</b> if the basic information is obtained, in which case <b>info</b> and <b>infoNum</b> are
465  * valid; returns any other value otherwise.
466  *
467  * @since 1.0
468  * @version 1.0
469  */
470 int32_t GetAllNodeDeviceInfo(const char *pkgName, NodeBasicInfo **info, int32_t *infoNum);
471 
472 /**
473  * @brief Releases the memory returned by {@link GetAllNodeDeviceInfo}.
474  *
475  * @param info Indicates the pointer to the memory returned by {@link GetAllNodeDeviceInfo}.
476  *
477  * @since 1.0
478  * @version 1.0
479  */
480 void FreeNodeInfo(NodeBasicInfo *info);
481 
482 /**
483  * @brief Obtains basic information about the current device.
484  *
485  * @param pkgName Indicates the pointer to the caller ID, for example, the package name.
486  * For the same caller, the value of this parameter must be the same for all functions.
487  * @param info Indicates the double pointer to the memory that stores the obtained basic information.
488  *
489  * @return Returns <b>0</b> if the basic information is obtained, in which case <b>info</b> is valid;
490  * returns any other value otherwise.
491  *
492  * @since 1.0
493  * @version 1.0
494  */
495 int32_t GetLocalNodeDeviceInfo(const char *pkgName, NodeBasicInfo *info);
496 
497 /**
498  * @brief Obtains a specified {@link NodeDeviceInfoKey} of an online device.
499  *
500  * @param pkgName Indicates the pointer to the caller ID, for example, the package name.
501  * For the same caller, the value of this parameter must be the same for all functions.
502  * @param networkId Indicates the pointer to the network ID of the device.
503  * @param key Indicates the key to be obtained.
504  * @param info Indicates the pointer to the buffer that stores the obtained key.
505  * @param infoLen Indicates the buffer length.
506  *
507  * @return Returns <b>0</b> if the {@link NodeDeviceInfoKey} is obtained, in which case <b>info</b> is valid;
508  * returns any other value otherwise.
509  *
510  * @since 1.0
511  * @version 1.0
512  */
513 int32_t GetNodeKeyInfo(const char *pkgName, const char *networkId,
514     NodeDeviceInfoKey key, uint8_t *info, int32_t infoLen);
515 
516 /**
517  * @brief Start the time synchronize with specific target node.
518  *
519  * @param pkgName Indicates the pointer to the caller ID, for example, the package name.
520  * For the same caller, the value of this parameter must be the same for all functions.
521  * @param targetNetworkId Indicates the pointer to the address of the specified device.
522  * @param accuracy Time synchronize accuracy.
523  * @param period Time synchronize period
524  * @param cb Indicates the callback for the result.
525  *
526  * @return Returns <b>0</b> if the request is accepted, and the result can be obtained from the
527  * callback; returns any other value if the request fails, in which case you will not receive
528  * the result.
529  *
530  * @since 1.0
531  * @version 1.0
532  */
533 int32_t StartTimeSync(const char *pkgName, const char *targetNetworkId, TimeSyncAccuracy accuracy,
534     TimeSyncPeriod period, ITimeSyncCb *cb);
535 
536 /**
537  * @brief Stop the time synchronize with specific target node.
538  *
539  * @param pkgName Indicates the pointer to the caller ID, for example, the package name.
540  * For the same caller, the value of this parameter must be the same for all functions.
541  * @param targetNetworkId Indicates the pointer to the address of the specified device.
542  *
543  * @return Returns <b>0</b> if the request is removed; returns any other value if the request fails.
544  *
545  * @since 1.0
546  * @version 1.0
547  */
548 int32_t StopTimeSync(const char *pkgName, const char *targetNetworkId);
549 
550 /**
551  * @brief Publishes a specified service.
552  *
553  * Peer devices in the same LAN as the device that publishes this service can discover this service as needed.
554  * The service is identified by <b>publicId</b> and <b>pkgName</b>.
555  *
556  * @param pkgName Indicates the pointer to the service package name, which can contain a maximum of 64 bytes.
557  * @param info Indicates the pointer to the service publishing information. For details, see {@link PublishInfo}.
558  * @param cb Indicates the pointer to the service publishing callback {@link IPublishCallback}.
559  * @return Returns <b>SOFTBUS_INVALID_PARAM</b> if any parameter is null or invalid.
560  * @return Returns <b>SOFTBUS_DISCOVER_NOT_INIT</b> if the Intelligent Soft Bus client fails to be initialized.
561  * @return Returns <b>SOFTBUS_LOCK_ERR</b> if the mutex fails to be locked.
562  * @return Returns <b>SOFTBUS_OK</b> if the service is successfully published.
563  */
564 int32_t PublishLNN(const char *pkgName, const PublishInfo *info, const IPublishCb *cb);
565 
566 /**
567  * @brief stoppublishes a specified service.
568  *
569  * @param pkgName Indicates the pointer to the service package name, which can contain a maximum of 64 bytes.
570  * @param publishId Indicates the service ID.
571  * @return Returns <b>SOFTBUS_INVALID_PARAM</b> if <b>pkgName</b> is invalid.
572  * @return Returns <b>SOFTBUS_DISCOVER_NOT_INIT</b> if the Intelligent Soft Bus client fails to be initialized.
573  * @return Returns <b>SOFTBUS_OK</b> if the service is successfully unpublished.
574  */
575 int32_t StopPublishLNN(const char *pkgName, int32_t publishId);
576 
577 /**
578  * @brief Subscribes to a specified service.
579  *
580  * Information about the device that publishes the service will be reported to the device that subscribes to
581  * the service.
582  * The service is identified by <b>subscribeId</b> and <b>pkgName</b>.
583  *
584  * @param pkgName Indicates the pointer to the service package name, which can contain a maximum of 64 bytes.
585  * @param info Indicates the pointer to the service subscription information. For details, see {@link RefreshInfo}.
586  * @param cb Indicates the service subscription callback {@link IRefreshCallback}.
587  * @return Returns <b>SOFTBUS_INVALID_PARAM</b> if any parameter is null or invalid.
588  * @return Returns <b>SOFTBUS_DISCOVER_NOT_INIT</b> if the Intelligent Soft Bus client fails to be initialized.
589  * @return Returns <b>SOFTBUS_LOCK_ERR</b> if the mutex fails to be locked.
590  * @return Returns <b>SOFTBUS_OK</b> if the service subscription is successful.
591  */
592 int32_t RefreshLNN(const char *pkgName, const SubscribeInfo *info, const IRefreshCallback *cb);
593 
594 /**
595  * @brief Unsubscribes from a specified service.
596  *
597  * @param pkgName Indicates the pointer to the service package name, which can contain a maximum of 64 bytes.
598  * @param refreshId Indicates the service ID.
599  * @return Returns <b>SOFTBUS_INVALID_PARAM</b> if <b>pkgName</b> is invalid.
600  * @return Returns <b>SOFTBUS_DISCOVER_NOT_INIT</b> if the Intelligent Soft Bus client fails to be initialized.
601  * @return Returns <b>SOFTBUS_OK</b> if the service unsubscription is successful.
602  */
603 int32_t StopRefreshLNN(const char *pkgName, int32_t refreshId);
604 
605 /**
606  * @brief Active meta node. The meta node online status will be notified by {@link INodeStateCb}
607  *
608  * @param pkgName Indicates the pointer to the caller ID, for example, the package name.
609  * For the same caller, the value of this parameter must be the same for all functions.
610  * @param info Meta node configuration infomation, see {@link MetaNodeConfigInfo}.
611  * @param metaNodeId Save meta node ID when it is activated successfully, its buffer length must be not
612  * less then NETWORK_ID_BUF_LEN
613  *
614  * @return Returns <b>0</b> if the meta node is activated; returns any other value if the request fails.
615  *
616  * @since 1.0
617  * @version 1.0
618  */
619 int32_t ActiveMetaNode(const char *pkgName, const MetaNodeConfigInfo *info, char *metaNodeId);
620 
621 /**
622  * @brief Deactive meta node. The meta node will be removed.
623  *
624  * @param pkgName Indicates the pointer to the caller ID, for example, the package name.
625  * For the same caller, the value of this parameter must be the same for all functions.
626  * @param metaNodeId The meta node ID which deactivated, it's obtained by {@link ActiveMetaNode}.
627  *
628  * @return Returns <b>0</b> if the meta node is deactivated; returns any other value if the request fails.
629  *
630  * @since 1.0
631  * @version 1.0
632  */
633 int32_t DeactiveMetaNode(const char *pkgName, const char *metaNodeId);
634 
635 /**
636  * @brief Get all meta node by {@link ActiveMetaNode}.
637  *
638  * @param pkgName Indicates the pointer to the caller ID, for example, the package name.
639  * For the same caller, the value of this parameter must be the same for all functions.
640  * @param infos The buffer for save meta node info.
641  * @param infoNum The infos buffer num which maximum is {@link MAX_META_NODE_NUM}.
642  *
643  * @return Returns <b>0</b> if the call is success; returns any other value if it fails.
644  *
645  * @since 1.0
646  * @version 1.0
647  */
648 int32_t GetAllMetaNodeInfo(const char *pkgName, MetaNodeInfo *infos, int32_t *infoNum);
649 
650 #ifdef __cplusplus
651 }
652 #endif
653 
654 #endif
655 /** @} */