1 /* 2 ################################################################################ 3 # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 4 # Read the zproject/README.md for information about making permanent changes. # 5 ################################################################################ 6 */ 7 8 #include "QmlZiflist.h" 9 10 11 /// 12 // Reload network interfaces from system reload()13void QmlZiflist::reload () { 14 ziflist_reload (self); 15 }; 16 17 /// 18 // Return the number of network interfaces on system size()19size_t QmlZiflist::size () { 20 return ziflist_size (self); 21 }; 22 23 /// 24 // Get first network interface, return NULL if there are none first()25const QString QmlZiflist::first () { 26 return QString (ziflist_first (self)); 27 }; 28 29 /// 30 // Get next network interface, return NULL if we hit the last one next()31const QString QmlZiflist::next () { 32 return QString (ziflist_next (self)); 33 }; 34 35 /// 36 // Return the current interface IP address as a printable string address()37const QString QmlZiflist::address () { 38 return QString (ziflist_address (self)); 39 }; 40 41 /// 42 // Return the current interface broadcast address as a printable string broadcast()43const QString QmlZiflist::broadcast () { 44 return QString (ziflist_broadcast (self)); 45 }; 46 47 /// 48 // Return the current interface network mask as a printable string netmask()49const QString QmlZiflist::netmask () { 50 return QString (ziflist_netmask (self)); 51 }; 52 53 /// 54 // Return the list of interfaces. print()55void QmlZiflist::print () { 56 ziflist_print (self); 57 }; 58 59 /// 60 // Reload network interfaces from system, including IPv6 reloadIpv6()61void QmlZiflist::reloadIpv6 () { 62 ziflist_reload_ipv6 (self); 63 }; 64 65 /// 66 // Return true if the current interface uses IPv6 isIpv6()67bool QmlZiflist::isIpv6 () { 68 return ziflist_is_ipv6 (self); 69 }; 70 71 qmlAttachedProperties(QObject * object)72QObject* QmlZiflist::qmlAttachedProperties(QObject* object) { 73 return new QmlZiflistAttached(object); 74 } 75 76 77 /// 78 // Get a list of network interfaces currently defined on the system 79 // Includes IPv6 interfaces newIpv6()80QmlZiflist *QmlZiflistAttached::newIpv6 () { 81 QmlZiflist *retQ_ = new QmlZiflist (); 82 retQ_->self = ziflist_new_ipv6 (); 83 return retQ_; 84 }; 85 86 /// 87 // Self test of this class. test(bool verbose)88void QmlZiflistAttached::test (bool verbose) { 89 ziflist_test (verbose); 90 }; 91 92 /// 93 // Get a list of network interfaces currently defined on the system construct()94QmlZiflist *QmlZiflistAttached::construct () { 95 QmlZiflist *qmlSelf = new QmlZiflist (); 96 qmlSelf->self = ziflist_new (); 97 return qmlSelf; 98 }; 99 100 /// 101 // Destroy a ziflist instance destruct(QmlZiflist * qmlSelf)102void QmlZiflistAttached::destruct (QmlZiflist *qmlSelf) { 103 ziflist_destroy (&qmlSelf->self); 104 }; 105 106 /* 107 ################################################################################ 108 # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # 109 # Read the zproject/README.md for information about making permanent changes. # 110 ################################################################################ 111 */ 112