📄 cssyncdocument.cpp
字号:
/*
* ==============================================================================
* Name :CSSyncDocument.cpp
* Part of : clientserversync
* Interface :
* Description :
* Version :
* ==============================================================================
*/
// INCLUDE FILES
#include "CSSyncAppUi.h"
#include "CSSyncDocument.h"
// ============================ MEMBER FUNCTIONS ===============================
// -----------------------------------------------------------------------------
// CCSSyncDocument::NewL()
// Two-phased constructor.
// -----------------------------------------------------------------------------
//
CCSSyncDocument* CCSSyncDocument::NewL( CEikApplication&
aApp )
{
CCSSyncDocument* self = NewLC( aApp );
CleanupStack::Pop( self );
return self;
}
// -----------------------------------------------------------------------------
// CCSSyncDocument::NewLC()
// Two-phased constructor.
// -----------------------------------------------------------------------------
//
CCSSyncDocument* CCSSyncDocument::NewLC( CEikApplication&
aApp )
{
CCSSyncDocument* self =
new ( ELeave ) CCSSyncDocument( aApp );
CleanupStack::PushL( self );
self->ConstructL();
return self;
}
// -----------------------------------------------------------------------------
// CCSSyncDocument::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CCSSyncDocument::ConstructL()
{
User::LeaveIfError( iServer.Connect() );
}
// -----------------------------------------------------------------------------
// CCSSyncDocument::CCSSyncDocument()
// C++ default constructor can NOT contain any code, that might leave.
// -----------------------------------------------------------------------------
//
CCSSyncDocument::CCSSyncDocument( CEikApplication& aApp )
: CAknDocument( aApp )
{
// No implementation required
}
// ---------------------------------------------------------------------------
// CCSSyncDocument::~CCSSyncDocument()
// Destructor.
// ---------------------------------------------------------------------------
//
CCSSyncDocument::~CCSSyncDocument()
{
iServer.Close();
}
// ---------------------------------------------------------------------------
// CCSSyncDocument::CreateAppUiL()
// Constructs CreateAppUi.
// ---------------------------------------------------------------------------
//
CEikAppUi* CCSSyncDocument::CreateAppUiL()
{
// Create the application user interface, and return a pointer to it;
// the framework takes ownership of this object
return ( static_cast <CEikAppUi*> ( new ( ELeave )
CCSSyncAppUi ) );
}
// ---------------------------------------------------------------------------
// CCSSyncDocument::CreateFile()
// Sends a request for file creation to server.
// ---------------------------------------------------------------------------
//
void CCSSyncDocument::CreateFile()
{
iServer.RequestFileCreation();
}
// ---------------------------------------------------------------------------
// CCSSyncDocument::DeleteFile()
// Sends a request for file deletion to server.
// ---------------------------------------------------------------------------
//
void CCSSyncDocument::DeleteFile()
{
iServer.RequestFileDeletion();
}
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -