• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdenetwork API Reference
  • KDE Home
  • Contact Us
 

kopete/libkopete

  • sources
  • kde-4.12
  • kdenetwork
  • kopete
  • libkopete
networkstatuscommon.cpp
Go to the documentation of this file.
1 #include "networkstatuscommon.h"
2 #include <kdebug.h>
3 
4 QDataStream & operator<< ( QDataStream & s, const NetworkStatus::Properties p )
5 {
6  kDebug() << "status is: " << (int)p.status;
7  s << (int)p.status;
8  s << (int)p.onDemandPolicy;
9  s << p.service;
10  s << ( p.internet ? 1 : 0 );
11  s << p.netmasks;
12  return s;
13 }
14 
15 QDataStream & operator>> ( QDataStream & s, NetworkStatus::Properties &p )
16 {
17  int status, onDemandPolicy, internet;
18  s >> status;
19  kDebug() << "status is: " << status;
20  p.status = ( NetworkStatus::EnumStatus )status;
21  s >> onDemandPolicy;
22  p.onDemandPolicy = ( NetworkStatus::EnumOnDemandPolicy )onDemandPolicy;
23  s >> p.service;
24  s >> internet;
25  if ( internet )
26  p.internet = true;
27  else
28  p.internet = false;
29  s >> p.netmasks;
30  kDebug() << "enum converted status is: " << p.status;
31  return s;
32 }
status
OnlineStatus::StatusType status
Definition: kopeteonlinestatus.cpp:103
NetworkStatus::Properties
Definition: networkstatuscommon.h:12
NetworkStatus::Properties::onDemandPolicy
EnumOnDemandPolicy onDemandPolicy
Definition: networkstatuscommon.h:18
networkstatuscommon.h
NetworkStatus::Properties::netmasks
QStringList netmasks
Definition: networkstatuscommon.h:24
NetworkStatus::Properties::service
QByteArray service
Definition: networkstatuscommon.h:20
NetworkStatus::Properties::status
EnumStatus status
Definition: networkstatuscommon.h:16
NetworkStatus::EnumStatus
EnumStatus
Definition: networkstatuscommon.h:9
NetworkStatus::Properties::internet
bool internet
Definition: networkstatuscommon.h:22
NetworkStatus::EnumOnDemandPolicy
EnumOnDemandPolicy
Definition: networkstatuscommon.h:11
operator>>
QDataStream & operator>>(QDataStream &s, NetworkStatus::Properties &p)
Definition: networkstatuscommon.cpp:15
operator<<
QDataStream & operator<<(QDataStream &s, const NetworkStatus::Properties p)
Definition: networkstatuscommon.cpp:4
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:53:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kopete/libkopete

Skip menu "kopete/libkopete"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal