CM.Matrix.new
Description: Reference for CM.Matrix.new

### Constructor

# CM Matrixnew

#### Declaration [src]

    CmMatrix*
    cm_matrix_new (
      const char* data_dir,
      const char* cache_dir,
      const char* app_id,
      gboolean disable_auto_login
    )

#### Description [src]

Create a new `CmMatrix` with the provided details

`data_dir` is used to store downloaded files, avatars, and thumbnails. The content shall not be encrypted even if that was the case when received over the wire.

`app_id` should be a valid string when validated with `g_application_id_is_valid()`

The same values should be provided every time `CmMatrix` is created as these info are used to store data.

#### Parameters

`data_dir`

  Type: `const char*`

  The data directory.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`cache_dir`

  Type: `const char*`

  The cache directory.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`app_id`

  Type: `const char*`

  The app id string (unused).

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`disable_auto_login`

  Type: `gboolean`

  Disable auto login.

#### Return value

Type: `CmMatrix`

A `CmMatrix`.

The caller of the function takes ownership of the data, and is responsible for freeing it.