Changeset 121170 in webkit
- Timestamp:
- Jun 25, 2012 11:01:42 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r121152 r121170 1 2012-06-25 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 3 [EFL] Implement Network Information API 4 https://bugs.webkit.org/show_bug.cgi?id=87067 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 * Source/cmake/FindEFL.cmake: Find eeze library in build system. 9 1 10 2012-06-25 Carlos Garcia Campos <cgarcia@igalia.com> 2 11 -
trunk/Source/WebKit/ChangeLog
r121051 r121170 1 2012-06-25 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 3 [EFL] Implement Network Information API 4 https://bugs.webkit.org/show_bug.cgi?id=87067 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 * PlatformEfl.cmake: Add dependency of eeze library. 9 1 10 2012-06-22 Joshua Netterfield <jnetterfield@rim.com> 2 11 -
trunk/Source/WebKit/PlatformEfl.cmake
r119374 r121170 69 69 70 70 IF (ENABLE_NETWORK_INFO) 71 LIST(APPEND WebKit_LINK_FLAGS 72 ${EEZE_LDFLAGS} 73 ) 71 74 LIST(APPEND WebKit_INCLUDE_DIRECTORIES 72 75 "${WEBCORE_DIR}/Modules/networkinfo" 76 ${EEZE_INCLUDE_DIRS} 73 77 ) 74 78 LIST(APPEND WebKit_SOURCES 75 79 efl/WebCoreSupport/NetworkInfoClientEfl.cpp 80 ) 81 LIST(APPEND WebKit_LIBRARIES 82 ${EEZE_LIBRARIES} 76 83 ) 77 84 ENDIF () -
trunk/Source/WebKit/efl/ChangeLog
r121098 r121170 1 2012-06-25 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 3 [EFL] Implement Network Information API 4 https://bugs.webkit.org/show_bug.cgi?id=87067 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 Implement NetworkInfoClientEfl.cpp using eeze library. However, this patch only 9 supports this feature on ethernet interface. 10 11 * WebCoreSupport/NetworkInfoClientEfl.cpp: 12 (WebCore): 13 (WebCore::NetworkInfoClientEfl::NetworkInfoClientEfl): 14 (WebCore::NetworkInfoClientEfl::startUpdating): 15 (WebCore::NetworkInfoClientEfl::stopUpdating): 16 (WebCore::NetworkInfoClientEfl::bandwidth): 17 (WebCore::NetworkInfoClientEfl::metered): 18 * WebCoreSupport/NetworkInfoClientEfl.h: 19 (NetworkInfoClientEfl): 20 1 21 2012-06-23 Sheriff Bot <webkit.review.bot@gmail.com> 2 22 -
trunk/Source/WebKit/efl/WebCoreSupport/NetworkInfoClientEfl.cpp
r112815 r121170 32 32 #include "NetworkInfo.h" 33 33 #include "NotImplemented.h" 34 35 #include "ewk_private.h" 36 #include <Eeze.h> 37 #include <Eeze_Net.h> 34 38 #include <wtf/text/CString.h> 35 39 #include <wtf/text/WTFString.h> 36 40 37 41 namespace WebCore { 42 43 static const char* ethernetInterface = "eth0"; 44 38 45 NetworkInfoClientEfl::NetworkInfoClientEfl() 39 46 : m_controller(0) 47 , m_metered(false) 40 48 { 41 49 } … … 47 55 void NetworkInfoClientEfl::startUpdating() 48 56 { 49 notImplemented(); 57 if (!eeze_init()) { 58 ERR("Fail to start network information client."); 59 return; 60 } 50 61 } 51 62 52 63 void NetworkInfoClientEfl::stopUpdating() 53 64 { 54 notImplemented();65 eeze_shutdown(); 55 66 } 56 67 57 68 unsigned int NetworkInfoClientEfl::bandwidth() const 58 69 { 59 notImplemented(); 60 return 10; // MB/s 70 // FIXME : This function should consider cellular network as well. For example, 2G, 3G and 4G. 71 // See https://bugs.webkit.org/show_bug.cgi?id=89851 for detail. 72 Eeze_Net* ethNet = eeze_net_new(ethernetInterface); 73 if (!ethNet) 74 return 0; 75 76 eeze_net_scan(ethNet); 77 78 // FIXME : The eeze library doesn't support EEZE_NET_ADDR_TYPE_IP type yet. So, EEZE_NET_ADDR_TYPE_BROADCAST 79 // is used for now. 80 // See https://bugs.webkit.org/show_bug.cgi?id=89852 for detail. 81 const char* address = eeze_net_addr_get(ethNet, EEZE_NET_ADDR_TYPE_BROADCAST); 82 if (!address) 83 return 0; // If network is offline, return 0. 84 85 unsigned int bandwidth; 86 const char* attribute = eeze_net_attribute_get(ethNet, "speed"); 87 if (attribute) { 88 bool ok; 89 bandwidth = String::fromUTF8(attribute).toUIntStrict(&ok); 90 } else 91 bandwidth = UINT_MAX; // If bandwidth is unknown, return infinity value. 92 93 eeze_net_free(ethNet); 94 95 return bandwidth / 8; // MB/s 61 96 } 62 97 … … 64 99 { 65 100 notImplemented(); 66 return false;101 return m_metered; 67 102 } 68 103 -
trunk/Source/WebKit/efl/WebCoreSupport/NetworkInfoClientEfl.h
r112815 r121170 46 46 47 47 private: 48 NetworkInfoController* m_controller; 48 49 49 NetworkInfoController* m_controller;50 bool m_metered; 50 51 }; 51 52 } -
trunk/Source/cmake/FindEFL.cmake
r118103 r121170 13 13 eukit>=1.1.0 14 14 edbus>=1.1.0 15 ecore-input>=1.0.0) 15 ecore-input>=1.0.0 16 eeze>=1.1.99) 16 17 PKG_CHECK_MODULES (EINA REQUIRED eina>=1.0.0) 17 18 PKG_CHECK_MODULES (ECORE_X ecore-x>=1.0.0) -
trunk/Tools/ChangeLog
r121147 r121170 1 2012-06-25 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 3 [EFL] Implement Network Information API 4 https://bugs.webkit.org/show_bug.cgi?id=87067 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 * efl/jhbuild.modules: Add eeze library dependency. 9 1 10 2012-06-25 Simon Hausmann <simon.hausmann@nokia.com> 2 11 -
trunk/Tools/efl/jhbuild.modules
r120145 r121170 15 15 <dep package="edje"/> 16 16 <dep package="e_dbus"/> 17 <dep package="eeze"/> 17 18 </dependencies> 18 19 </metamodule> … … 219 220 </autotools> 220 221 222 <autotools id="eeze"> 223 <branch module="eeze" 224 repo="enlightenment.org" 225 revision="68629"/> 226 <dependencies> 227 <dep package="ecore"/> 228 <dep package="eina"/> 229 </dependencies> 230 </autotools> 231 221 232 </moduleset>
Note: See TracChangeset
for help on using the changeset viewer.