VirtualBox

Changeset 68332 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Aug 8, 2017 8:38:07 AM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
117453
Message:

Main/EbmlWriter/WebMWriter_Impl: Added [G|g]etFileName().

Location:
trunk/src/VBox/Main/src-client
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/EbmlWriter.cpp

    r67914 r68332  
    5454    };
    5555
     56    /** Stack of EBML sub elements. */
    5657    std::stack<EbmlSubElement> m_Elements;
    57     RTFILE m_File;
     58    /** The file's handle. */
     59    RTFILE                     m_File;
     60    /** The file's name (path). */
     61    Utf8Str                    m_strFile;
    5862
    5963public:
     
    6973    inline int create(const char *a_pszFilename, uint64_t fOpen)
    7074    {
    71         return RTFileOpen(&m_File, a_pszFilename, fOpen);
     75        int rc = RTFileOpen(&m_File, a_pszFilename, fOpen);
     76        if (RT_SUCCESS(rc))
     77        {
     78            m_strFile = a_pszFilename;
     79        }
     80
     81        return rc;
     82    }
     83
     84    /** Returns the file name. */
     85    inline const Utf8Str& getFileName(void)
     86    {
     87        return m_strFile;
    7288    }
    7389
     
    104120        RTFileClose(m_File);
    105121        m_File = NIL_RTFILE;
     122
     123        m_strFile = "";
    106124    }
    107125
     
    11061124}
    11071125
     1126const Utf8Str& WebMWriter::GetFileName(void)
     1127{
     1128    return m_pImpl->m_Ebml.getFileName();
     1129}
     1130
    11081131uint64_t WebMWriter::GetFileSize(void)
    11091132{
  • trunk/src/VBox/Main/src-client/EbmlWriter.h

    r67914 r68332  
    3131
    3232#include <iprt/file.h>
     33
     34#include <VBox/com/string.h> /* For Utf8Str. */
     35
     36using namespace com;
    3337
    3438class WebMWriter_Impl;
     
    123127
    124128    /**
     129     * Gets file name.
     130     *
     131     * @returns File name as UTF-8 string.
     132     */
     133    const Utf8Str& GetFileName(void);
     134
     135    /**
    125136     * Gets current output file size.
    126137     *
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette