reSIProcate/DialogUsageManager  9694
Public Member Functions | Private Attributes
Tu Class Reference
Inheritance diagram for Tu:
Inheritance graph
[legend]
Collaboration diagram for Tu:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Tu (Security *security, const Data &sender, const Data &recip)
const Dataname () const
bool process ()

Private Attributes

SecuritymSecurity
Data mSender
Data mRecip

Detailed Description

Definition at line 37 of file testPayloadEncrypter.cxx.


Constructor & Destructor Documentation

Tu::Tu ( Security security,
const Data sender,
const Data recip 
) [inline]

Definition at line 40 of file testPayloadEncrypter.cxx.

         : mSecurity(security),
           mSender(sender),
           mRecip(recip)
      {
      }

Member Function Documentation

const Data& Tu::name ( ) const [inline, virtual]

Implements resip::TransactionUser.

Definition at line 47 of file testPayloadEncrypter.cxx.

      {
         static Data name("Tu");
         return name;
      }
bool Tu::process ( )

Definition at line 60 of file testPayloadEncrypter.cxx.

References InfoLog.

{
   if (mFifo.empty()) return false;
   DumEncrypted* encrypted = dynamic_cast<DumEncrypted*>(mFifo.getNext());
   if (encrypted->success())
   {
      /*Contents* contents = encrypted->encrypted()->clone();
      Data txt(
        "To: sip:fluffy@h1.cs.sipit.net\r\n"
        "From: tofu <sip:tofu@ua.ntt.sipit.net>;tag=5494179792598219348\r\n"
        "CSeq: 1 SUBSCRIBE\r\n"
        "Call-ID: 1129541551360711705\r\n"
        "Contact: sip:tofu@ua.ntt.sipit.net:5060\r\n"
        "Event: presence\r\n"
        "Content-Length: 0\r\n"
        "Expires: 3600\r\n"
        "User-Agent: NTT SecureSession User-Agent\r\n"
        "\r\n");

        SipMessage* msg = SipMessage::make(txt, false);
        msg->setContents(std::auto_ptr<Contents>(contents));
        Helper::ContentsSecAttrs csa(Helper::extractFromPkcs7(msg, *mSecurity));
        InfoLog( << "Body: " << *csa.mContents << "\n" );
        delete msg;
      */
      InfoLog(<<"Message has been successfully encrypted." << endl);
   }
   else
   {
      InfoLog(<<"Failed to encrypte message: " << encrypted->error() << endl);
   }
   delete encrypted;
   return true;
}

Member Data Documentation

Data Tu::mRecip [private]

Definition at line 57 of file testPayloadEncrypter.cxx.

Security* Tu::mSecurity [private]

Definition at line 55 of file testPayloadEncrypter.cxx.

Data Tu::mSender [private]

Definition at line 56 of file testPayloadEncrypter.cxx.


The documentation for this class was generated from the following file: