src/private/PZGNetworkIOSession.cpp
static ConstPZGBeaconDataRef GetBeaconDataFromMessage(const MessageRef & msg)
{
   FlatCountableRef fcRef;
   if (msg()->FindFlat(PZG_NETWORK_NAME_BEACON_DATA, fcRef).IsOK())
   {
      PZGBeaconDataRef beaconRef(fcRef.GetRefCountableRef(), true);
      if (beaconRef()) return AddConstToRef(beaconRef);
   }

   // Didn't work?  Okay, let's try to unflatten some bytes instead
   PZGBeaconDataRef beaconRef = GetBeaconDataFromPool();
   if ((beaconRef())&&(msg()->FindFlat(PZG_NETWORK_NAME_BEACON_DATA, *beaconRef()).IsError())) beaconRef.Reset();
   return AddConstToRef(beaconRef);
}
// Given a Message previously created by CreateBeaconDataMessage(), tries to
// retrieve and return the PZGBeaconDataRef from the Message.  Returns NULL ref on failure.
Given a Message previously created by CreateBeaconDataMessage(), tries to
retrieve and return the PZGBeaconDataRef from the Message.  Returns NULL ref on failure.
Given a Message previously created by CreateBeaconDataMessage () tries to retrieve and return the PZGBeaconDataRef from the Message . Returns NULL ref on failure .
static ConstPZGBeaconDataRef GetBeaconDataFromMessage(const MessageRef & msg)
{
   FlatCountableRef fcRef;
   if (msg()->FindFlat(PZG_NETWORK_NAME_BEACON_DATA, fcRef).IsOK())
   {
      PZGBeaconDataRef beaconRef(fcRef.GetRefCountableRef(), true);
      if (beaconRef()) return AddConstToRef(beaconRef);
   }
   PZGBeaconDataRef beaconRef = GetBeaconDataFromPool();
   if ((beaconRef())&&(msg()->FindFlat(PZG_NETWORK_NAME_BEACON_DATA, *beaconRef()).IsError())) beaconRef.Reset();
   return AddConstToRef(beaconRef);
}
static ConstPZGBeaconDataRef GetBeaconDataFromMessage ( const MessageRef & msg ) { FlatCountableRef fcRef ; if ( msg ( ) -> FindFlat ( PZG_NETWORK_NAME_BEACON_DATA , fcRef ) . IsOK ( ) ) { PZGBeaconDataRef beaconRef ( fcRef . GetRefCountableRef ( ) , true ) ; if ( beaconRef ( ) ) return AddConstToRef ( beaconRef ) ; } PZGBeaconDataRef beaconRef = GetBeaconDataFromPool ( ) ; if ( ( beaconRef ( ) ) && ( msg ( ) -> FindFlat ( PZG_NETWORK_NAME_BEACON_DATA , * beaconRef ( ) ) . IsError ( ) ) ) beaconRef . Reset ( ) ; return AddConstToRef ( beaconRef ) ; }
Given a Message previously created by CreateBeaconDataMessage(), tries to
retrieve and return the PZGBeaconDataRef from the Message.
Given a Message previously created by CreateBeaconDataMessage () tries to retrieve and return the PZGBeaconDataRef from the Message .
// Didn't work?  Okay, let's try to unflatten some bytes instead