Executes the FTP command TYPE (REPRESENTATION TYPE) Caches the representation state if successful. see Documentation of nsFTP::CRepresentation @param[in] representation see Documentation of nsFTP::CRepresentation @param[in] iSize Indicates Bytesize for type LocalByte. @return see return values of CFTPClient::SimpleErrorCheck
| 1528 | /// @param[in] iSize Indicates Bytesize for type LocalByte. |
| 1529 | /// @return see return values of CFTPClient::SimpleErrorCheck |
| 1530 | int CFTPClient::RepresentationType(const CRepresentation& representation, DWORD dwSize) const |
| 1531 | { |
| 1532 | // check representation |
| 1533 | if( m_apCurrentRepresentation.get()!=NULL && representation==*m_apCurrentRepresentation ) |
| 1534 | return FTP_OK; |
| 1535 | |
| 1536 | const int iRet = _RepresentationType(representation, dwSize); |
| 1537 | |
| 1538 | if( iRet==FTP_OK ) |
| 1539 | { |
| 1540 | if( m_apCurrentRepresentation.get()==NULL ) |
| 1541 | m_apCurrentRepresentation.reset(new CRepresentation(representation)); |
| 1542 | else |
| 1543 | *m_apCurrentRepresentation = representation; |
| 1544 | } |
| 1545 | else |
| 1546 | m_apCurrentRepresentation.reset(NULL); |
| 1547 | |
| 1548 | return iRet; |
| 1549 | } |
| 1550 | |
| 1551 | /// Executes the FTP command TYPE (REPRESENTATION TYPE) |
| 1552 | /// see Documentation of nsFTP::CRepresentation |
no test coverage detected